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

32 lines
724 B
Text
Raw Normal View History

#
# Test DDL errors under Rolling Schema Upgrade
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
INSERT INTO t1 VALUES (1), (1);
--connection node_2
SET SESSION wsrep_OSU_method = "RSU";
--error ER_DUP_ENTRY
ALTER TABLE t1 ADD PRIMARY KEY (f1);
SET SESSION wsrep_OSU_method = "TOI";
# The ALTER has no effect
SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE TABLE_NAME = 't1';
INSERT INTO t1 VALUES (1);
--connection node_1
SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE TABLE_NAME = 't1';
SELECT COUNT(*) = 3 FROM t1;
INSERT INTO t1 VALUES (1);
--connection node_2
SELECT COUNT(3) = 4 FROM t1;
DROP TABLE t1;