mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 19:11:46 +01:00
39 lines
1,003 B
Text
39 lines
1,003 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;
|
|
--replace_column 2 # 4 # 5 #
|
|
--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
|
|
SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,18;
|
|
|
|
--connection node_2
|
|
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
|
--replace_column 2 # 4 # 5 #
|
|
--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
|
|
SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,18;
|
|
|
|
DROP TABLE t1;
|
|
DROP TABLE t2;
|
|
|
|
--connection node_1
|
|
RESET MASTER;
|