Debian Codegraph @

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

raw
1 --source include/have_debug_sync.inc
2 --source include/have_debug.inc
3 --source include/count_sessions.inc
4
5 SET GLOBAL innodb_deadlock_detect = 'OFF';
6
7 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
8 INSERT INTO t1 VALUES (0);
9 CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
10 INSERT INTO t2 VALUES (0);
11 CREATE TABLE t3 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
12 INSERT INTO t3 VALUES (0);
13
14
15 --connect(con1,localhost,root,,test)
16 --connect(con2,localhost,root,,test)
17 --connect(con3,localhost,root,,test)
18
19 --connection con1
20 --source include/start_transaction_high_prio.inc
21 DELETE FROM t1;
22
23
24 --connection con2
25 --source include/start_transaction_high_prio.inc
26 DELETE FROM t2;
27
28 --connection con3
29 --source include/start_transaction_high_prio.inc
30 DELETE FROM t3;
31
32 --connection con3
33 SET DEBUG_SYNC='lock_wait_will_wait SIGNAL con3_will_wait';
34 --send DELETE FROM t2; COMMIT
35
36 --connection con2
37 SET DEBUG_SYNC='now WAIT_FOR con3_will_wait';
38 SET DEBUG_SYNC='lock_wait_will_wait SIGNAL con2_will_wait';
39 --send DELETE FROM t1; COMMIT
40
41 --connection con1
42 SET DEBUG_SYNC='now WAIT_FOR con2_will_wait';
43 SET DEBUG_SYNC='lock_wait_will_wait SIGNAL con1_will_wait';
44 --send DELETE FROM t3; COMMIT
45
46 --connection default
47 SET DEBUG_SYNC='now WAIT_FOR con1_will_wait';
48
49 --source include/shutdown_mysqld.inc
50 --source include/start_mysqld.inc
51
52 --disconnect con1
53 --disconnect con2
54 --disconnect con3
55 SELECT * FROM t1;
56 DROP TABLE t1;
57 SELECT * FROM t2;
58 DROP TABLE t2;
59 SELECT * FROM t3;
60 DROP TABLE t3;
61
62 --source include/wait_until_count_sessions.inc