diff options
-rw-r--r-- | mysql-test/suite/wsrep/r/MDEV-22443.result | 3 | ||||
-rw-r--r-- | mysql-test/suite/wsrep/t/MDEV-22443.cnf | 8 | ||||
-rw-r--r-- | mysql-test/suite/wsrep/t/MDEV-22443.test | 12 | ||||
-rw-r--r-- | sql/wsrep_mysqld.cc | 2 |
4 files changed, 24 insertions, 1 deletions
diff --git a/mysql-test/suite/wsrep/r/MDEV-22443.result b/mysql-test/suite/wsrep/r/MDEV-22443.result new file mode 100644 index 00000000000..ea07cbec5a0 --- /dev/null +++ b/mysql-test/suite/wsrep/r/MDEV-22443.result @@ -0,0 +1,3 @@ +SET SESSION wsrep_sync_wait=15; +SET SESSION wsrep_on=1; +START TRANSACTION READ WRITE; diff --git a/mysql-test/suite/wsrep/t/MDEV-22443.cnf b/mysql-test/suite/wsrep/t/MDEV-22443.cnf new file mode 100644 index 00000000000..851f2999a83 --- /dev/null +++ b/mysql-test/suite/wsrep/t/MDEV-22443.cnf @@ -0,0 +1,8 @@ +!include ../my.cnf + +[mysqld.1] +wsrep-on=OFF +binlog-format=ROW +wsrep-provider=none +wsrep-cluster-address='gcomm://' +innodb_autoinc_lock_mode=2 diff --git a/mysql-test/suite/wsrep/t/MDEV-22443.test b/mysql-test/suite/wsrep/t/MDEV-22443.test new file mode 100644 index 00000000000..674cb5ae2d8 --- /dev/null +++ b/mysql-test/suite/wsrep/t/MDEV-22443.test @@ -0,0 +1,12 @@ +# +# 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; diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index 14be333c107..fab47fc03d0 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -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() && |