Skip to content

Commit

Permalink
sporadic failures of main.mdl_sync
Browse files Browse the repository at this point in the history
main.mdl_sync 'innodb'                   w32 [ fail ]
        Test ended at 2024-04-06 14:11:15

CURRENT_TEST: main.mdl_sync
--- main/mdl_sync.result
+++ main/mdl_sync.reject
@@ -2458,6 +2458,7 @@
 SELECT LOCK_MODE, LOCK_TYPE, TABLE_SCHEMA, TABLE_NAME FROM information_schema.metadata_lock_info;
 LOCK_MODE	LOCK_TYPE	TABLE_SCHEMA	TABLE_NAME
 MDL_BACKUP_FTWRL2	Backup lock
+MDL_SHARED	Table metadata lock	test	t2
 unlock tables;
 connection default;
 # Reaping UPDATE
  • Loading branch information
vuvova committed Apr 6, 2024
1 parent 12d448f commit a7bf0a4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mysql-test/main/mdl_sync.result
Original file line number Diff line number Diff line change
Expand Up @@ -2433,6 +2433,9 @@ create table t1 (a int) engine=myisam;
create table t2 (a int) stats_persistent=0, engine=innodb;
insert into t1 values (1);
insert into t2 values (1);
connect con1, localhost, root;
start transaction with consistent snapshot;
connection default;
SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL table_opened WAIT_FOR grlwait execute 2';
update t1,t2 set t1.a=2,t2.a=3;
connection con2;
Expand Down Expand Up @@ -2464,6 +2467,7 @@ connection default;
SET DEBUG_SYNC= 'RESET';
drop table t1,t2;
disconnect con2;
disconnect con1;
#
# Bug#50786 Assertion `thd->mdl_context.trans_sentinel() == __null'
# failed in open_ltable()
Expand Down
7 changes: 7 additions & 0 deletions mysql-test/main/mdl_sync.test
Original file line number Diff line number Diff line change
Expand Up @@ -3117,6 +3117,12 @@ create table t2 (a int) stats_persistent=0, engine=innodb;
insert into t1 values (1);
insert into t2 values (1);

connect (con1, localhost, root);
# disable innodb purge thread, otherwise it might start purging t2,
# and will take an mdl, affecting metadata_lock_info output.
start transaction with consistent snapshot;
connection default;

SET DEBUG_SYNC= 'after_open_table_mdl_shared SIGNAL table_opened WAIT_FOR grlwait execute 2';
--send update t1,t2 set t1.a=2,t2.a=3

Expand Down Expand Up @@ -3162,6 +3168,7 @@ connection default;
SET DEBUG_SYNC= 'RESET';
drop table t1,t2;
disconnect con2;
disconnect con1;

--echo #
--echo # Bug#50786 Assertion `thd->mdl_context.trans_sentinel() == __null'
Expand Down

0 comments on commit a7bf0a4

Please sign in to comment.