summaryrefslogtreecommitdiff
path: root/mysys/mf_iocache.c
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-03-25 23:29:45 +0200
committermonty@mysql.com <>2004-03-25 23:29:45 +0200
commite0e0314d606399778f595d33a191c248f15cb4c2 (patch)
tree7815fb40163d1db39e3991dcd19341ef57d08d74 /mysys/mf_iocache.c
parent3b34a6a2dd73792e1b79047a491bd02b30d5ec68 (diff)
parent488fe61074a83ff31e6ac2f609ba596f903f4d4d (diff)
downloadmariadb-git-e0e0314d606399778f595d33a191c248f15cb4c2.tar.gz
Merge with 4.0
Diffstat (limited to 'mysys/mf_iocache.c')
-rw-r--r--mysys/mf_iocache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index d2c373ab0c6..288071f7361 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -506,7 +506,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);