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