| 1 |
# |
| 2 |
# Ensure that the transaction_read_only option does not apply to Wsrep system |
| 3 |
# threads (schema and appliers) and that the cluster keeps functioning. |
| 4 |
# |
| 5 |
|
| 6 |
--source include/galera_cluster.inc |
| 7 |
--source include/have_innodb.inc |
| 8 |
--source include/big_test.inc |
| 9 |
|
| 10 |
# Save original auto_increment_offset values. |
| 11 |
--let $node_1=node_1 |
| 12 |
--let $node_2=node_2 |
| 13 |
--source include/auto_increment_offset_save.inc |
| 14 |
|
| 15 |
# Restart the node 2 in transaction_read_only mode. |
| 16 |
--connection node_2 |
| 17 |
--source include/shutdown_mysqld.inc |
| 18 |
--let $start_mysqld_params=--transaction_read_only=TRUE |
| 19 |
--source include/start_mysqld.inc |
| 20 |
|
| 21 |
--connection node_1 |
| 22 |
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; |
| 23 |
|
| 24 |
# Note: this is not obligatory, but we want to test |
| 25 |
# SR transactions as well. |
| 26 |
SET SESSION wsrep_trx_fragment_size=1; |
| 27 |
|
| 28 |
START TRANSACTION; |
| 29 |
INSERT INTO t1 VALUES (1); |
| 30 |
INSERT INTO t1 VALUES (2); |
| 31 |
COMMIT; |
| 32 |
|
| 33 |
--connection node_2 |
| 34 |
SELECT COUNT(*) = 2 FROM t1; |
| 35 |
|
| 36 |
# Restart the node 2 in normal mode. |
| 37 |
--connection node_2 |
| 38 |
--source include/shutdown_mysqld.inc |
| 39 |
--let $start_mysqld_params= |
| 40 |
--source include/start_mysqld.inc |
| 41 |
|
| 42 |
# Cleanup |
| 43 |
--connection node_1 |
| 44 |
DROP TABLE t1; |
| 45 |
|
| 46 |
--source include/auto_increment_offset_restore.inc |