1
+ connection node_2;
2
+ connection node_1;
3
+ connection node_1;
1
4
cluster 1 node 1
2
5
SHOW STATUS LIKE 'wsrep_cluster_size';
3
6
Variable_name Value
4
7
wsrep_cluster_size 3
8
+ connection node_2;
5
9
cluster 1 node 2
6
10
SHOW STATUS LIKE 'wsrep_cluster_size';
7
11
Variable_name Value
8
12
wsrep_cluster_size 3
13
+ connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
14
+ connection node_3;
9
15
cluster 1 node 3
10
16
SHOW STATUS LIKE 'wsrep_cluster_size';
11
17
Variable_name Value
12
18
wsrep_cluster_size 3
19
+ connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
20
+ connection node_4;
13
21
cluster 2 node 1
14
22
SHOW STATUS LIKE 'wsrep_cluster_size';
15
23
Variable_name Value
16
24
wsrep_cluster_size 3
25
+ connect node_5, 127.0.0.1, root, , test, $NODE_MYPORT_5;
26
+ connection node_5;
17
27
cluster 2 node 2
18
28
SHOW STATUS LIKE 'wsrep_cluster_size';
19
29
Variable_name Value
20
30
wsrep_cluster_size 3
31
+ connect node_6, 127.0.0.1, root, , test, $NODE_MYPORT_6;
32
+ connection node_6;
21
33
cluster 2 node 3
22
34
SHOW STATUS LIKE 'wsrep_cluster_size';
23
35
Variable_name Value
24
36
wsrep_cluster_size 3
37
+ connection node_1;
25
38
change master to master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_4, master_use_gtid=current_pos, ignore_server_ids=(12,13);;
26
39
start slave;
27
40
include/wait_for_slave_to_start.inc
@@ -31,6 +44,7 @@ select @@gtid_binlog_state;
31
44
select @@gtid_slave_pos;
32
45
@@gtid_slave_pos
33
46
47
+ connection node_4;
34
48
change master to master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_1, master_use_gtid=current_pos, ignore_server_ids=(22,23);;
35
49
start slave;
36
50
include/wait_for_slave_to_start.inc
@@ -41,15 +55,19 @@ select @@gtid_slave_pos;
41
55
@@gtid_slave_pos
42
56
43
57
cluster 1 node 1
58
+ connection node_1;
44
59
create table t1 (cluster_domain_id int ,node_server_id int, seq_no int);
45
60
insert into t1 values (1, 11, 2);
46
61
select @@gtid_binlog_state;
47
62
@@gtid_binlog_state
48
63
1-11-2
49
64
#wait for sync cluster 1 and 2
65
+ connection node_1;
50
66
include/save_master_gtid.inc
67
+ connection node_4;
51
68
include/sync_with_master_gtid.inc
52
69
cluster 2 node 1
70
+ connection node_4;
53
71
select @@gtid_binlog_state;
54
72
@@gtid_binlog_state
55
73
1-11-2
@@ -62,9 +80,12 @@ cluster_domain_id node_server_id seq_no
62
80
1 11 2
63
81
2 21 1
64
82
#wait for sync cluster 1 and 2
83
+ connection node_1;
65
84
include/save_master_gtid.inc
85
+ connection node_4;
66
86
include/sync_with_master_gtid.inc
67
87
cluster 1 node 2
88
+ connection node_2;
68
89
select @@gtid_binlog_state;
69
90
@@gtid_binlog_state
70
91
1-11-2,2-21-1
@@ -73,9 +94,12 @@ select @@gtid_binlog_state;
73
94
@@gtid_binlog_state
74
95
1-11-2,1-12-3,2-21-1
75
96
#wait for sync cluster 1 and 2
97
+ connection node_1;
76
98
include/save_master_gtid.inc
99
+ connection node_4;
77
100
include/sync_with_master_gtid.inc
78
101
cluster 1 node 3
102
+ connection node_3;
79
103
select @@gtid_binlog_state;
80
104
@@gtid_binlog_state
81
105
1-11-2,1-12-3,2-21-1
@@ -84,9 +108,12 @@ select @@gtid_binlog_state;
84
108
@@gtid_binlog_state
85
109
1-12-3,1-11-2,1-13-4,2-21-1
86
110
#wait for sync cluster 1 and 2
111
+ connection node_1;
87
112
include/save_master_gtid.inc
113
+ connection node_4;
88
114
include/sync_with_master_gtid.inc
89
115
cluster 2 node 2
116
+ connection node_5;
90
117
select @@gtid_binlog_state;
91
118
@@gtid_binlog_state
92
119
1-12-3,1-11-2,1-13-4,2-21-1
@@ -95,9 +122,12 @@ select @@gtid_binlog_state;
95
122
@@gtid_binlog_state
96
123
1-12-3,1-11-2,1-13-4,2-21-1,2-22-2
97
124
#wait for sync cluster 2 and 1
125
+ connection node_4;
98
126
include/save_master_gtid.inc
127
+ connection node_1;
99
128
include/sync_with_master_gtid.inc
100
129
cluster 2 node 3
130
+ connection node_6;
101
131
select @@gtid_binlog_state;
102
132
@@gtid_binlog_state
103
133
1-12-3,1-11-2,1-13-4,2-21-1,2-22-2
@@ -106,28 +136,53 @@ select @@gtid_binlog_state;
106
136
@@gtid_binlog_state
107
137
1-12-3,1-11-2,1-13-4,2-21-1,2-22-2,2-23-3
108
138
#wait for sync cluster 2 and 1
139
+ connection node_4;
109
140
include/save_master_gtid.inc
141
+ connection node_1;
110
142
include/sync_with_master_gtid.inc
111
143
cluster 1 node 1
144
+ connection node_1;
112
145
select @@gtid_binlog_state;
113
146
@@gtid_binlog_state
114
147
1-12-3,1-11-2,1-13-4,2-21-1,2-22-2,2-23-3
115
148
drop table t1;
116
149
stop slave;
117
150
reset slave;
151
+ cluster 2 node 1
152
+ connection node_4;
153
+ stop slave;
154
+ reset slave;
155
+ cluster 1 node 1
156
+ connection node_1;
118
157
change master to master_use_gtid=no, ignore_server_ids=();
158
+ set global wsrep_on=OFF;
119
159
reset master;
160
+ set global wsrep_on=ON;
120
161
set global GTID_SLAVE_POS="";
121
162
cluster 2 node 1
122
- stop slave;
123
- reset slave;
163
+ connection node_4;
124
164
change master to master_use_gtid=no, ignore_server_ids=();
165
+ set global wsrep_on=OFF;
125
166
reset master;
167
+ set global wsrep_on=ON;
126
168
set global GTID_SLAVE_POS="";
169
+ connection node_2;
170
+ set global wsrep_on=OFF;
127
171
reset master;
172
+ set global wsrep_on=ON;
173
+ connection node_3;
174
+ set global wsrep_on=OFF;
128
175
reset master;
176
+ set global wsrep_on=ON;
177
+ connection node_5;
178
+ set global wsrep_on=OFF;
129
179
reset master;
180
+ set global wsrep_on=ON;
181
+ connection node_6;
182
+ set global wsrep_on=OFF;
130
183
reset master;
184
+ set global wsrep_on=ON;
185
+ connection node_1;
131
186
change master to master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_6, master_use_gtid=current_pos, ignore_server_ids=(12,13);;
132
187
start slave;
133
188
include/wait_for_slave_to_start.inc
@@ -137,6 +192,7 @@ select @@gtid_binlog_state;
137
192
select @@gtid_slave_pos;
138
193
@@gtid_slave_pos
139
194
195
+ connection node_4;
140
196
change master to master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_3, master_use_gtid=current_pos, ignore_server_ids=(22,23);;
141
197
start slave;
142
198
include/wait_for_slave_to_start.inc
@@ -147,15 +203,19 @@ select @@gtid_slave_pos;
147
203
@@gtid_slave_pos
148
204
149
205
cluster 1 node 1
206
+ connection node_1;
150
207
create table t1 (cluster_domain_id int ,node_server_id int, seq_no int);
151
208
insert into t1 values (1, 11, 2);
152
209
select @@gtid_binlog_state;
153
210
@@gtid_binlog_state
154
211
1-11-2
155
212
#wait for sync cluster 1 and 2
213
+ connection node_1;
156
214
include/save_master_gtid.inc
215
+ connection node_4;
157
216
include/sync_with_master_gtid.inc
158
217
cluster 2 node 1
218
+ connection node_4;
159
219
insert into t1 values (2, 21, 1);
160
220
select @@gtid_binlog_state;
161
221
@@gtid_binlog_state
@@ -165,9 +225,12 @@ cluster_domain_id node_server_id seq_no
165
225
1 11 2
166
226
2 21 1
167
227
#wait for sync cluster 1 and 2
228
+ connection node_1;
168
229
include/save_master_gtid.inc
230
+ connection node_4;
169
231
include/sync_with_master_gtid.inc
170
232
cluster 1 node 2
233
+ connection node_2;
171
234
select @@gtid_binlog_state;
172
235
@@gtid_binlog_state
173
236
1-11-2,2-21-1
@@ -176,9 +239,12 @@ select @@gtid_binlog_state;
176
239
@@gtid_binlog_state
177
240
1-11-2,1-12-3,2-21-1
178
241
#wait for sync cluster 1 and 2
242
+ connection node_1;
179
243
include/save_master_gtid.inc
244
+ connection node_4;
180
245
include/sync_with_master_gtid.inc
181
246
cluster 1 node 3
247
+ connection node_3;
182
248
select @@gtid_binlog_state;
183
249
@@gtid_binlog_state
184
250
1-11-2,1-12-3,2-21-1
@@ -187,9 +253,12 @@ select @@gtid_binlog_state;
187
253
@@gtid_binlog_state
188
254
1-12-3,1-11-2,1-13-4,2-21-1
189
255
#wait for sync cluster 1 and 2
256
+ connection node_1;
190
257
include/save_master_gtid.inc
258
+ connection node_4;
191
259
include/sync_with_master_gtid.inc
192
260
cluster 2 node 2
261
+ connection node_5;
193
262
select @@gtid_binlog_state;
194
263
@@gtid_binlog_state
195
264
1-12-3,1-11-2,1-13-4,2-21-1
@@ -198,9 +267,12 @@ select @@gtid_binlog_state;
198
267
@@gtid_binlog_state
199
268
1-12-3,1-11-2,1-13-4,2-21-1,2-22-2
200
269
#wait for sync cluster 2 and 1
270
+ connection node_4;
201
271
include/save_master_gtid.inc
272
+ connection node_1;
202
273
include/sync_with_master_gtid.inc
203
274
cluster 2 node 3
275
+ connection node_6;
204
276
select @@gtid_binlog_state;
205
277
@@gtid_binlog_state
206
278
1-12-3,1-11-2,1-13-4,2-21-1,2-22-2
@@ -209,23 +281,43 @@ select @@gtid_binlog_state;
209
281
@@gtid_binlog_state
210
282
1-12-3,1-11-2,1-13-4,2-21-1,2-22-2,2-23-3
211
283
#wait for sync cluster 2 and 1
284
+ connection node_4;
212
285
include/save_master_gtid.inc
286
+ connection node_1;
213
287
include/sync_with_master_gtid.inc
214
288
cluster 1 node 1
289
+ connection node_1;
215
290
select @@gtid_binlog_state;
216
291
@@gtid_binlog_state
217
292
1-12-3,1-11-2,1-13-4,2-21-1,2-22-2,2-23-3
218
293
drop table t1;
219
294
stop slave;
220
295
change master to master_use_gtid=no, ignore_server_ids=();
296
+ set global wsrep_on=OFF;
221
297
reset master;
298
+ set global wsrep_on=ON;
222
299
set global GTID_SLAVE_POS="";
223
300
cluster 2 node 1
301
+ connection node_4;
224
302
stop slave;
225
303
change master to master_use_gtid=no, ignore_server_ids=();
304
+ set global wsrep_on=OFF;
226
305
reset master;
306
+ set global wsrep_on=ON;
227
307
set global GTID_SLAVE_POS="";
308
+ connection node_2;
309
+ set global wsrep_on=OFF;
228
310
reset master;
311
+ set global wsrep_on=ON;
312
+ connection node_3;
313
+ set global wsrep_on=OFF;
229
314
reset master;
315
+ set global wsrep_on=ON;
316
+ connection node_5;
317
+ set global wsrep_on=OFF;
230
318
reset master;
319
+ set global wsrep_on=ON;
320
+ connection node_6;
321
+ set global wsrep_on=OFF;
231
322
reset master;
323
+ set global wsrep_on=ON;
0 commit comments