diff options
Diffstat (limited to 'mysql-test/suite/galera/t/galera_rsu_simple.test')
-rw-r--r-- | mysql-test/suite/galera/t/galera_rsu_simple.test | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/mysql-test/suite/galera/t/galera_rsu_simple.test b/mysql-test/suite/galera/t/galera_rsu_simple.test new file mode 100644 index 00000000000..5841dbd8006 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_rsu_simple.test @@ -0,0 +1,34 @@ +# +# 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; |