Commit 632dc05d authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-3850 too early pthread_mutex_unlock in TC_LOG_MMAP::log_xid

parent e679dfca
......@@ -5710,12 +5710,9 @@ int TC_LOG_MMAP::log_xid(THD *thd, my_xid xid)
pthread_mutex_unlock(&LOCK_active);
pthread_mutex_lock(&p->lock);
p->waiters++;
for (;;)
while (p->state == DIRTY && syncing)
{
int not_dirty = p->state != DIRTY;
pthread_mutex_unlock(&p->lock);
if (not_dirty || !syncing)
break;
pthread_cond_wait(&p->cond, &LOCK_sync);
pthread_mutex_lock(&p->lock);
}
......
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