mirror of
https://github.com/MariaDB/server.git
synced 2026-02-12 05:38:42 +01:00
MDEV-38073 MTR test started to fail with a warning after upstream merge
from 11.4 a7528a6190 because THD responsible
for creating SST user became read-only when the server was started with
--transaction-read-only=TRUE.
make sure the readonly flag on THDs created for wsp::thd utility class is
cleared regardless of the --transaction-read-only value as it is intended
only for client-facing THDs.
46 lines
1.1 KiB
Text
46 lines
1.1 KiB
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
|
|
|
|
# Save original auto_increment_offset values.
|
|
--let $node_1=node_1
|
|
--let $node_2=node_2
|
|
--source include/auto_increment_offset_save.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;
|
|
|
|
--source include/auto_increment_offset_restore.inc
|