Debian Codegraph @

mysql-test/suite/galera_3nodes_sr/t/galera_sr_join_slave.test

raw
1 #
2 # This test kills the slave before a Streaming Replication transaction has started
3 # and restarts it when the transaction is already in progress. IST should
4 # bring the slave up to date so that it can receive the complete transaction.
5 #
6
7 --source include/galera_cluster.inc
8 --source include/have_innodb.inc
9
10 --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
11 --connection node_1
12
13 # Save original auto_increment_offset values.
14 --let $node_1=node_1
15 --let $node_2=node_2
16 --let $node_3=node_3
17 --source ../galera/include/auto_increment_offset_save.inc
18
19 CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
20
21 --connection node_2
22 --source include/shutdown_mysqld.inc
23
24 --connection node_1
25 --let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
26 --source include/wait_condition.inc
27
28 --let $wsrep_trx_fragment_size_orig = `SELECT @@wsrep_trx_fragment_size`
29 SET SESSION wsrep_trx_fragment_size = 1;
30 SET AUTOCOMMIT=OFF;
31 START TRANSACTION;
32
33 INSERT INTO t1 VALUES (1);
34 INSERT INTO t1 VALUES (2);
35 INSERT INTO t1 VALUES (3);
36 INSERT INTO t1 VALUES (4);
37 INSERT INTO t1 VALUES (5);
38
39 --connection node_2
40 --source include/start_mysqld.inc
41
42 --connection node_1
43 INSERT INTO t1 VALUES (6);
44 INSERT INTO t1 VALUES (7);
45 INSERT INTO t1 VALUES (8);
46 INSERT INTO t1 VALUES (9);
47 INSERT INTO t1 VALUES (10);
48 COMMIT;
49 SELECT COUNT(*) = 10 FROM t1;
50
51 --connection node_2
52 SELECT COUNT(*) = 10 FROM t1;
53
54 --connection node_3
55 SELECT COUNT(*) = 10 FROM t1;
56
57 --connection node_1
58 DROP TABLE t1;
59
60 --source ../galera/include/auto_increment_offset_restore.inc