#Test for BUG#49399, initial Hypothesis. --source include/not_embedded.inc SET DEBUG_SYNC='RESET'; connect(ddl, localhost, root,,); connect(backup, localhost, root,,); connect(killer, localhost,root,,); --echo From con ddl :DDL acquiring bml_shared_lock and waits at a SYNC POINT --connection ddl #connection id of this connection; let $id=`select connection_id()`; CREATE DATABASE db1; CREATE TABLE db1.t1(a int); INSERT INTO db1.t1 VALUES(1); #waits for signal 'killed'. Before the signal 'killed' is emitted, the connection is literally killed. SET DEBUG_SYNC='before_execute_sql_command SIGNAL got_bml_shared_lock WAIT_FOR killed'; # A DDL, during this execution, the connection should stop at sync point SEND CREATE TABLE db1.t2 (prime int, nat int); --connection backup SET DEBUG_SYNC='now WAIT_FOR got_bml_shared_lock'; SEND BACKUP DATABASE db1 TO 'db1.bak'; --connection killer SET DEBUG_SYNC='now WAIT_FOR got_bml_shared_lock'; eval KILL QUERY $id; SHOW TABLES IN db1; --connection ddl --error ER_QUERY_INTERRUPTED reap; --connection backup reap; exit;