mirror of
https://github.com/MariaDB/server.git
synced 2026-01-07 20:15:47 +01:00
Apparently, there was a separate issue with applier thread variables: wsrep_plugins_post_init() would overwrite thd->variables for every applier thread and forget to restore proper read only context. Then, upon every server transaction termination, trans_reset_one_shot_statistics() would set thread's read only context to the one stored in thd->variables, thus spoiling the read only context value for appliers.
39 lines
981 B
Text
39 lines
981 B
Text
#
|
|
# Ensure that the transaction_read_only option does not apply to Wsrep system
|
|
# threads (schema and appliers) and that the cluster keeps functioning.
|
|
#
|
|
|
|
--source include/galera_cluster.inc
|
|
--source include/have_innodb.inc
|
|
--source include/big_test.inc
|
|
|
|
# Restart the node 2 in transaction_read_only mode.
|
|
--connection node_2
|
|
--source include/shutdown_mysqld.inc
|
|
--let $start_mysqld_params=--transaction_read_only=TRUE
|
|
--source include/start_mysqld.inc
|
|
|
|
--connection node_1
|
|
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
|
|
|
# Note: this is not obligatory, but we want to test
|
|
# SR transactions as well.
|
|
SET SESSION wsrep_trx_fragment_size=1;
|
|
|
|
START TRANSACTION;
|
|
INSERT INTO t1 VALUES (1);
|
|
INSERT INTO t1 VALUES (2);
|
|
COMMIT;
|
|
|
|
--connection node_2
|
|
SELECT COUNT(*) = 2 FROM t1;
|
|
|
|
# Restart the node 2 in normal mode.
|
|
--connection node_2
|
|
--source include/shutdown_mysqld.inc
|
|
--let $start_mysqld_params=
|
|
--source include/start_mysqld.inc
|
|
|
|
# Cleanup
|
|
--connection node_1
|
|
DROP TABLE t1;
|