summaryrefslogtreecommitdiff
path: root/sql/wsrep_mysqld.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-03-30 11:12:56 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-03-30 11:12:56 +0300
commit1a9b6c4c7f817155f5ce8b1a6062d0eccbfd10ec (patch)
treec1da70f7f990dae02c5dfe70fd75299ced68873c /sql/wsrep_mysqld.cc
parent0fb84216a35046a4574dec214dcce03130a797c1 (diff)
parentb11ff3d49581d9e7b6f8b990f08e85e4d6384418 (diff)
downloadmariadb-git-1a9b6c4c7f817155f5ce8b1a6062d0eccbfd10ec.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/wsrep_mysqld.cc')
-rw-r--r--sql/wsrep_mysqld.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index fe949298a76..6d7099375b5 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -2575,6 +2575,17 @@ extern "C" void wsrep_thd_set_exec_mode(THD *thd, enum wsrep_exec_mode mode)
extern "C" void wsrep_thd_set_query_state(
THD *thd, enum wsrep_query_state state)
{
+ /* async slave thread should never flag IDLE state, as it may
+ give rollbacker thread chance to interfere and rollback async slave
+ transaction.
+ in fact, async slave thread is never idle as it reads complete
+ transactions from relay log and applies them, as a whole.
+ BF abort happens voluntarily by async slave thread.
+ */
+ if (thd->slave_thread && state == QUERY_IDLE) {
+ WSREP_DEBUG("Skipping IDLE state change for slave SQL");
+ return;
+ }
thd->wsrep_query_state= state;
}