1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-25 17:25:02 +03:00
Files
mariadb/mysql-test/suite/galera/t/galera_var_reject_queries.test
Jan Lindström 244cc35e7b MDEV-17801: Galera test failure on galera_var_reject_queries
Problem was that controlling connection i.e. connection that
executed the query SET GLOBAL wsrep_reject_queries = ALL_KILL;
was also killed but server would try to send result from that
query to controlling connection resulting a assertion
mysqld: /home/jan/mysql/10.2-sst/include/mysql/psi/mysql_socket.h:738: inline_mysql_socket_send: Assertion `mysql_socket.fd != -1' failed.
as socket was closed when controlling connection was closed.

wsrep_close_client_connections()
	Do not close controlling connection and instead of
	wsrep_close_thread() we do now soft kill by THD::awake

wsrep_reject_queries_update()
	Call wsrep_close_client_connections using current thd.
2018-11-26 08:11:56 +02:00

48 lines
1.0 KiB
Plaintext

#
# 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;
#
# 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
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;