mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
shared IO_CACHE: protection against remove_io_share in a wrong time
bug#3134
This commit is contained in:
parent
97091f38fe
commit
d8a9a8267b
3 changed files with 2 additions and 7 deletions
|
@ -1,3 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
echo "Test: post-incoming works"
|
|
@ -1,3 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
echo "Test: post-outgoing works"
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue