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

36 lines
927 B
Text

--source include/galera_cluster.inc
--source include/have_innodb.inc
#
# Test Galera with --log-bin --log-slave-updates .
# This way the actual MySQL binary log is used,
# rather than Galera's own implementation
#
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1);
INSERT INTO t2 VALUES (1);
--connection node_2
SELECT COUNT(*) = 1 FROM t1;
SELECT COUNT(*) = 2 FROM t2;
--connection node_1
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
FLUSH LOGS;
# Use pos 120 in order to skip the header that contains the MySQL version number.
# Otherwise, version number changes will cause the test to break
SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,18;
--connection node_2
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,19;
DROP TABLE t1;
DROP TABLE t2;