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

35 lines
837 B
Text
Raw Normal View History

#
# Test Rolling Schema Upgrade
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
--connection node_2
SET SESSION wsrep_OSU_method = "RSU";
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
--connection node_1
# The ALTER above is not visible on node_1
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
INSERT INTO t1 VALUES (1);
--connection node_2
# The INSERT above is now visible on node_2
SELECT COUNT(*) = 1 FROM t1;
INSERT INTO t1 (f1) VALUES (2);
--connection node_1
# The ALTER has not replicated
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
# However the INSERT above has
SELECT COUNT(*) = 2 FROM t1;
DROP TABLE t1;