| 1 |
connection node_2; |
| 2 |
connection node_1; |
| 3 |
Setting SST method to mysqldump ... |
| 4 |
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); |
| 5 |
call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); |
| 6 |
connection node_1; |
| 7 |
CREATE USER 'sst'; |
| 8 |
GRANT ALL PRIVILEGES ON *.* TO 'sst'; |
| 9 |
SET GLOBAL wsrep_sst_auth = 'sst:'; |
| 10 |
connection node_2; |
| 11 |
SET GLOBAL wsrep_sst_method = 'mysqldump'; |
| 12 |
connection node_1; |
| 13 |
connection node_2; |
| 14 |
Performing State Transfer on a server that has been temporarily disconnected |
| 15 |
connection node_1; |
| 16 |
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; |
| 17 |
SET AUTOCOMMIT=OFF; |
| 18 |
START TRANSACTION; |
| 19 |
INSERT INTO t1 VALUES (1,'node1_committed_before'); |
| 20 |
INSERT INTO t1 VALUES (2,'node1_committed_before'); |
| 21 |
INSERT INTO t1 VALUES (3,'node1_committed_before'); |
| 22 |
INSERT INTO t1 VALUES (4,'node1_committed_before'); |
| 23 |
INSERT INTO t1 VALUES (5,'node1_committed_before'); |
| 24 |
COMMIT; |
| 25 |
connection node_2; |
| 26 |
SET AUTOCOMMIT=OFF; |
| 27 |
START TRANSACTION; |
| 28 |
INSERT INTO t1 VALUES (6,'node2_committed_before'); |
| 29 |
INSERT INTO t1 VALUES (7,'node2_committed_before'); |
| 30 |
INSERT INTO t1 VALUES (8,'node2_committed_before'); |
| 31 |
INSERT INTO t1 VALUES (9,'node2_committed_before'); |
| 32 |
INSERT INTO t1 VALUES (10,'node2_committed_before'); |
| 33 |
COMMIT; |
| 34 |
Unloading wsrep provider ... |
| 35 |
SET GLOBAL wsrep_cluster_address = ''; |
| 36 |
connection node_1; |
| 37 |
SET AUTOCOMMIT=OFF; |
| 38 |
START TRANSACTION; |
| 39 |
INSERT INTO t1 VALUES (11,'node1_committed_during'); |
| 40 |
INSERT INTO t1 VALUES (12,'node1_committed_during'); |
| 41 |
INSERT INTO t1 VALUES (13,'node1_committed_during'); |
| 42 |
INSERT INTO t1 VALUES (14,'node1_committed_during'); |
| 43 |
INSERT INTO t1 VALUES (15,'node1_committed_during'); |
| 44 |
COMMIT; |
| 45 |
START TRANSACTION; |
| 46 |
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after'); |
| 47 |
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); |
| 48 |
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); |
| 49 |
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); |
| 50 |
INSERT INTO t1 VALUES (20,'node1_to_be_committed_after'); |
| 51 |
connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; |
| 52 |
SET AUTOCOMMIT=OFF; |
| 53 |
START TRANSACTION; |
| 54 |
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); |
| 55 |
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); |
| 56 |
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); |
| 57 |
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); |
| 58 |
INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after'); |
| 59 |
connection node_2; |
| 60 |
Loading wsrep provider ... |
| 61 |
disconnect node_2; |
| 62 |
connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2; |
| 63 |
connection node_2; |
| 64 |
SET AUTOCOMMIT=OFF; |
| 65 |
START TRANSACTION; |
| 66 |
INSERT INTO t1 VALUES (26,'node2_committed_after'); |
| 67 |
INSERT INTO t1 VALUES (27,'node2_committed_after'); |
| 68 |
INSERT INTO t1 VALUES (28,'node2_committed_after'); |
| 69 |
INSERT INTO t1 VALUES (29,'node2_committed_after'); |
| 70 |
INSERT INTO t1 VALUES (30,'node2_committed_after'); |
| 71 |
COMMIT; |
| 72 |
connection node_1; |
| 73 |
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); |
| 74 |
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); |
| 75 |
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); |
| 76 |
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); |
| 77 |
INSERT INTO t1 VALUES (35,'node1_to_be_committed_after'); |
| 78 |
COMMIT; |
| 79 |
SET AUTOCOMMIT=OFF; |
| 80 |
START TRANSACTION; |
| 81 |
INSERT INTO t1 VALUES (36,'node1_committed_after'); |
| 82 |
INSERT INTO t1 VALUES (37,'node1_committed_after'); |
| 83 |
INSERT INTO t1 VALUES (38,'node1_committed_after'); |
| 84 |
INSERT INTO t1 VALUES (39,'node1_committed_after'); |
| 85 |
INSERT INTO t1 VALUES (40,'node1_committed_after'); |
| 86 |
COMMIT; |
| 87 |
connection node_1a_galera_st_disconnect_slave; |
| 88 |
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); |
| 89 |
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); |
| 90 |
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); |
| 91 |
INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after'); |
| 92 |
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after'); |
| 93 |
ROLLBACK; |
| 94 |
SET AUTOCOMMIT=ON; |
| 95 |
SET SESSION wsrep_sync_wait=15; |
| 96 |
SELECT COUNT(*) AS EXPECT_35 FROM t1; |
| 97 |
EXPECT_35 |
| 98 |
35 |
| 99 |
SELECT * FROM t1; |
| 100 |
id f1 |
| 101 |
1 node1_committed_before |
| 102 |
2 node1_committed_before |
| 103 |
3 node1_committed_before |
| 104 |
4 node1_committed_before |
| 105 |
5 node1_committed_before |
| 106 |
6 node2_committed_before |
| 107 |
7 node2_committed_before |
| 108 |
8 node2_committed_before |
| 109 |
9 node2_committed_before |
| 110 |
10 node2_committed_before |
| 111 |
11 node1_committed_during |
| 112 |
12 node1_committed_during |
| 113 |
13 node1_committed_during |
| 114 |
14 node1_committed_during |
| 115 |
15 node1_committed_during |
| 116 |
16 node1_to_be_committed_after |
| 117 |
17 node1_to_be_committed_after |
| 118 |
18 node1_to_be_committed_after |
| 119 |
19 node1_to_be_committed_after |
| 120 |
20 node1_to_be_committed_after |
| 121 |
26 node2_committed_after |
| 122 |
27 node2_committed_after |
| 123 |
28 node2_committed_after |
| 124 |
29 node2_committed_after |
| 125 |
30 node2_committed_after |
| 126 |
31 node1_to_be_committed_after |
| 127 |
32 node1_to_be_committed_after |
| 128 |
33 node1_to_be_committed_after |
| 129 |
34 node1_to_be_committed_after |
| 130 |
35 node1_to_be_committed_after |
| 131 |
36 node1_committed_after |
| 132 |
37 node1_committed_after |
| 133 |
38 node1_committed_after |
| 134 |
39 node1_committed_after |
| 135 |
40 node1_committed_after |
| 136 |
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; |
| 137 |
COUNT(*) = 0 |
| 138 |
1 |
| 139 |
connection node_1; |
| 140 |
SET AUTOCOMMIT=ON; |
| 141 |
SET SESSION wsrep_sync_wait=15; |
| 142 |
SELECT COUNT(*) AS EXPECT_35 FROM t1; |
| 143 |
EXPECT_35 |
| 144 |
35 |
| 145 |
SELECT * FROM t1; |
| 146 |
id f1 |
| 147 |
1 node1_committed_before |
| 148 |
2 node1_committed_before |
| 149 |
3 node1_committed_before |
| 150 |
4 node1_committed_before |
| 151 |
5 node1_committed_before |
| 152 |
6 node2_committed_before |
| 153 |
7 node2_committed_before |
| 154 |
8 node2_committed_before |
| 155 |
9 node2_committed_before |
| 156 |
10 node2_committed_before |
| 157 |
11 node1_committed_during |
| 158 |
12 node1_committed_during |
| 159 |
13 node1_committed_during |
| 160 |
14 node1_committed_during |
| 161 |
15 node1_committed_during |
| 162 |
16 node1_to_be_committed_after |
| 163 |
17 node1_to_be_committed_after |
| 164 |
18 node1_to_be_committed_after |
| 165 |
19 node1_to_be_committed_after |
| 166 |
20 node1_to_be_committed_after |
| 167 |
26 node2_committed_after |
| 168 |
27 node2_committed_after |
| 169 |
28 node2_committed_after |
| 170 |
29 node2_committed_after |
| 171 |
30 node2_committed_after |
| 172 |
31 node1_to_be_committed_after |
| 173 |
32 node1_to_be_committed_after |
| 174 |
33 node1_to_be_committed_after |
| 175 |
34 node1_to_be_committed_after |
| 176 |
35 node1_to_be_committed_after |
| 177 |
36 node1_committed_after |
| 178 |
37 node1_committed_after |
| 179 |
38 node1_committed_after |
| 180 |
39 node1_committed_after |
| 181 |
40 node1_committed_after |
| 182 |
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; |
| 183 |
COUNT(*) = 0 |
| 184 |
1 |
| 185 |
DROP TABLE t1; |
| 186 |
COMMIT; |
| 187 |
Performing State Transfer on a server that has been killed and restarted |
| 188 |
while a DDL was in progress on it |
| 189 |
connection node_1; |
| 190 |
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; |
| 191 |
SET AUTOCOMMIT=OFF; |
| 192 |
START TRANSACTION; |
| 193 |
INSERT INTO t1 VALUES (1,'node1_committed_before'); |
| 194 |
INSERT INTO t1 VALUES (2,'node1_committed_before'); |
| 195 |
INSERT INTO t1 VALUES (3,'node1_committed_before'); |
| 196 |
INSERT INTO t1 VALUES (4,'node1_committed_before'); |
| 197 |
INSERT INTO t1 VALUES (5,'node1_committed_before'); |
| 198 |
connection node_2; |
| 199 |
START TRANSACTION; |
| 200 |
INSERT INTO t1 VALUES (6,'node2_committed_before'); |
| 201 |
INSERT INTO t1 VALUES (7,'node2_committed_before'); |
| 202 |
INSERT INTO t1 VALUES (8,'node2_committed_before'); |
| 203 |
INSERT INTO t1 VALUES (9,'node2_committed_before'); |
| 204 |
INSERT INTO t1 VALUES (10,'node2_committed_before'); |
| 205 |
COMMIT; |
| 206 |
SET GLOBAL debug_dbug = 'd,sync.alter_opened_table'; |
| 207 |
connection node_1; |
| 208 |
ALTER TABLE t1 ADD COLUMN f2 INTEGER; |
| 209 |
connection node_2; |
| 210 |
SET wsrep_sync_wait = 0; |
| 211 |
Killing server ... |
| 212 |
connection node_1; |
| 213 |
SET AUTOCOMMIT=OFF; |
| 214 |
START TRANSACTION; |
| 215 |
INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during'); |
| 216 |
INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during'); |
| 217 |
INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during'); |
| 218 |
INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during'); |
| 219 |
INSERT INTO t1 (id,f1) VALUES (15,'node1_committed_during'); |
| 220 |
COMMIT; |
| 221 |
START TRANSACTION; |
| 222 |
INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after'); |
| 223 |
INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after'); |
| 224 |
INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after'); |
| 225 |
INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after'); |
| 226 |
INSERT INTO t1 (id,f1) VALUES (20,'node1_to_be_committed_after'); |
| 227 |
connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1; |
| 228 |
SET AUTOCOMMIT=OFF; |
| 229 |
START TRANSACTION; |
| 230 |
INSERT INTO t1 (id,f1) VALUES (21,'node1_to_be_rollbacked_after'); |
| 231 |
INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after'); |
| 232 |
INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after'); |
| 233 |
INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after'); |
| 234 |
INSERT INTO t1 (id,f1) VALUES (25,'node1_to_be_rollbacked_after'); |
| 235 |
connection node_2; |
| 236 |
Performing --wsrep-recover ... |
| 237 |
connection node_2; |
| 238 |
Starting server ... |
| 239 |
Using --wsrep-start-position when starting mysqld ... |
| 240 |
SET AUTOCOMMIT=OFF; |
| 241 |
START TRANSACTION; |
| 242 |
INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after'); |
| 243 |
INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after'); |
| 244 |
INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after'); |
| 245 |
INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after'); |
| 246 |
INSERT INTO t1 (id,f1) VALUES (30,'node2_committed_after'); |
| 247 |
COMMIT; |
| 248 |
connection node_1; |
| 249 |
INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after'); |
| 250 |
INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after'); |
| 251 |
INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after'); |
| 252 |
INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after'); |
| 253 |
INSERT INTO t1 (id,f1) VALUES (35,'node1_to_be_committed_after'); |
| 254 |
COMMIT; |
| 255 |
SET AUTOCOMMIT=OFF; |
| 256 |
START TRANSACTION; |
| 257 |
INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after'); |
| 258 |
INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after'); |
| 259 |
INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after'); |
| 260 |
INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after'); |
| 261 |
INSERT INTO t1 (id,f1) VALUES (40,'node1_committed_after'); |
| 262 |
COMMIT; |
| 263 |
connection node_1a_galera_st_kill_slave_ddl; |
| 264 |
INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after'); |
| 265 |
INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after'); |
| 266 |
INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after'); |
| 267 |
INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after'); |
| 268 |
INSERT INTO t1 (id,f1) VALUES (45,'node1_to_be_rollbacked_after'); |
| 269 |
ROLLBACK; |
| 270 |
SET AUTOCOMMIT=ON; |
| 271 |
SET SESSION wsrep_sync_wait=15; |
| 272 |
SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; |
| 273 |
EXPECT_3 |
| 274 |
3 |
| 275 |
SELECT COUNT(*) AS EXPECT_35 FROM t1; |
| 276 |
EXPECT_35 |
| 277 |
35 |
| 278 |
SELECT * FROM t1; |
| 279 |
id f1 f2 |
| 280 |
1 node1_committed_before NULL |
| 281 |
2 node1_committed_before NULL |
| 282 |
3 node1_committed_before NULL |
| 283 |
4 node1_committed_before NULL |
| 284 |
5 node1_committed_before NULL |
| 285 |
6 node2_committed_before NULL |
| 286 |
7 node2_committed_before NULL |
| 287 |
8 node2_committed_before NULL |
| 288 |
9 node2_committed_before NULL |
| 289 |
10 node2_committed_before NULL |
| 290 |
11 node1_committed_during NULL |
| 291 |
12 node1_committed_during NULL |
| 292 |
13 node1_committed_during NULL |
| 293 |
14 node1_committed_during NULL |
| 294 |
15 node1_committed_during NULL |
| 295 |
16 node1_to_be_committed_after NULL |
| 296 |
17 node1_to_be_committed_after NULL |
| 297 |
18 node1_to_be_committed_after NULL |
| 298 |
19 node1_to_be_committed_after NULL |
| 299 |
20 node1_to_be_committed_after NULL |
| 300 |
26 node2_committed_after NULL |
| 301 |
27 node2_committed_after NULL |
| 302 |
28 node2_committed_after NULL |
| 303 |
29 node2_committed_after NULL |
| 304 |
30 node2_committed_after NULL |
| 305 |
31 node1_to_be_committed_after NULL |
| 306 |
32 node1_to_be_committed_after NULL |
| 307 |
33 node1_to_be_committed_after NULL |
| 308 |
34 node1_to_be_committed_after NULL |
| 309 |
35 node1_to_be_committed_after NULL |
| 310 |
36 node1_committed_after NULL |
| 311 |
37 node1_committed_after NULL |
| 312 |
38 node1_committed_after NULL |
| 313 |
39 node1_committed_after NULL |
| 314 |
40 node1_committed_after NULL |
| 315 |
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; |
| 316 |
COUNT(*) = 0 |
| 317 |
1 |
| 318 |
COMMIT; |
| 319 |
connection node_1; |
| 320 |
SET AUTOCOMMIT=ON; |
| 321 |
SET SESSION wsrep_sync_wait=15; |
| 322 |
SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; |
| 323 |
EXPECT_3 |
| 324 |
3 |
| 325 |
SELECT COUNT(*) AS EXPECT_35 FROM t1; |
| 326 |
EXPECT_35 |
| 327 |
35 |
| 328 |
SELECT * FROM t1; |
| 329 |
id f1 f2 |
| 330 |
1 node1_committed_before NULL |
| 331 |
2 node1_committed_before NULL |
| 332 |
3 node1_committed_before NULL |
| 333 |
4 node1_committed_before NULL |
| 334 |
5 node1_committed_before NULL |
| 335 |
6 node2_committed_before NULL |
| 336 |
7 node2_committed_before NULL |
| 337 |
8 node2_committed_before NULL |
| 338 |
9 node2_committed_before NULL |
| 339 |
10 node2_committed_before NULL |
| 340 |
11 node1_committed_during NULL |
| 341 |
12 node1_committed_during NULL |
| 342 |
13 node1_committed_during NULL |
| 343 |
14 node1_committed_during NULL |
| 344 |
15 node1_committed_during NULL |
| 345 |
16 node1_to_be_committed_after NULL |
| 346 |
17 node1_to_be_committed_after NULL |
| 347 |
18 node1_to_be_committed_after NULL |
| 348 |
19 node1_to_be_committed_after NULL |
| 349 |
20 node1_to_be_committed_after NULL |
| 350 |
26 node2_committed_after NULL |
| 351 |
27 node2_committed_after NULL |
| 352 |
28 node2_committed_after NULL |
| 353 |
29 node2_committed_after NULL |
| 354 |
30 node2_committed_after NULL |
| 355 |
31 node1_to_be_committed_after NULL |
| 356 |
32 node1_to_be_committed_after NULL |
| 357 |
33 node1_to_be_committed_after NULL |
| 358 |
34 node1_to_be_committed_after NULL |
| 359 |
35 node1_to_be_committed_after NULL |
| 360 |
36 node1_committed_after NULL |
| 361 |
37 node1_committed_after NULL |
| 362 |
38 node1_committed_after NULL |
| 363 |
39 node1_committed_after NULL |
| 364 |
40 node1_committed_after NULL |
| 365 |
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; |
| 366 |
COUNT(*) = 0 |
| 367 |
1 |
| 368 |
DROP TABLE t1; |
| 369 |
COMMIT; |
| 370 |
SET GLOBAL debug_dbug = $debug_orig; |
| 371 |
connection node_1; |
| 372 |
CALL mtr.add_suppression("Slave SQL: Error 'The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); |
| 373 |
DROP USER sst; |
| 374 |
connection node_2; |
| 375 |
CALL mtr.add_suppression("Slave SQL: Error 'The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement' on query"); |
| 376 |
CALL mtr.add_suppression("InnoDB: Error: Table \"mysql\"\\.\"innodb_index_stats\" not found"); |
| 377 |
CALL mtr.add_suppression("Can't open and lock time zone table"); |
| 378 |
CALL mtr.add_suppression("Can't open and lock privilege tables"); |
| 379 |
CALL mtr.add_suppression("Info table is not ready to be used"); |
| 380 |
CALL mtr.add_suppression("Native table .* has the wrong structure"); |
| 381 |
CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); |