diff options
author | unknown <serg@serg.mylan> | 2004-03-25 11:22:01 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-03-25 11:22:01 +0100 |
commit | f72dd18af816a5171ad70076f9e9f7622db0916a (patch) | |
tree | 9fcb276a7665d2280d76dfc889316c975f1956c1 /mysys | |
parent | 57c48a22b6e271a0eb1ffd0552cd5d6e5d0a7b42 (diff) | |
download | mariadb-git-f72dd18af816a5171ad70076f9e9f7622db0916a.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
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/mf_iocache.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |