MDEV-38383 Fix MDEV-38073 MTR test warning

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.
This commit is contained in:
Alexey Yurchenko 2025-12-24 21:12:28 +01:00 committed by Jan Lindström
commit e2088ce4d9
3 changed files with 11 additions and 0 deletions

View file

@ -1,5 +1,7 @@
connection node_2;
connection node_1;
connection node_1;
connection node_2;
connection node_2;
connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;

View file

@ -7,6 +7,11 @@
--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
@ -37,3 +42,5 @@ SELECT COUNT(*) = 2 FROM t1;
# Cleanup
--connection node_1
DROP TABLE t1;
--source include/auto_increment_offset_restore.inc

View file

@ -508,6 +508,8 @@ thd::thd (my_bool ini, bool system_thread)
wsrep_assign_from_threadvars(ptr);
wsrep_store_threadvars(ptr);
ptr->tx_read_only= false;
ptr->variables.tx_read_only= false;
ptr->variables.tx_isolation= ISO_READ_COMMITTED;
ptr->variables.sql_log_bin = 0;
ptr->variables.option_bits &= ~OPTION_BIN_LOG; // disable binlog