Debian Codegraph @

mysql-test/suite/galera/t/galera_log_bin.inc

raw
1 --source include/galera_cluster.inc
2 --source include/force_restart.inc
3
4 --connection node_2
5 set global wsrep_on=OFF;
6 reset master;
7 set global wsrep_on=ON;
8 --connection node_1
9 set global wsrep_on=OFF;
10 reset master;
11 set global wsrep_on=ON;
12
13 #
14 # Test Galera with --log-bin --log-slave-updates .
15 # This way the actual MySQL binary log is used,
16 # rather than Galera's own implementation
17 #
18
19 CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
20 INSERT INTO t1 VALUES (1);
21
22 CREATE TABLE t2 (id INT) ENGINE=InnoDB;
23 INSERT INTO t2 VALUES (1);
24 INSERT INTO t2 VALUES (1);
25
26 --connection node_2
27 SELECT COUNT(*) = 1 FROM t1;
28 SELECT COUNT(*) = 2 FROM t2;
29
30 --connection node_1
31 ALTER TABLE t1 ADD COLUMN f2 INTEGER;
32 --let $MASTER_MYPORT=$NODE_MYPORT_1
33 --source include/show_binlog_events.inc
34
35 --connection node_2
36 SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
37 --source include/show_binlog_events.inc
38
39 DROP TABLE t1;
40 DROP TABLE t2;
41
42 --echo #cleanup
43 --connection node_1
44 SET GLOBAL wsrep_on=OFF;
45 RESET MASTER;
46 SET GLOBAL wsrep_on=ON;