Debian Codegraph @

mysql-test/suite/parts/t/partition_purge.test

raw
1 --source include/have_innodb.inc
2 --source include/have_partition.inc
3 --source include/have_debug.inc
4 --source include/have_debug_sync.inc
5
6 CREATE TABLE t1(f1 INT, f2 INT, INDEX(f1))ENGINE=InnoDB STATS_PERSISTENT=0
7 PARTITION BY LIST(f1) (
8 PARTITION p1 VALUES in (1, 2, 3),
9 PARTITION p2 VALUES in (4, 5, 6));
10 INSERT INTO t1 VALUES(1, 1), (1, 1), (6, 1);
11 connect(con1,localhost,root,,,);
12 START TRANSACTION WITH CONSISTENT SNAPSHOT;
13
14 connect(con2,localhost,root,,,);
15 SET DEBUG_SYNC="innodb_rollback_inplace_alter_table SIGNAL default_resume WAIT_FOR alter_resume";
16 send ALTER TABLE t1 ADD UNIQUE INDEX(f1);
17
18 connection default;
19 set DEBUG_SYNC="now WAIT_FOR default_resume";
20 SET DEBUG_SYNC="innodb_row_update_for_mysql_begin SIGNAL alter_resume WAIT_FOR alter_finish";
21 send DELETE FROM t1;
22
23 connection con2;
24 --error ER_DUP_ENTRY
25 reap;
26 SET DEBUG_SYNC="now SIGNAL alter_finish";
27
28 connection default;
29 reap;
30 connection con1;
31 commit;
32 connection default;
33 disconnect con1;
34 disconnect con2;
35 --source ../../innodb/include/wait_all_purged.inc
36 drop table t1;
37 SET DEBUG_SYNC=reset;