Debian Codegraph @

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

raw
1 # Test fragmentation over configuration changes
2 --source include/galera_cluster.inc
3 --source include/have_innodb.inc
4 --source include/galera_have_debug_sync.inc
5
6 # Save original auto_increment_offset values.
7 --let $node_1=node_1
8 --let $node_2=node_2
9 --source include/auto_increment_offset_save.inc
10
11 # Prepare table
12 CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 TEXT);
13
14 # Stop node2
15
16 # Disconnect node_2 from group
17 --connection node_2
18 --let $wsrep_cluster_address_orig = `select @@wsrep_cluster_address`
19 SET GLOBAL wsrep_cluster_address='';
20
21 # Connection for sync points
22 --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
23 SET SESSION wsrep_sync_wait=0;
24
25 # Set breakpoint in gcs after first fragment send
26
27 --let $galera_sync_point = gcs_core_after_frag_send
28 --source include/galera_set_sync_point.inc
29
30 --connection node_1
31 SET SESSION wsrep_retry_autocommit=0;
32 --send INSERT INTO t1 VALUES (1, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
33
34 --connection node_1a
35 --source include/galera_wait_sync_point.inc
36 --source include/galera_clear_sync_point.inc
37
38
39 # Restart node_2, wait until it joins the group and then make INSERT
40 --connection node_2
41 --disable_query_log
42 --eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig'
43 --enable_query_log
44 SET SESSION wsrep_on = 0;
45 --source include/galera_wait_ready.inc
46 SET SESSION wsrep_on = 1;
47
48 INSERT INTO t1 VALUES (2, "bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
49
50 # Signal node_1 to continue
51 --connection node_1a
52 --source include/galera_signal_sync_point.inc
53
54 # Deadlock error should be returned since write set send was
55 # interrupted by gcs
56 --connection node_1
57 --error ER_ERROR_DURING_COMMIT
58 --reap
59
60 # Do additional insert to verify that node_1 remain operational
61 INSERT INTO t1 VALUES (3, "cccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
62
63
64 # Nodes node_1 and node_2 should now contain rows 2 and 3
65 SELECT * FROM t1;
66
67 --connection node_2
68 SELECT * FROM t1;
69
70 --connection node_1
71
72 DROP TABLE t1;
73
74 --source include/auto_increment_offset_restore.inc