| 1 |
connection node_2; |
| 2 |
connection node_1; |
| 3 |
connection node_1; |
| 4 |
connection node_2; |
| 5 |
Setting SST method to mysqldump ... |
| 6 |
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); |
| 7 |
call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); |
| 8 |
connection node_1; |
| 9 |
CREATE USER 'sst'; |
| 10 |
GRANT ALL PRIVILEGES ON *.* TO 'sst'; |
| 11 |
SET GLOBAL wsrep_sst_auth = 'sst:'; |
| 12 |
connection node_2; |
| 13 |
SET GLOBAL wsrep_sst_method = 'mysqldump'; |
| 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 shut down cleanly and restarted |
| 188 |
connection node_1; |
| 189 |
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; |
| 190 |
SET AUTOCOMMIT=OFF; |
| 191 |
START TRANSACTION; |
| 192 |
INSERT INTO t1 VALUES (1,'node1_committed_before'); |
| 193 |
INSERT INTO t1 VALUES (2,'node1_committed_before'); |
| 194 |
INSERT INTO t1 VALUES (3,'node1_committed_before'); |
| 195 |
INSERT INTO t1 VALUES (4,'node1_committed_before'); |
| 196 |
INSERT INTO t1 VALUES (5,'node1_committed_before'); |
| 197 |
COMMIT; |
| 198 |
connection node_2; |
| 199 |
SET AUTOCOMMIT=OFF; |
| 200 |
START TRANSACTION; |
| 201 |
INSERT INTO t1 VALUES (6,'node2_committed_before'); |
| 202 |
INSERT INTO t1 VALUES (7,'node2_committed_before'); |
| 203 |
INSERT INTO t1 VALUES (8,'node2_committed_before'); |
| 204 |
INSERT INTO t1 VALUES (9,'node2_committed_before'); |
| 205 |
INSERT INTO t1 VALUES (10,'node2_committed_before'); |
| 206 |
COMMIT; |
| 207 |
Shutting down server ... |
| 208 |
connection node_1; |
| 209 |
SET AUTOCOMMIT=OFF; |
| 210 |
START TRANSACTION; |
| 211 |
INSERT INTO t1 VALUES (11,'node1_committed_during'); |
| 212 |
INSERT INTO t1 VALUES (12,'node1_committed_during'); |
| 213 |
INSERT INTO t1 VALUES (13,'node1_committed_during'); |
| 214 |
INSERT INTO t1 VALUES (14,'node1_committed_during'); |
| 215 |
INSERT INTO t1 VALUES (15,'node1_committed_during'); |
| 216 |
COMMIT; |
| 217 |
START TRANSACTION; |
| 218 |
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after'); |
| 219 |
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); |
| 220 |
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); |
| 221 |
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); |
| 222 |
INSERT INTO t1 VALUES (20,'node1_to_be_committed_after'); |
| 223 |
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; |
| 224 |
SET AUTOCOMMIT=OFF; |
| 225 |
START TRANSACTION; |
| 226 |
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); |
| 227 |
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); |
| 228 |
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); |
| 229 |
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); |
| 230 |
INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after'); |
| 231 |
connection node_2; |
| 232 |
Starting server ... |
| 233 |
SET AUTOCOMMIT=OFF; |
| 234 |
START TRANSACTION; |
| 235 |
INSERT INTO t1 VALUES (26,'node2_committed_after'); |
| 236 |
INSERT INTO t1 VALUES (27,'node2_committed_after'); |
| 237 |
INSERT INTO t1 VALUES (28,'node2_committed_after'); |
| 238 |
INSERT INTO t1 VALUES (29,'node2_committed_after'); |
| 239 |
INSERT INTO t1 VALUES (30,'node2_committed_after'); |
| 240 |
COMMIT; |
| 241 |
connection node_1; |
| 242 |
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); |
| 243 |
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); |
| 244 |
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); |
| 245 |
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); |
| 246 |
INSERT INTO t1 VALUES (35,'node1_to_be_committed_after'); |
| 247 |
COMMIT; |
| 248 |
SET AUTOCOMMIT=OFF; |
| 249 |
START TRANSACTION; |
| 250 |
INSERT INTO t1 VALUES (36,'node1_committed_after'); |
| 251 |
INSERT INTO t1 VALUES (37,'node1_committed_after'); |
| 252 |
INSERT INTO t1 VALUES (38,'node1_committed_after'); |
| 253 |
INSERT INTO t1 VALUES (39,'node1_committed_after'); |
| 254 |
INSERT INTO t1 VALUES (40,'node1_committed_after'); |
| 255 |
COMMIT; |
| 256 |
connection node_1a_galera_st_shutdown_slave; |
| 257 |
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); |
| 258 |
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); |
| 259 |
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); |
| 260 |
INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after'); |
| 261 |
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after'); |
| 262 |
ROLLBACK; |
| 263 |
SET AUTOCOMMIT=ON; |
| 264 |
SET SESSION wsrep_sync_wait=15; |
| 265 |
SELECT COUNT(*) AS EXPECT_15 FROM t1; |
| 266 |
EXPECT_15 |
| 267 |
35 |
| 268 |
SELECT * from t1; |
| 269 |
id f1 |
| 270 |
1 node1_committed_before |
| 271 |
2 node1_committed_before |
| 272 |
3 node1_committed_before |
| 273 |
4 node1_committed_before |
| 274 |
5 node1_committed_before |
| 275 |
6 node2_committed_before |
| 276 |
7 node2_committed_before |
| 277 |
8 node2_committed_before |
| 278 |
9 node2_committed_before |
| 279 |
10 node2_committed_before |
| 280 |
11 node1_committed_during |
| 281 |
12 node1_committed_during |
| 282 |
13 node1_committed_during |
| 283 |
14 node1_committed_during |
| 284 |
15 node1_committed_during |
| 285 |
16 node1_to_be_committed_after |
| 286 |
17 node1_to_be_committed_after |
| 287 |
18 node1_to_be_committed_after |
| 288 |
19 node1_to_be_committed_after |
| 289 |
20 node1_to_be_committed_after |
| 290 |
26 node2_committed_after |
| 291 |
27 node2_committed_after |
| 292 |
28 node2_committed_after |
| 293 |
29 node2_committed_after |
| 294 |
30 node2_committed_after |
| 295 |
31 node1_to_be_committed_after |
| 296 |
32 node1_to_be_committed_after |
| 297 |
33 node1_to_be_committed_after |
| 298 |
34 node1_to_be_committed_after |
| 299 |
35 node1_to_be_committed_after |
| 300 |
36 node1_committed_after |
| 301 |
37 node1_committed_after |
| 302 |
38 node1_committed_after |
| 303 |
39 node1_committed_after |
| 304 |
40 node1_committed_after |
| 305 |
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; |
| 306 |
COUNT(*) = 0 |
| 307 |
1 |
| 308 |
COMMIT; |
| 309 |
connection node_1; |
| 310 |
SET AUTOCOMMIT=ON; |
| 311 |
SET SESSION wsrep_sync_wait=15; |
| 312 |
SELECT COUNT(*) AS EXPECT_15 FROM t1; |
| 313 |
EXPECT_15 |
| 314 |
35 |
| 315 |
SELECT * from t1; |
| 316 |
id f1 |
| 317 |
1 node1_committed_before |
| 318 |
2 node1_committed_before |
| 319 |
3 node1_committed_before |
| 320 |
4 node1_committed_before |
| 321 |
5 node1_committed_before |
| 322 |
6 node2_committed_before |
| 323 |
7 node2_committed_before |
| 324 |
8 node2_committed_before |
| 325 |
9 node2_committed_before |
| 326 |
10 node2_committed_before |
| 327 |
11 node1_committed_during |
| 328 |
12 node1_committed_during |
| 329 |
13 node1_committed_during |
| 330 |
14 node1_committed_during |
| 331 |
15 node1_committed_during |
| 332 |
16 node1_to_be_committed_after |
| 333 |
17 node1_to_be_committed_after |
| 334 |
18 node1_to_be_committed_after |
| 335 |
19 node1_to_be_committed_after |
| 336 |
20 node1_to_be_committed_after |
| 337 |
26 node2_committed_after |
| 338 |
27 node2_committed_after |
| 339 |
28 node2_committed_after |
| 340 |
29 node2_committed_after |
| 341 |
30 node2_committed_after |
| 342 |
31 node1_to_be_committed_after |
| 343 |
32 node1_to_be_committed_after |
| 344 |
33 node1_to_be_committed_after |
| 345 |
34 node1_to_be_committed_after |
| 346 |
35 node1_to_be_committed_after |
| 347 |
36 node1_committed_after |
| 348 |
37 node1_committed_after |
| 349 |
38 node1_committed_after |
| 350 |
39 node1_committed_after |
| 351 |
40 node1_committed_after |
| 352 |
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; |
| 353 |
COUNT(*) = 0 |
| 354 |
1 |
| 355 |
DROP TABLE t1; |
| 356 |
COMMIT; |
| 357 |
Performing State Transfer on a server that starts from a clean var directory |
| 358 |
This is accomplished by shutting down node #2 and removing its var directory before restarting it |
| 359 |
connection node_1; |
| 360 |
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; |
| 361 |
SET AUTOCOMMIT=OFF; |
| 362 |
START TRANSACTION; |
| 363 |
INSERT INTO t1 VALUES (1,'node1_committed_before'); |
| 364 |
INSERT INTO t1 VALUES (2,'node1_committed_before'); |
| 365 |
INSERT INTO t1 VALUES (3,'node1_committed_before'); |
| 366 |
INSERT INTO t1 VALUES (4,'node1_committed_before'); |
| 367 |
INSERT INTO t1 VALUES (5,'node1_committed_before'); |
| 368 |
COMMIT; |
| 369 |
connection node_2; |
| 370 |
SET AUTOCOMMIT=OFF; |
| 371 |
START TRANSACTION; |
| 372 |
INSERT INTO t1 VALUES (6,'node2_committed_before'); |
| 373 |
INSERT INTO t1 VALUES (7,'node2_committed_before'); |
| 374 |
INSERT INTO t1 VALUES (8,'node2_committed_before'); |
| 375 |
INSERT INTO t1 VALUES (9,'node2_committed_before'); |
| 376 |
INSERT INTO t1 VALUES (10,'node2_committed_before'); |
| 377 |
COMMIT; |
| 378 |
Shutting down server ... |
| 379 |
connection node_1; |
| 380 |
Cleaning var directory ... |
| 381 |
SET AUTOCOMMIT=OFF; |
| 382 |
START TRANSACTION; |
| 383 |
INSERT INTO t1 VALUES (11,'node1_committed_during'); |
| 384 |
INSERT INTO t1 VALUES (12,'node1_committed_during'); |
| 385 |
INSERT INTO t1 VALUES (13,'node1_committed_during'); |
| 386 |
INSERT INTO t1 VALUES (14,'node1_committed_during'); |
| 387 |
INSERT INTO t1 VALUES (15,'node1_committed_during'); |
| 388 |
COMMIT; |
| 389 |
START TRANSACTION; |
| 390 |
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after'); |
| 391 |
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); |
| 392 |
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); |
| 393 |
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); |
| 394 |
INSERT INTO t1 VALUES (20,'node1_to_be_committed_after'); |
| 395 |
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; |
| 396 |
SET AUTOCOMMIT=OFF; |
| 397 |
START TRANSACTION; |
| 398 |
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); |
| 399 |
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); |
| 400 |
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); |
| 401 |
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); |
| 402 |
INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after'); |
| 403 |
connection node_2; |
| 404 |
Starting server ... |
| 405 |
SET AUTOCOMMIT=OFF; |
| 406 |
START TRANSACTION; |
| 407 |
INSERT INTO t1 VALUES (26,'node2_committed_after'); |
| 408 |
INSERT INTO t1 VALUES (27,'node2_committed_after'); |
| 409 |
INSERT INTO t1 VALUES (28,'node2_committed_after'); |
| 410 |
INSERT INTO t1 VALUES (29,'node2_committed_after'); |
| 411 |
INSERT INTO t1 VALUES (30,'node2_committed_after'); |
| 412 |
COMMIT; |
| 413 |
connection node_1; |
| 414 |
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); |
| 415 |
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); |
| 416 |
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); |
| 417 |
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); |
| 418 |
INSERT INTO t1 VALUES (35,'node1_to_be_committed_after'); |
| 419 |
COMMIT; |
| 420 |
SET AUTOCOMMIT=OFF; |
| 421 |
START TRANSACTION; |
| 422 |
INSERT INTO t1 VALUES (36,'node1_committed_after'); |
| 423 |
INSERT INTO t1 VALUES (37,'node1_committed_after'); |
| 424 |
INSERT INTO t1 VALUES (38,'node1_committed_after'); |
| 425 |
INSERT INTO t1 VALUES (39,'node1_committed_after'); |
| 426 |
INSERT INTO t1 VALUES (40,'node1_committed_after'); |
| 427 |
COMMIT; |
| 428 |
connection node_1a_galera_st_clean_slave; |
| 429 |
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); |
| 430 |
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); |
| 431 |
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); |
| 432 |
INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after'); |
| 433 |
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after'); |
| 434 |
ROLLBACK; |
| 435 |
SET AUTOCOMMIT=ON; |
| 436 |
SET SESSION wsrep_sync_wait=15; |
| 437 |
SELECT COUNT(*) AS EXPECT_35 FROM t1; |
| 438 |
EXPECT_35 |
| 439 |
35 |
| 440 |
SELECT * from t1; |
| 441 |
id f1 |
| 442 |
1 node1_committed_before |
| 443 |
2 node1_committed_before |
| 444 |
3 node1_committed_before |
| 445 |
4 node1_committed_before |
| 446 |
5 node1_committed_before |
| 447 |
6 node2_committed_before |
| 448 |
7 node2_committed_before |
| 449 |
8 node2_committed_before |
| 450 |
9 node2_committed_before |
| 451 |
10 node2_committed_before |
| 452 |
11 node1_committed_during |
| 453 |
12 node1_committed_during |
| 454 |
13 node1_committed_during |
| 455 |
14 node1_committed_during |
| 456 |
15 node1_committed_during |
| 457 |
16 node1_to_be_committed_after |
| 458 |
17 node1_to_be_committed_after |
| 459 |
18 node1_to_be_committed_after |
| 460 |
19 node1_to_be_committed_after |
| 461 |
20 node1_to_be_committed_after |
| 462 |
26 node2_committed_after |
| 463 |
27 node2_committed_after |
| 464 |
28 node2_committed_after |
| 465 |
29 node2_committed_after |
| 466 |
30 node2_committed_after |
| 467 |
31 node1_to_be_committed_after |
| 468 |
32 node1_to_be_committed_after |
| 469 |
33 node1_to_be_committed_after |
| 470 |
34 node1_to_be_committed_after |
| 471 |
35 node1_to_be_committed_after |
| 472 |
36 node1_committed_after |
| 473 |
37 node1_committed_after |
| 474 |
38 node1_committed_after |
| 475 |
39 node1_committed_after |
| 476 |
40 node1_committed_after |
| 477 |
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; |
| 478 |
COUNT(*) = 0 |
| 479 |
1 |
| 480 |
COMMIT; |
| 481 |
connection node_1; |
| 482 |
SET AUTOCOMMIT=ON; |
| 483 |
SET SESSION wsrep_sync_wait=15; |
| 484 |
SELECT COUNT(*) AS EXPECT_35 FROM t1; |
| 485 |
EXPECT_35 |
| 486 |
35 |
| 487 |
SELECT * from t1; |
| 488 |
id f1 |
| 489 |
1 node1_committed_before |
| 490 |
2 node1_committed_before |
| 491 |
3 node1_committed_before |
| 492 |
4 node1_committed_before |
| 493 |
5 node1_committed_before |
| 494 |
6 node2_committed_before |
| 495 |
7 node2_committed_before |
| 496 |
8 node2_committed_before |
| 497 |
9 node2_committed_before |
| 498 |
10 node2_committed_before |
| 499 |
11 node1_committed_during |
| 500 |
12 node1_committed_during |
| 501 |
13 node1_committed_during |
| 502 |
14 node1_committed_during |
| 503 |
15 node1_committed_during |
| 504 |
16 node1_to_be_committed_after |
| 505 |
17 node1_to_be_committed_after |
| 506 |
18 node1_to_be_committed_after |
| 507 |
19 node1_to_be_committed_after |
| 508 |
20 node1_to_be_committed_after |
| 509 |
26 node2_committed_after |
| 510 |
27 node2_committed_after |
| 511 |
28 node2_committed_after |
| 512 |
29 node2_committed_after |
| 513 |
30 node2_committed_after |
| 514 |
31 node1_to_be_committed_after |
| 515 |
32 node1_to_be_committed_after |
| 516 |
33 node1_to_be_committed_after |
| 517 |
34 node1_to_be_committed_after |
| 518 |
35 node1_to_be_committed_after |
| 519 |
36 node1_committed_after |
| 520 |
37 node1_committed_after |
| 521 |
38 node1_committed_after |
| 522 |
39 node1_committed_after |
| 523 |
40 node1_committed_after |
| 524 |
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; |
| 525 |
COUNT(*) = 0 |
| 526 |
1 |
| 527 |
DROP TABLE t1; |
| 528 |
COMMIT; |
| 529 |
Performing State Transfer on a server that has been killed and restarted |
| 530 |
connection node_1; |
| 531 |
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB; |
| 532 |
SET AUTOCOMMIT=OFF; |
| 533 |
START TRANSACTION; |
| 534 |
INSERT INTO t1 VALUES (1,'node1_committed_before'); |
| 535 |
INSERT INTO t1 VALUES (2,'node1_committed_before'); |
| 536 |
INSERT INTO t1 VALUES (3,'node1_committed_before'); |
| 537 |
INSERT INTO t1 VALUES (4,'node1_committed_before'); |
| 538 |
INSERT INTO t1 VALUES (5,'node1_committed_before'); |
| 539 |
COMMIT; |
| 540 |
connection node_2; |
| 541 |
SET AUTOCOMMIT=OFF; |
| 542 |
START TRANSACTION; |
| 543 |
INSERT INTO t1 VALUES (6,'node2_committed_before'); |
| 544 |
INSERT INTO t1 VALUES (7,'node2_committed_before'); |
| 545 |
INSERT INTO t1 VALUES (8,'node2_committed_before'); |
| 546 |
INSERT INTO t1 VALUES (9,'node2_committed_before'); |
| 547 |
INSERT INTO t1 VALUES (10,'node2_committed_before'); |
| 548 |
COMMIT; |
| 549 |
Killing server ... |
| 550 |
connection node_1; |
| 551 |
SET AUTOCOMMIT=OFF; |
| 552 |
START TRANSACTION; |
| 553 |
INSERT INTO t1 VALUES (11,'node1_committed_during'); |
| 554 |
INSERT INTO t1 VALUES (12,'node1_committed_during'); |
| 555 |
INSERT INTO t1 VALUES (13,'node1_committed_during'); |
| 556 |
INSERT INTO t1 VALUES (14,'node1_committed_during'); |
| 557 |
INSERT INTO t1 VALUES (15,'node1_committed_during'); |
| 558 |
COMMIT; |
| 559 |
START TRANSACTION; |
| 560 |
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after'); |
| 561 |
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after'); |
| 562 |
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after'); |
| 563 |
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after'); |
| 564 |
INSERT INTO t1 VALUES (20,'node1_to_be_committed_after'); |
| 565 |
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1; |
| 566 |
SET AUTOCOMMIT=OFF; |
| 567 |
START TRANSACTION; |
| 568 |
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after'); |
| 569 |
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after'); |
| 570 |
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after'); |
| 571 |
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after'); |
| 572 |
INSERT INTO t1 VALUES (25,'node1_to_be_rollbacked_after'); |
| 573 |
connection node_2; |
| 574 |
Performing --wsrep-recover ... |
| 575 |
Starting server ... |
| 576 |
Using --wsrep-start-position when starting mysqld ... |
| 577 |
SET AUTOCOMMIT=OFF; |
| 578 |
START TRANSACTION; |
| 579 |
INSERT INTO t1 VALUES (26,'node2_committed_after'); |
| 580 |
INSERT INTO t1 VALUES (27,'node2_committed_after'); |
| 581 |
INSERT INTO t1 VALUES (28,'node2_committed_after'); |
| 582 |
INSERT INTO t1 VALUES (29,'node2_committed_after'); |
| 583 |
INSERT INTO t1 VALUES (30,'node2_committed_after'); |
| 584 |
COMMIT; |
| 585 |
connection node_1; |
| 586 |
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after'); |
| 587 |
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after'); |
| 588 |
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after'); |
| 589 |
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after'); |
| 590 |
INSERT INTO t1 VALUES (35,'node1_to_be_committed_after'); |
| 591 |
COMMIT; |
| 592 |
SET AUTOCOMMIT=OFF; |
| 593 |
START TRANSACTION; |
| 594 |
INSERT INTO t1 VALUES (36,'node1_committed_after'); |
| 595 |
INSERT INTO t1 VALUES (37,'node1_committed_after'); |
| 596 |
INSERT INTO t1 VALUES (38,'node1_committed_after'); |
| 597 |
INSERT INTO t1 VALUES (39,'node1_committed_after'); |
| 598 |
INSERT INTO t1 VALUES (40,'node1_committed_after'); |
| 599 |
COMMIT; |
| 600 |
connection node_1a_galera_st_kill_slave; |
| 601 |
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after'); |
| 602 |
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after'); |
| 603 |
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after'); |
| 604 |
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after'); |
| 605 |
INSERT INTO t1 VALUES (46,'node1_to_be_rollbacked_after'); |
| 606 |
ROLLBACK; |
| 607 |
SET AUTOCOMMIT=ON; |
| 608 |
SET SESSION wsrep_sync_wait=15; |
| 609 |
SELECT COUNT(*) AS EXPECT_35 FROM t1; |
| 610 |
EXPECT_35 |
| 611 |
35 |
| 612 |
SELECT * FROM t1; |
| 613 |
id f1 |
| 614 |
1 node1_committed_before |
| 615 |
2 node1_committed_before |
| 616 |
3 node1_committed_before |
| 617 |
4 node1_committed_before |
| 618 |
5 node1_committed_before |
| 619 |
6 node2_committed_before |
| 620 |
7 node2_committed_before |
| 621 |
8 node2_committed_before |
| 622 |
9 node2_committed_before |
| 623 |
10 node2_committed_before |
| 624 |
11 node1_committed_during |
| 625 |
12 node1_committed_during |
| 626 |
13 node1_committed_during |
| 627 |
14 node1_committed_during |
| 628 |
15 node1_committed_during |
| 629 |
16 node1_to_be_committed_after |
| 630 |
17 node1_to_be_committed_after |
| 631 |
18 node1_to_be_committed_after |
| 632 |
19 node1_to_be_committed_after |
| 633 |
20 node1_to_be_committed_after |
| 634 |
26 node2_committed_after |
| 635 |
27 node2_committed_after |
| 636 |
28 node2_committed_after |
| 637 |
29 node2_committed_after |
| 638 |
30 node2_committed_after |
| 639 |
31 node1_to_be_committed_after |
| 640 |
32 node1_to_be_committed_after |
| 641 |
33 node1_to_be_committed_after |
| 642 |
34 node1_to_be_committed_after |
| 643 |
35 node1_to_be_committed_after |
| 644 |
36 node1_committed_after |
| 645 |
37 node1_committed_after |
| 646 |
38 node1_committed_after |
| 647 |
39 node1_committed_after |
| 648 |
40 node1_committed_after |
| 649 |
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; |
| 650 |
COUNT(*) = 0 |
| 651 |
1 |
| 652 |
COMMIT; |
| 653 |
connection node_1; |
| 654 |
SET AUTOCOMMIT=ON; |
| 655 |
SET SESSION wsrep_sync_wait=15; |
| 656 |
SELECT COUNT(*) AS EXPECT_35 FROM t1; |
| 657 |
EXPECT_35 |
| 658 |
35 |
| 659 |
SELECT * FROM t1; |
| 660 |
id f1 |
| 661 |
1 node1_committed_before |
| 662 |
2 node1_committed_before |
| 663 |
3 node1_committed_before |
| 664 |
4 node1_committed_before |
| 665 |
5 node1_committed_before |
| 666 |
6 node2_committed_before |
| 667 |
7 node2_committed_before |
| 668 |
8 node2_committed_before |
| 669 |
9 node2_committed_before |
| 670 |
10 node2_committed_before |
| 671 |
11 node1_committed_during |
| 672 |
12 node1_committed_during |
| 673 |
13 node1_committed_during |
| 674 |
14 node1_committed_during |
| 675 |
15 node1_committed_during |
| 676 |
16 node1_to_be_committed_after |
| 677 |
17 node1_to_be_committed_after |
| 678 |
18 node1_to_be_committed_after |
| 679 |
19 node1_to_be_committed_after |
| 680 |
20 node1_to_be_committed_after |
| 681 |
26 node2_committed_after |
| 682 |
27 node2_committed_after |
| 683 |
28 node2_committed_after |
| 684 |
29 node2_committed_after |
| 685 |
30 node2_committed_after |
| 686 |
31 node1_to_be_committed_after |
| 687 |
32 node1_to_be_committed_after |
| 688 |
33 node1_to_be_committed_after |
| 689 |
34 node1_to_be_committed_after |
| 690 |
35 node1_to_be_committed_after |
| 691 |
36 node1_committed_after |
| 692 |
37 node1_committed_after |
| 693 |
38 node1_committed_after |
| 694 |
39 node1_committed_after |
| 695 |
40 node1_committed_after |
| 696 |
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; |
| 697 |
COUNT(*) = 0 |
| 698 |
1 |
| 699 |
DROP TABLE t1; |
| 700 |
COMMIT; |
| 701 |
connection node_2; |
| 702 |
connection node_1; |
| 703 |
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"); |
| 704 |
DROP USER sst; |
| 705 |
connection node_2; |
| 706 |
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"); |
| 707 |
CALL mtr.add_suppression("InnoDB: Error: Table \"mysql\"\\.\"innodb_index_stats\" not found"); |
| 708 |
CALL mtr.add_suppression("Can't open and lock time zone table"); |
| 709 |
CALL mtr.add_suppression("Can't open and lock privilege tables"); |
| 710 |
CALL mtr.add_suppression("Info table is not ready to be used"); |
| 711 |
CALL mtr.add_suppression("Native table .* has the wrong structure"); |
| 712 |
CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); |
| 713 |
SET GLOBAL general_log = ON; |
| 714 |
SET GLOBAL slow_query_log = ON; |