Debian Codegraph @

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

raw
1 #
2 # Test pc.ignore_sb=true wsrep_provider option . Killing one node should leave the other running.
3 #
4
5 --source include/galera_cluster.inc
6 --source include/have_innodb.inc
7
8 # Save original auto_increment_offset values.
9 --let $node_1=node_1
10 --let $node_2=node_2
11 --source include/auto_increment_offset_save.inc
12
13 --connection node_1
14 SET @wsrep_cluster_address_orig = @@GLOBAL.wsrep_cluster_address;
15 SET @wsrep_provider_options_orig = @@GLOBAL.wsrep_provider_options;
16
17 --let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
18 --source include/wait_condition.inc
19
20 SET GLOBAL wsrep_provider_options ='pc.ignore_sb=true';
21
22 --connection node_2
23 --source include/kill_galera.inc
24
25 --connection node_1
26 --let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
27 --source include/wait_condition.inc
28
29 CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
30 INSERT INTO t1 VALUES (1);
31 DROP TABLE t1;
32
33 SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
34 SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
35
36 # Reset the master and restart the slave so that post-test checks can run
37
38 SET GLOBAL wsrep_cluster_address = '';
39 SET GLOBAL wsrep_cluster_address = @wsrep_cluster_address_orig;
40
41 --connection node_2
42 --source include/start_mysqld.inc
43
44
45 --connection node_1
46 --let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
47 --source include/wait_condition.inc
48
49 SET GLOBAL wsrep_provider_options = @wsrep_provider_options_orig;
50
51 # Restore original auto_increment_offset values.
52 --source include/auto_increment_offset_restore.inc
53
54 --source include/galera_end.inc