Commit 09dd06f1 authored by Daniele Sciascia's avatar Daniele Sciascia Committed by Jan Lindström

MDEV-22443 wsrep::runtime_error on START TRANSACTION

This happens with global wsrep_on disabled and local wsrep_on enabled.
The fix consists in avoiding sync wait when global wsrep_on is
disabled.
parent 8a6a0845
SET SESSION wsrep_sync_wait=15;
SET SESSION wsrep_on=1;
START TRANSACTION READ WRITE;
!include ../my.cnf
[mysqld.1]
wsrep-on=OFF
binlog-format=ROW
wsrep-provider=none
wsrep-cluster-address='gcomm://'
innodb_autoinc_lock_mode=2
#
# MDEV-22443: terminate called after throwing an instance of
# 'wsrep::runtime_error' in std::terminate on START TRANSACTION
#
--source include/have_innodb.inc
--source include/have_wsrep.inc
--source include/have_binlog_format_row.inc
SET SESSION wsrep_sync_wait=15;
SET SESSION wsrep_on=1;
START TRANSACTION READ WRITE;
......@@ -1092,7 +1092,7 @@ bool wsrep_must_sync_wait (THD* thd, uint mask)
mysql_mutex_lock(&thd->LOCK_thd_data);
ret= (thd->variables.wsrep_sync_wait & mask) &&
thd->wsrep_client_thread &&
thd->variables.wsrep_on &&
WSREP_ON && thd->variables.wsrep_on &&
!(thd->variables.wsrep_dirty_reads &&
!is_update_query(thd->lex->sql_command)) &&
!thd->in_active_multi_stmt_transaction() &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment