diff options
Diffstat (limited to 'mysql-test/suite/galera/t/galera_var_wsrep_on_off.test')
-rw-r--r-- | mysql-test/suite/galera/t/galera_var_wsrep_on_off.test | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/suite/galera/t/galera_var_wsrep_on_off.test b/mysql-test/suite/galera/t/galera_var_wsrep_on_off.test new file mode 100644 index 00000000000..783b78792e6 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_var_wsrep_on_off.test @@ -0,0 +1,32 @@ +# +# Test wsrep_on = OFF. Some events will not be replicated +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +SET SESSION wsrep_on = FALSE; + +# This statement will not be replicated +INSERT INTO t1 VALUES (2); + +--connection node_2 +SELECT COUNT(*) = 1 FROM t1; + +--connection node_1 +SET GLOBAL wsrep_on = TRUE; +INSERT INTO t1 VALUES (3); + +--connection node_2 +SELECT COUNT(*) = 2 FROM t1; + +# Middle insert is not replicated +SELECT COUNT(*) = 0 FROM t1 WHERE f1 = 2; + +# Final insert is replicated +SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 3; + +DROP TABLE t1; + |