summaryrefslogtreecommitdiff
path: root/sql/table_cache.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2016-07-01 13:57:18 +0400
committerSergey Vojtovich <svoj@mariadb.org>2016-09-22 10:21:12 +0400
commite56a53920b0075f9a534610032ee05f2e249e3ae (patch)
treecb466b5121654bce2c4b8ef47ffd8a93449bd297 /sql/table_cache.cc
parent83d5b963bd38e327a673c5d4f4d70c8223f45dd2 (diff)
downloadmariadb-git-e56a53920b0075f9a534610032ee05f2e249e3ae.tar.gz
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().
Diffstat (limited to 'sql/table_cache.cc')
-rw-r--r--sql/table_cache.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/table_cache.cc b/sql/table_cache.cc
index 097f37d26d8..bdb7914c32b 100644
--- a/sql/table_cache.cc
+++ b/sql/table_cache.cc
@@ -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;