Debian Codegraph @

mysql-test/suite/innodb/t/alter_mdl_timeout.test

raw
1 --source include/have_innodb.inc
2 --source include/have_debug.inc
3 --source include/have_debug_sync.inc
4
5 create table t1(f1 char(10), f2 char(10) not null, f3 int not null,
6 f4 int not null, primary key(f3))engine=innodb;
7 insert into t1 values('a','a', 1, 1), ('b','b', 2, 2), ('c', 'c', 3, 3), ('d', 'd', 4, 4);
8 SET DEBUG_SYNC="row_merge_after_scan SIGNAL con1_start WAIT_FOR con1_insert";
9 SET DEBUG_SYNC="innodb_commit_inplace_alter_table_wait SIGNAL con1_wait WAIT_FOR con1_update";
10 send ALTER TABLE t1 ADD UNIQUE INDEX(f1(3), f4), ADD UNIQUE INDEX(f2), ALGORITHM=INPLACE;
11
12 connect(con1,localhost,root,,,);
13 SET DEBUG_SYNC="now WAIT_FOR con1_start";
14 begin;
15 INSERT INTO t1 VALUES('e','e',5, 5);
16 SET DEBUG_SYNC="now SIGNAL con1_insert";
17 SET DEBUG_SYNC="now WAIT_FOR con1_wait";
18 SET DEBUG_SYNC="after_row_upd_clust SIGNAL con1_update WAIT_FOR alter_rollback";
19 SEND UPDATE t1 set f4 = 10 order by f1 desc limit 2;
20
21 connection default;
22 --error ER_LOCK_WAIT_TIMEOUT
23 reap;
24 SET DEBUG_SYNC="now SIGNAL alter_rollback";
25
26 connection con1;
27 reap;
28 commit;
29
30 connection default;
31 disconnect con1;
32 DROP TABLE t1;
33 SET DEBUG_SYNC="RESET";