Skip to content

Commit e89394d

Browse files
ayurchenjanlindstrom
authored andcommitted
MDEV-38383 Fix MDEV-38073 MTR test warning
MDEV-38073 MTR test started to fail with a warning after upstream merge from 11.4 a7528a6 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.
1 parent e7a5539 commit e89394d

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

mysql-test/suite/galera/r/MDEV-38073.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
connection node_2;
22
connection node_1;
3+
connection node_1;
4+
connection node_2;
35
connection node_2;
46
connection node_1;
57
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;

mysql-test/suite/galera/t/MDEV-38073.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
--source include/have_innodb.inc
88
--source include/big_test.inc
99

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+
1015
# Restart the node 2 in transaction_read_only mode.
1116
--connection node_2
1217
--source include/shutdown_mysqld.inc
@@ -37,3 +42,5 @@ SELECT COUNT(*) = 2 FROM t1;
3742
# Cleanup
3843
--connection node_1
3944
DROP TABLE t1;
45+
46+
--source include/auto_increment_offset_restore.inc

sql/wsrep_utils.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,8 @@ thd::thd (my_bool ini, bool system_thread)
508508
wsrep_assign_from_threadvars(ptr);
509509
wsrep_store_threadvars(ptr);
510510

511+
ptr->tx_read_only= false;
512+
ptr->variables.tx_read_only= false;
511513
ptr->variables.tx_isolation= ISO_READ_COMMITTED;
512514
ptr->variables.sql_log_bin = 0;
513515
ptr->variables.option_bits &= ~OPTION_BIN_LOG; // disable binlog

0 commit comments

Comments
 (0)