@@ -33,6 +33,7 @@ SET wsrep_on=OFF;
3333DELETE FROM t1 WHERE f1 = 2;
3434DELETE FROM t1 WHERE f1 = 4;
3535SET wsrep_on=ON;
36+ --source include/galera_wait_ready.inc
3637
3738# Build up slave queue:
3839# - first 8 events will be picked by slave threads
@@ -51,11 +52,11 @@ UPDATE t1 SET f2 = 1 WHERE f1 = 7;
5152UPDATE t1 SET f2 = 1 WHERE f1 = 8;
5253
5354--connection node_2
54- # make sure all events landed to slave queue
55- SET wsrep_on=OFF ;
55+ --echo # make sure all events landed to slave queue
56+ set wsrep_sync_wait=0 ;
5657--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_recv_queue';
5758--source include/wait_condition.inc
58- SET wsrep_on=ON;
59+
5960UNLOCK TABLES;
6061--source include/wsrep_wait_disconnect.inc
6162# Wait for the node to shutdown replication
@@ -70,8 +71,8 @@ SHOW STATUS LIKE 'wsrep_cluster_size';
7071SELECT * FROM t1;
7172
7273--connection node_2
73- # Gracefully restart the node
74- SET GLOBAL wsrep_on=OFF;
74+ --echo # Gracefully restart the node
75+ set wsrep_on=OFF;
7576--source include/shutdown_mysqld.inc
7677--source include/start_mysqld.inc
7778--source include/galera_wait_ready.inc
@@ -98,20 +99,21 @@ COMMIT;
9899CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 INT);
99100
100101--connection node_2
101- # Allow 1K slave queue without flow control
102+ --echo # Allow 1K slave queue without flow control
102103SET GLOBAL wsrep_provider_options='gcs.fc_limit=1K';
103- # Introduce inconsistency
104- SET wsrep_on=OFF;
105104--let $wait_condition = SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
106105--source include/wait_condition.inc
106+ --echo # Introduce inconsistency
107+ SET wsrep_on=OFF;
107108DROP TABLE t2;
108109SET wsrep_on=ON;
110+ --source include/galera_wait_ready.inc
109111
110- # set up sync point to ensure DROP TABLE replication order below
112+ --echo # set up sync point to ensure DROP TABLE replication order below
111113--let galera_sync_point = after_replicate_sync
112114--source include/galera_set_sync_point.inc
113115
114- # Build up slave queue:
116+ --echo # Build up slave queue:
115117# - first 8 events will be picked by slave threads
116118# - one more event will be waiting in slave queue
117119LOCK TABLES t1 READ;
@@ -123,20 +125,19 @@ UPDATE t1 SET f2 = 1 WHERE f1 = 3;
123125UPDATE t1 SET f2 = 1 WHERE f1 = 4;
124126UPDATE t1 SET f2 = 2 WHERE f1 = 4; /* dependent applier */;
125127
126- # interleave a failing statement
128+ --echo # interleave a failing statement
127129--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
128130--connection node_2a
129131--send DROP TABLE t2;
130132
131- # make sure DROP TABLE from above has replicated
133+ --echo # make sure DROP TABLE from above has replicated
132134--connection node_2
133- SET wsrep_on=OFF ;
135+ set wsrep_sync_wait=0 ;
134136--echo "Wait for DROP TABLE to replicate"
135137--source include/galera_wait_sync_point.inc
136138--source include/galera_signal_sync_point.inc
137139--source include/galera_clear_sync_point.inc
138140--echo "DROP TABLE replicated"
139- SET wsrep_on=ON;
140141
141142--connection node_1
142143UPDATE t1 SET f2 = 3 WHERE f1 = 4; /* dependent applier */
@@ -146,11 +147,10 @@ UPDATE t1 SET f2 = 1 WHERE f1 = 7;
146147UPDATE t1 SET f2 = 1 WHERE f1 = 8;
147148
148149--connection node_2
149- # make sure all events landed to slave queue
150- SET wsrep_on=OFF;
150+ --echo # make sure all events landed to slave queue
151151--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_recv_queue';
152152--source include/wait_condition.inc
153- SET wsrep_on=ON;
153+
154154UNLOCK TABLES;
155155
156156--connection node_2a
@@ -165,12 +165,13 @@ SHOW STATUS LIKE 'wsrep_cluster_size';
165165SELECT * FROM t1;
166166
167167--connection node_2
168+ set wsrep_on=OFF;
168169--source include/wsrep_wait_disconnect.inc
169- # Wait for the node to shutdown replication
170+ --echo # Wait for the node to shutdown replication
170171--let $members=0
171172--source include/wsrep_wait_membership.inc
172- # Gracefully restart the node
173- SET GLOBAL wsrep_on=OFF;
173+ --echo # Gracefully restart the node
174+
174175--source include/shutdown_mysqld.inc
175176--source include/start_mysqld.inc
176177--source include/galera_wait_ready.inc
0 commit comments