Commit e56a5392 authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-10315 - Online ALTER TABLE may get stuck in tdc_remove_table

There was race condition between online ALTER TABLE and statements performing
TABLE_SHARE release without marking it flushed (e.g. in case of table cache
overflow, SET @@global.table_open_cache, manager thread purging table cache).

The reason was missing mysql_cond_broadcast().
parent 83d5b963
......@@ -876,6 +876,8 @@ void tdc_release_share(TABLE_SHARE *share)
}
if (--share->tdc.ref_count)
{
if (!share->is_view)
mysql_cond_broadcast(&share->tdc.COND_release);
mysql_mutex_unlock(&share->tdc.LOCK_table_share);
mysql_mutex_unlock(&LOCK_unused_shares);
DBUG_VOID_RETURN;
......
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