1# 2# test MDL backoff-and-retry during multi-update 3# 4source include/have_debug_sync.inc; 5create table t1 (a int, b int); 6create table t2 (c int, d int); 7insert t1 values (1,2),(3,4); 8insert t2 values (5,6),(7,8); 9create table t0 (x int); 10insert t0 values (11), (22); 11create trigger tr1 before update on t1 for each row insert t0 values (new.b); 12 13set debug_sync='open_tables_after_open_and_process_table SIGNAL ready WAIT_FOR cont'; 14send update t1 join t2 on (a=c+4) set b=d; 15 16connect con1, localhost, root; 17set debug_sync='now WAIT_FOR ready'; 18set debug_sync='mdl_acquire_lock_wait SIGNAL cont'; 19lock table t1 write, t0 write; 20let $wait_condition= select count(*) from information_schema.processlist where state = 'Waiting for table metadata lock' 21source include/wait_condition.inc; 22disconnect con1; 23connection default; 24reap; 25drop table t1, t2, t0; 26set debug_sync='reset'; 27