Commit d8a9a826 authored by serg@serg.mylan's avatar serg@serg.mylan

shared IO_CACHE: protection against remove_io_share in a wrong time

bug#3134
parent 97091f38
#! /bin/sh
echo "Test: post-incoming works"
#! /bin/sh
echo "Test: post-outgoing works"
...@@ -481,7 +481,8 @@ static int lock_io_cache(IO_CACHE *info, my_off_t pos) ...@@ -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) while (!s->active || s->active->pos_in_file < pos)
pthread_cond_wait(&s->cond, &s->mutex); 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; return 1;
pthread_mutex_unlock(&s->mutex); pthread_mutex_unlock(&s->mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment