Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0.26, 10.1.14
-
None
-
10.1.18
Description
Test case:
--source include/have_xtradb.inc
|
|
CREATE TABLE t1(a INT) ENGINE=InnoDB;
|
SELECT * FROM t1;
|
--send SET @@global.table_open_cache=400;
|
|
connect(con1, localhost, root);
|
ALTER TABLE t1 COMMENT='abc';
|
disconnect con1;
|
|
connection default;
|
--reap
|
DROP TABLE t1;
|
Apply this patch to make it stuck reliably:
diff --git a/sql/table_cache.cc b/sql/table_cache.cc
|
index 097f37d..b46a620 100644
|
--- a/sql/table_cache.cc
|
+++ b/sql/table_cache.cc
|
@@ -865,6 +865,8 @@ void tdc_release_share(TABLE_SHARE *share)
|
}
|
mysql_mutex_unlock(&share->tdc.LOCK_table_share);
|
|
+ if (!strcmp(share->table_name.str, "t1") && !share->tdc.flushed)
|
+ sleep(1);
|
mysql_mutex_lock(&LOCK_unused_shares);
|
mysql_mutex_lock(&share->tdc.LOCK_table_share);
|
if (share->tdc.flushed)
|