Debian Codegraph @

mysql-test/suite/galera/t/MW-286.test

raw
1 #
2 # MW-286 Spurious deadlock error after error with wsrep_desync and wsrep_on
3 #
4
5 --source include/galera_cluster.inc
6 --source include/have_innodb.inc
7 --source include/have_debug_sync.inc
8
9 --connection node_1
10
11 CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
12 # Insert some values before the ALTER
13 INSERT INTO t1 (f1) VALUES (1), (2), (3);
14
15 #
16 # run ALTER with no wsrep replication
17 #
18 --connection node_2
19 SET GLOBAL wsrep_desync = TRUE;
20 SET wsrep_on = FALSE;
21
22 #
23 # stop ALTER processing after it has acquired exclusive MDL lock
24 #
25 SET SESSION debug_sync = "alter_table_inplace_after_lock_upgrade SIGNAL mdl_locked WAIT_FOR mdl_continue";
26
27 --send ALTER TABLE t1 ADD PRIMARY KEY (f1);
28
29 --connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
30 --connection node_2a
31 SET SESSION debug_sync = "now WAIT_FOR mdl_locked";
32
33 #
34 # replicate conflicting insert from node_1
35 #
36 --connection node_1
37 INSERT INTO t1(f1) VALUES (11);
38
39 #
40 # let parked ALTER processing to continue after the conflict
41 #
42 --connection node_2a
43 SET debug_sync = "now SIGNAL mdl_continue";
44 SET debug_sync='RESET';
45
46 #
47 # ALTER should have been aborted with query interupted error code
48 #
49 --connection node_2
50 --error ER_QUERY_INTERRUPTED
51 --reap
52
53 SET wsrep_on = TRUE;
54 SET GLOBAL wsrep_desync = FALSE;
55
56 --connection node_1
57
58 DROP TABLE t1;