Debian Codegraph @

mysql-test/suite/galera_3nodes/r/galera_gtid_consistency.result

raw
1 connection node_2;
2 connection node_1;
3 connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
4 connection node_1;
5 connection node_2;
6 connection node_3;
7 connect node_2b, 127.0.0.1, root, , test, $NODE_MYPORT_2;
8 set wsrep_sync_wait=0;
9 connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
10 set wsrep_sync_wait=0;
11 connection node_1;
12 CREATE PROCEDURE insert_row (IN node varchar(10), IN repeat_count int)
13 BEGIN
14 DECLARE current_num int;
15 SET current_num = 0;
16 WHILE current_num < repeat_count do
17 INSERT INTO t1(node, name) VALUES (node, UUID());
18 SET current_num = current_num + 1;
19 END WHILE;
20 END|
21 CREATE TABLE t1 (id bigint not null primary key auto_increment, node VARCHAR(10), name VARCHAR(64)) ENGINE=innodb;
22 # node_1
23 show variables like '%gtid_binlog_pos%';
24 Variable_name Value
25 gtid_binlog_pos 1111-1-2
26 connection node_2;
27 # node_2
28 show variables like '%gtid_binlog_pos%';
29 Variable_name Value
30 gtid_binlog_pos 1111-1-2
31 connection node_3;
32 # node_3
33 show variables like '%gtid_binlog_pos%';
34 Variable_name Value
35 gtid_binlog_pos 1111-1-2
36 connection node_1;
37 CALL insert_row('node1', 500);;
38 connection node_2;
39 CALL insert_row('node2', 500);;
40 connection node_3;
41 CALL insert_row('node3', 500);;
42 connection node_2;
43 # Shutdown node_2, force SST
44 connection node_2b;
45 # Wait until node_2 leaves cluster
46 connection node_1b;
47 connection node_1;
48 connection node_3;
49 connection node_1;
50 CALL insert_row('node1', 100);
51 connection node_3;
52 CALL insert_row('node3', 100);
53 CREATE TABLE t2(i int primary key) engine=innodb;
54 connection node_2;
55 # Restart node_2
56 # restart
57 connection node_1b;
58 # Wait until node_2 is back in cluster
59 # node2 has joined
60 # GTID in node1
61 show variables like 'wsrep_gtid_domain_id';
62 Variable_name Value
63 wsrep_gtid_domain_id 1111
64 show variables like '%gtid_binlog_pos%';
65 Variable_name Value
66 gtid_binlog_pos 1111-1-1703
67 connection node_2;
68 # GTID in node2
69 show variables like 'wsrep_gtid_domain_id';
70 Variable_name Value
71 wsrep_gtid_domain_id 1111
72 show variables like '%gtid_binlog_pos%';
73 Variable_name Value
74 gtid_binlog_pos 1111-1-1703
75 connection node_3;
76 # GTID in node3
77 show variables like 'wsrep_gtid_domain_id';
78 Variable_name Value
79 wsrep_gtid_domain_id 1111
80 show variables like '%gtid_binlog_pos%';
81 Variable_name Value
82 gtid_binlog_pos 1111-1-1703
83 # Shutdown node_3
84 connection node_3;
85 SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
86 # Wait until node_3 leaves cluster
87 connection node_1b;
88 connection node_1;
89 CALL insert_row('node1', 50);
90 CREATE TABLE t3(i int primary key) engine=innodb;
91 connection node_3;
92 # Rejoin node_3
93 SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
94 connection node_1b;
95 # Wait until node_3 is back in cluster
96 # node3 has joined
97 connection node_1;
98 # GTID in node1
99 show variables like 'wsrep_gtid_domain_id';
100 Variable_name Value
101 wsrep_gtid_domain_id 1111
102 show variables like '%gtid_binlog_pos%';
103 Variable_name Value
104 gtid_binlog_pos 1111-1-1754
105 connection node_2;
106 # GTID in node2
107 show variables like 'wsrep_gtid_domain_id';
108 Variable_name Value
109 wsrep_gtid_domain_id 1111
110 show variables like '%gtid_binlog_pos%';
111 Variable_name Value
112 gtid_binlog_pos 1111-1-1754
113 connection node_3;
114 # GTID in node3
115 show variables like 'wsrep_gtid_domain_id';
116 Variable_name Value
117 wsrep_gtid_domain_id 1111
118 show variables like '%gtid_binlog_pos%';
119 Variable_name Value
120 gtid_binlog_pos 1111-1-1754
121 # One by one shutdown all nodes
122 connection node_3;
123 # shutdown node_3
124 connection node_2;
125 # wait until node_3 is out of cluster
126 # shutdown node_2
127 connection node_1;
128 # wait until node_2 is out of cluster
129 # shutdown node_1
130 # Bootstrap from node_1
131 connection node_1;
132 # restart: --wsrep_new_cluster
133 show variables like 'wsrep_gtid_domain_id';
134 Variable_name Value
135 wsrep_gtid_domain_id 1111
136 show variables like '%gtid_binlog_pos%';
137 Variable_name Value
138 gtid_binlog_pos 1111-1-1754
139 ANALYZE TABLE t2;
140 Table Op Msg_type Msg_text
141 test.t2 analyze status Engine-independent statistics collected
142 test.t2 analyze status OK
143 CALL insert_row('node1', 100);;
144 # Restart node_2
145 connection node_2;
146 # restart
147 connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1;
148 set wsrep_sync_wait=0;
149 connection node_1c;
150 # wait until node_1 and node_2 are in cluster
151 connection node_2;
152 ALTER TABLE t2 ADD COLUMN (k int);
153 CALL insert_row('node2', 100);;
154 # Restart node_3
155 connection node_3;
156 # restart
157 connection node_1c;
158 # wait until all nodes are back in cluster
159 after cluster restart
160 connection node_2;
161 connection node_1;
162 connection node_1;
163 node1 GTID
164 show variables like 'wsrep_gtid_domain_id';
165 Variable_name Value
166 wsrep_gtid_domain_id 1111
167 show variables like '%gtid_binlog_pos%';
168 Variable_name Value
169 gtid_binlog_pos 1111-1-1956
170 connection node_2;
171 node2 GTID
172 show variables like 'wsrep_gtid_domain_id';
173 Variable_name Value
174 wsrep_gtid_domain_id 1111
175 show variables like '%gtid_binlog_pos%';
176 Variable_name Value
177 gtid_binlog_pos 1111-1-1956
178 connection node_3;
179 node3 GTID
180 show variables like 'wsrep_gtid_domain_id';
181 Variable_name Value
182 wsrep_gtid_domain_id 1111
183 show variables like '%gtid_binlog_pos%';
184 Variable_name Value
185 gtid_binlog_pos 1111-1-1956
186 connection node_1;
187 table size in node1
188 SELECT COUNT(*) FROM t1;
189 COUNT(*)
190 1950
191 connection node_2;
192 table size in node2
193 SELECT COUNT(*) FROM t1;
194 COUNT(*)
195 1950
196 connection node_3;
197 table size in node3
198 SELECT COUNT(*) FROM t1;
199 COUNT(*)
200 1950
201 connection node_2;
202 call mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
203 call mtr.add_suppression("Sending JOIN failed: ");
204 call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST");
205 call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration");
206 connection node_3;
207 call mtr.add_suppression("WSREP: Ignoring server id .* for non bootstrap node");
208 call mtr.add_suppression("Sending JOIN failed: ");
209 call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST");
210 call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration");
211 # cleanup
212 connection node_1;
213 call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration");
214 DROP PROCEDURE insert_row;
215 DROP TABLE t1;
216 DROP TABLE t2;
217 DROP TABLE t3;
218 connection node_3;
219 connection node_2;
220 disconnect node_3;
221 disconnect node_2b;
222 disconnect node_1b;
223 disconnect node_1c;