1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

shared IO_CACHE: protection against remove_io_share in a wrong time

bug#3134


BitKeeper/deleted/.del-post-incoming~9f2168f531f09f3b:
  Delete: BitKeeper/triggers/post-incoming
BitKeeper/deleted/.del-post-outgoing~1dd3d8f0f6e8f3cd:
  Delete: BitKeeper/triggers/post-outgoing
This commit is contained in:
unknown
2004-03-25 11:22:01 +01:00
parent 57c48a22b6
commit f72dd18af8
3 changed files with 2 additions and 7 deletions

View File

@ -1,3 +0,0 @@
#! /bin/sh
echo "Test: post-incoming works"

View File

@ -1,3 +0,0 @@
#! /bin/sh
echo "Test: post-outgoing works"

View File

@ -481,7 +481,8 @@ static int lock_io_cache(IO_CACHE *info, my_off_t pos)
while (!s->active || s->active->pos_in_file < pos)
pthread_cond_wait(&s->cond, &s->mutex);
if (s->total < total)
if (s->total < total &&
(!s->active || s->active->pos_in_file < pos))
return 1;
pthread_mutex_unlock(&s->mutex);