Debian Codegraph @

mysql-test/suite/galera/t/galera_desync_overlapped.test

raw
1 #
2 # Test for overlapped transactions under manual desync.
3 #
4 --source include/galera_cluster.inc
5 --source include/have_innodb.inc
6 --source include/have_debug_sync.inc
7
8 --let $galera_connection_name = node_1a
9 --let $galera_server_number = 1
10 --source include/galera_connect.inc
11
12 --connection node_1
13
14 CREATE TABLE ten (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
15 INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
16
17 CREATE TABLE t1 (f1 INTEGER, PRIMARY KEY (f1)) Engine=InnoDB;
18 CREATE TABLE t2 (f1 INTEGER, PRIMARY KEY (f1)) Engine=InnoDB;
19
20 SET GLOBAL wsrep_desync = 1;
21 show status like 'wsrep_desync_count';
22 SET DEBUG_SYNC='before_execute_sql_command SIGNAL alter1 WAIT_FOR alter2';
23 send INSERT INTO t1 (f1) SELECT 0000 + (100 * a1.f1) + (10 * a2.f1) + a3.f1 FROM ten AS a1, ten AS a2, ten AS a3;
24
25 --connection node_1a
26
27 FLUSH STATUS;
28 SET GLOBAL wsrep_desync = 1;
29 show status like 'wsrep_desync_count';
30 SET DEBUG_SYNC='now WAIT_FOR alter1';
31 SET DEBUG_SYNC='before_execute_sql_command SIGNAL alter2';
32 send INSERT INTO t2 (f1) SELECT 0000 + (100 * a1.f1) + (10 * a2.f1) + a3.f1 FROM ten AS a1, ten AS a2, ten AS a3;
33
34 --connection node_1
35 reap;
36
37 --connection node_1a
38 reap;
39
40 --connection node_1
41
42 SET DEBUG_SYNC='RESET';
43
44 SET GLOBAL wsrep_desync = 0;
45 show status like 'wsrep_desync_count';
46 SET GLOBAL wsrep_desync = 0;
47 show status like 'wsrep_desync_count';
48
49 call mtr.add_suppression("Trying to make wsrep_desync = OFF on the node that is already synchronized\\.");
50 show status like 'wsrep_desync_count';
51 SET GLOBAL wsrep_desync = 0;
52
53 SELECT COUNT(*) FROM t1;
54 SELECT COUNT(*) FROM t2;
55
56 DROP TABLE t1;
57 DROP TABLE t2;
58 DROP TABLE ten;