7
7
#
8
8
9
9
--source include/have_innodb.inc
10
+ --source include/have_log_bin.inc
10
11
--source include/have_debug.inc
11
12
--source include/have_debug_sync.inc
12
13
--source include/galera_have_debug_sync.inc
21
22
#
22
23
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
23
24
--connection node_3
24
- SET GLOBAL wsrep_on=OFF;
25
25
RESET MASTER;
26
- SET GLOBAL wsrep_on=ON;
27
26
28
27
--connection node_2a
29
28
#
@@ -33,10 +32,10 @@ SET GLOBAL wsrep_on=ON;
33
32
34
33
35
34
#
36
- # nodes 1 and 2 form a galera cluster, node 2 operates as slave for native MariaDB naster in node 3
35
+ # nodes 1 and 2 form a galera cluster, node 2 operates as slave for native MariaDB master in node 3
37
36
#
38
37
--disable_query_log
39
- --eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
38
+ --eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_3;
40
39
--enable_query_log
41
40
START SLAVE;
42
41
@@ -156,35 +155,31 @@ UPDATE t1 SET f2 = 'd' WHERE f1 = 3;
156
155
--let $wait_condition = SELECT COUNT(*) = 4 FROM test.t1;
157
156
--source include/wait_condition.inc
158
157
159
- # Block the commit
160
- --let $galera_sync_point = commit_monitor_master_enter_sync
161
- --source include/galera_set_sync_point.inc
162
-
163
158
# block applier
164
159
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
165
160
166
- # Inject a conflicting update from node 3
167
- --connection node_3
161
+ # Inject a conflicting update from node 1
162
+ --connection node_1
168
163
UPDATE test.t1 SET f2 = 'e' WHERE f1 = 3;
169
164
165
+ --connection node_2a
166
+ # wait until applier has reached the sync point
167
+ SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
168
+ --let $expected_cert_failures = `SELECT VARIABLE_VALUE+1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'`
169
+
170
170
# send the update from master
171
171
--connection node_3
172
172
--error 0
173
173
COMMIT;
174
174
175
175
--connection node_2a
176
+ --let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'
177
+ --source include/wait_condition.inc
176
178
177
- # release the applier
179
+ # release the applier from node 1
178
180
SET GLOBAL debug_dbug = "";
179
181
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
180
182
181
-
182
- # Unblock the async slave commit
183
- --connection node_2a
184
- --source include/galera_clear_sync_point.inc
185
- --source include/galera_signal_sync_point.inc
186
- SET DEBUG_SYNC = "RESET";
187
-
188
183
--connection node_2a
189
184
190
185
set session wsrep_sync_wait=15;
@@ -193,11 +188,10 @@ set session wsrep_sync_wait=0;
193
188
194
189
STOP SLAVE;
195
190
RESET SLAVE;
191
+ SET DEBUG_SYNC = "RESET";
196
192
197
193
DROP TABLE t1;
198
194
199
195
--connection node_3
200
196
DROP TABLE t1;
201
- SET GLOBAL wsrep_on=OFF;
202
197
RESET MASTER;
203
- SET GLOBAL wsrep_on=ON;
0 commit comments