| 1 |
# |
| 2 |
# Kill entire cluster during SR while pc.bootstrap is in effect |
| 3 |
# after restart, confirm that the mysql.wsrep_streaming_log table is empty |
| 4 |
# |
| 5 |
|
| 6 |
--source include/galera_cluster.inc |
| 7 |
--source include/big_test.inc |
| 8 |
|
| 9 |
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; |
| 10 |
SET SESSION wsrep_trx_fragment_size = 1; |
| 11 |
SET AUTOCOMMIT=OFF; |
| 12 |
START TRANSACTION; |
| 13 |
|
| 14 |
INSERT INTO t1 VALUES (1); |
| 15 |
INSERT INTO t1 VALUES (2); |
| 16 |
INSERT INTO t1 VALUES (3); |
| 17 |
INSERT INTO t1 VALUES (4); |
| 18 |
INSERT INTO t1 VALUES (5); |
| 19 |
|
| 20 |
--connection node_2 |
| 21 |
--let $wait_condition = SELECT COUNT(*) > 0 FROM mysql.wsrep_streaming_log; |
| 22 |
--source include/wait_condition.inc |
| 23 |
|
| 24 |
--source include/kill_galera.inc |
| 25 |
--connection node_1 |
| 26 |
--source include/kill_galera.inc |
| 27 |
|
| 28 |
--sleep 1 |
| 29 |
|
| 30 |
# Bootstrap the cluster from scratch |
| 31 |
|
| 32 |
--connection node_1 |
| 33 |
--remove_file $MYSQLTEST_VARDIR/mysqld.1/data/grastate.dat |
| 34 |
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect |
| 35 |
--source include/start_mysqld.inc |
| 36 |
|
| 37 |
--connection node_2 |
| 38 |
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect |
| 39 |
--source include/start_mysqld.inc |
| 40 |
|
| 41 |
--connection node_1 |
| 42 |
--source include/wait_until_connected_again.inc |
| 43 |
--source include/galera_wait_ready.inc |
| 44 |
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; |
| 45 |
|
| 46 |
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; |
| 47 |
|
| 48 |
--connection node_2 |
| 49 |
SELECT COUNT(*) = 0 FROM t1; |
| 50 |
SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; |
| 51 |
|
| 52 |
DROP TABLE t1; |