1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-28 17:36:30 +03:00
Files
mariadb/mysql-test/suite/galera/t/galera_var_reject_queries.test
Jan Lindström c6ed37b88a MDEV-21182: Galera test failure on MW-284
galera_2nodes.cnf did not contain wsrep_on=1 on correct places. Fixed
restart options to use correct configuration.
2019-11-30 13:52:49 +02:00

50 lines
1.1 KiB
Plaintext

#
# Test wsrep_reject_queries
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
call mtr.add_suppression("WSREP has not yet prepared node for application use");
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,1047
SELECT * FROM t1;
#
# Original behavior was lost connection,
# but since 10.1, we allow controlling connection to remain alive
#
--error 0,2013
SET GLOBAL wsrep_reject_queries = ALL_KILL;
--connection node_1a
--error ER_CONNECTION_KILLED,2013,2006
SELECT * FROM t1;
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
--error ER_UNKNOWN_COM_ERROR,1047
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;