| 1 |
# |
| 2 |
# Check that change user works with Galera |
| 3 |
# |
| 4 |
|
| 5 |
--source include/galera_cluster.inc |
| 6 |
--source include/have_innodb.inc |
| 7 |
|
| 8 |
--connection node_1 |
| 9 |
CREATE USER user1; |
| 10 |
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB; |
| 11 |
|
| 12 |
# Change user in idle connection |
| 13 |
--connect node_1a, 127.0.0.1, root, , test, $MYPORT_NODE_1 |
| 14 |
change_user 'user1'; |
| 15 |
reset_connection; |
| 16 |
--disconnect node_1a |
| 17 |
|
| 18 |
# Change user with transaction open |
| 19 |
--connect node_1a, 127.0.0.1, root, , test, $MYPORT_NODE_1 |
| 20 |
START TRANSACTION; |
| 21 |
INSERT INTO t1 VALUES (1); |
| 22 |
change_user 'user1'; |
| 23 |
reset_connection; |
| 24 |
--disconnect node_1a |
| 25 |
|
| 26 |
--connection node_1 |
| 27 |
DROP TABLE t1; |
| 28 |
DROP USER user1; |