Debian Codegraph @

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

raw
1 #
2 # Test WAN replication and the gmcast.segment functionality.
3 # The galera_wan.cnf file partitions 4 Galera nodes into 3 WAN segments
4 #
5 # We can not test any of the actual WAN optimizations from inside MTR and no
6 # status variables are provided. So we only check that simple replication works.
7 #
8
9 --source include/galera_cluster.inc
10 --source include/have_innodb.inc
11 --source include/force_restart.inc
12
13 CALL mtr.add_suppression("WSREP: Stray state UUID msg: ");
14 CALL mtr.add_suppression("WSREP: .*Sending JOIN failed: ");
15 CALL mtr.add_suppression("WSREP: .*sending install message failed: (Transport endpoint|Socket) is not connected");
16 CALL mtr.add_suppression("WSREP: .*There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
17
18 --let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
19 --source include/wait_condition.inc
20 SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
21
22 --connection node_1
23 CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=INNODB;
24
25 --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
26 --connection node_3
27 SELECT COUNT(*) AS EXPECT_0 FROM t1;
28 INSERT INTO t1 VALUES (1);
29 SELECT COUNT(*) AS EXPECT_1 FROM t1;
30
31 --connection node_2
32 SELECT COUNT(*) AS EXPECT_1 FROM t1;
33
34 --connection node_1
35 SELECT COUNT(*) AS EXPECT_1 FROM t1;
36
37 --connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
38 --connection node_4
39 SELECT COUNT(*) AS EXPECT_1 FROM t1;
40
41 SELECT VARIABLE_VALUE LIKE '%gmcast.segment = 3%' FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_provider_options';
42 DROP TABLE t1;
43
44 --connection node_1
45 call mtr.add_suppression("WSREP: read_completion_condition");
46 call mtr.add_suppression("WSREP: read_handler");
47
48 --disconnect node_3
49 --disconnect node_4
50
51 --source include/galera_end.inc