Debian Codegraph @

mysql-test/suite/galera/t/galera_gcache_recover.test

raw
1 #
2 # Kill entire cluster while gcache.recover=yes. Expect that node #2 will rejoin using IST
3 #
4
5 --source include/galera_cluster.inc
6 --source include/have_innodb.inc
7 --source include/big_test.inc
8
9 CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
10 INSERT INTO t1 VALUES (1);
11 SET SESSION wsrep_sync_wait = 0;
12
13 --connection node_2
14 --let $wait_condition = SELECT COUNT(*) > 0 FROM t1;
15 --source include/wait_condition.inc
16
17 SET SESSION wsrep_sync_wait = 0;
18 --source include/kill_galera.inc
19
20 --connection node_1
21 --let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
22 --source include/wait_condition.inc
23
24 INSERT INTO t1 VALUES (2);
25
26 --source include/kill_galera.inc
27
28 --sleep 1
29
30 --connection node_1
31 --let $galera_wsrep_recover_server_id=1
32 --source suite/galera/include/galera_wsrep_recover.inc
33
34 --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
35 --source include/start_mysqld.inc
36
37 INSERT INTO t1 VALUES (3);
38
39 --connection node_2
40 --let $galera_wsrep_recover_server_id=2
41 --source suite/galera/include/galera_wsrep_recover.inc
42
43 --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
44 --source include/start_mysqld.inc
45
46 --connection node_1
47 --source include/wait_until_connected_again.inc
48 --source include/galera_wait_ready.inc
49 --let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
50
51 --let $diff_servers = 1 2
52 --source include/diff_servers.inc
53
54 --connection node_1
55 # Warning happens when the cluster is started for the first time
56 CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
57
58 --connection node_2
59 CALL mtr.add_suppression("Skipped GCache ring buffer recovery");
60
61 DROP TABLE t1;