mirror of
https://github.com/MariaDB/server.git
synced 2025-02-12 00:15:35 +01:00
![Teemu Ollakka](/assets/img/avatar_default.png)
COM_CHANGE_USER and COM_RESET_CONNECTION commands cause THD::cleanup() to be called in the middle of command handling. This causes wsrep client_state sanity checks to fail. As a fix, temporarily close wsrep client_state before THD::change_user() is called when handling COM_CHANGE_USER and COM_RESET_CONNECTION, and restore the state after THD::change_user() returns. This commit also updates wsrep-lib to version which removes exception usage in wsrep client_state sanity checks.
29 lines
618 B
Text
29 lines
618 B
Text
#
|
|
# Check that change user works with Galera
|
|
#
|
|
|
|
--source include/galera_cluster.inc
|
|
--source include/have_innodb.inc
|
|
|
|
--connection node_1
|
|
CREATE USER user1;
|
|
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
|
|
|
|
# Change user in idle connection
|
|
--connect node_1a, 127.0.0.1, root, , test, $MYPORT_NODE_1
|
|
change_user 'user1';
|
|
reset_connection;
|
|
--disconnect node_1a
|
|
|
|
# Change user with transaction open
|
|
--connect node_1a, 127.0.0.1, root, , test, $MYPORT_NODE_1
|
|
START TRANSACTION;
|
|
INSERT INTO t1 VALUES (1);
|
|
change_user 'user1';
|
|
reset_connection;
|
|
--disconnect node_1a
|
|
|
|
--connection node_1
|
|
DROP TABLE t1;
|
|
DROP USER user1;
|
|
|