Commit 1c53aeff authored by Sergey Vojtovich's avatar Sergey Vojtovich

Fixed sporadic main.mdl_sync failure

When update finishes, MDL_context::release_transactional_locks() first
releases MDL_STATEMENT locks (MDL_BACKUP_DML and MDL_BACKUP_TRANS_DML
in this particular cases), which allows FTWRL connection to proceed.
Then MDL_TRANSACTION locks get released (MDL_SHARED_WRITE in this case).
metadata_lock_info query may sporadically hit this gap and observe
these otherwise unexpected locks.
parent 0fcb141f
......@@ -3310,7 +3310,11 @@ SET DEBUG_SYNC= 'now SIGNAL grlwait';
SET DEBUG_SYNC= 'now WAIT_FOR table_opened';
SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL grlwait';
FLUSH TABLES WITH READ LOCK;
let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.metadata_lock_info;
--source include/wait_condition.inc
SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
unlock tables;
connection default;
......
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