summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-03-25 11:22:01 +0100
committerunknown <serg@serg.mylan>2004-03-25 11:22:01 +0100
commitda51fe029406c269902c4c6b3b68d4b68d8f65a1 (patch)
tree9fcb276a7665d2280d76dfc889316c975f1956c1
parentc4a2464682054b169003f42a5e9600384bd2963e (diff)
downloadmariadb-git-da51fe029406c269902c4c6b3b68d4b68d8f65a1.tar.gz
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
-rwxr-xr-xBitKeeper/triggers/post-incoming3
-rwxr-xr-xBitKeeper/triggers/post-outgoing3
-rw-r--r--mysys/mf_iocache.c3
3 files changed, 2 insertions, 7 deletions
diff --git a/BitKeeper/triggers/post-incoming b/BitKeeper/triggers/post-incoming
deleted file mode 100755
index f1ea2255de9..00000000000
--- a/BitKeeper/triggers/post-incoming
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-
-echo "Test: post-incoming works"
diff --git a/BitKeeper/triggers/post-outgoing b/BitKeeper/triggers/post-outgoing
deleted file mode 100755
index 3fc2cdbad67..00000000000
--- a/BitKeeper/triggers/post-outgoing
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-
-echo "Test: post-outgoing works"
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index c5bd7db9677..8fb93dc4780 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -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);