diff options
author | Philip Stoev <philip.stoev@galeracluster.com> | 2016-02-19 00:16:36 -0800 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2018-03-20 12:10:41 +0200 |
commit | 84d4ab5be1d6490742353c9c7c7ae198ceb66b42 (patch) | |
tree | bbc494a3c99cc9d3effb3da00a99897677710ff4 /mysql-test | |
parent | 8f717ed36002e6257b0ba659863f3a48d5c1f579 (diff) | |
download | mariadb-git-84d4ab5be1d6490742353c9c7c7ae198ceb66b42.tar.gz |
refs MW-245: Galera MTR Tests: additional tests for wsrep_reject_queries, wsrep_dirty_reads
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/suite/galera/r/galera_var_reject_queries.result | 21 | ||||
-rw-r--r-- | mysql-test/suite/galera/t/galera_var_reject_queries.test | 44 |
2 files changed, 65 insertions, 0 deletions
diff --git a/mysql-test/suite/galera/r/galera_var_reject_queries.result b/mysql-test/suite/galera/r/galera_var_reject_queries.result new file mode 100644 index 00000000000..e4b906f1717 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_var_reject_queries.result @@ -0,0 +1,21 @@ +CREATE TABLE t1 (f1 INTEGER); +SET SESSION wsrep_reject_queries = ALL; +ERROR HY000: Variable 'wsrep_reject_queries' is a GLOBAL variable and should be set with SET GLOBAL +SET GLOBAL wsrep_reject_queries = ALL; +SELECT * FROM t1; +ERROR 08S01: WSREP has not yet prepared node for application use +SET GLOBAL wsrep_reject_queries = ALL_KILL; +ERROR HY000: Lost connection to MySQL server during query +SELECT * FROM t1; +ERROR 70100: Connection was killed +SELECT * FROM t1; +ERROR 08S01: WSREP has not yet prepared node for application use +SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +VARIABLE_VALUE = 2 +1 +INSERT INTO t1 VALUES (1); +SET GLOBAL wsrep_reject_queries = NONE; +SELECT COUNT(*) = 1 FROM t1; +COUNT(*) = 1 +1 +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_var_reject_queries.test b/mysql-test/suite/galera/t/galera_var_reject_queries.test new file mode 100644 index 00000000000..b89cae78aa6 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_var_reject_queries.test @@ -0,0 +1,44 @@ +# +# Test wsrep_reject_queries +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +CREATE TABLE t1 (f1 INTEGER); + +--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 + +--connection node_1 +--error ER_GLOBAL_VARIABLE +SET SESSION wsrep_reject_queries = ALL; + +SET GLOBAL wsrep_reject_queries = ALL; + +--error ER_UNKNOWN_COM_ERROR +SELECT * FROM t1; + +# Lost connection +--error 2013 +SET GLOBAL wsrep_reject_queries = ALL_KILL; + +--connection node_1a +--error ER_CONNECTION_KILLED +SELECT * FROM t1; + +--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--error ER_UNKNOWN_COM_ERROR +SELECT * FROM t1; + +# Confirm that replication continues + +--connection node_2 +SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +INSERT INTO t1 VALUES (1); + +--connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1 +SET GLOBAL wsrep_reject_queries = NONE; + +SELECT COUNT(*) = 1 FROM t1; + +DROP TABLE t1; |