Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 10.0.9
-
Fix Version/s: 10.0.10
-
Component/s: None
-
Labels:None
Description
main.mdev-504 fails sporadically. A simplified mtr test:
CREATE TABLE t1(a INT); SELECT * FROM t1; SET debug_sync='tc_acquire_table SIGNAL ready WAIT_FOR go'; --send SELECT * FROM t1 connect(con1, localhost, root,, test); SET debug_sync='now WAIT_FOR ready'; FLUSH TABLE t1; SET debug_sync='now SIGNAL go'; connection default; reap; disconnect con1; DROP TABLE t1;
Needs debug sync point:
=== modified file 'sql/table_cache.cc'
--- sql/table_cache.cc 2014-03-20 07:11:13 +0000
+++ sql/table_cache.cc 2014-03-27 15:02:31 +0000
@@ -334,6 +334,8 @@ static TABLE *tc_acquire_table(THD *thd,
table= share->tdc.free_tables.pop_front();
mysql_mutex_unlock(&share->tdc.LOCK_table_share);
+ DEBUG_SYNC(thd, "tc_acquire_table");
+
if (table)
{
DBUG_ASSERT(!table->in_use);
The simplest way to fix it is to move "table->in_use= thd;" under protection of LOCK_table_share.
Gliffy Diagrams
Attachments
Issue Links
- relates to
-
MDEV-5492 Reduce usage of LOCK_open: TABLE::in_use
-
- Closed
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Sergei, please review fix for this bug.