summaryrefslogtreecommitdiff
path: root/sql/service_wsrep.cc
diff options
context:
space:
mode:
authorDaniele Sciascia <daniele.sciascia@galeracluster.com>2019-12-04 08:21:14 +0100
committerJan Lindström <jan.lindstrom@mariadb.com>2019-12-04 09:21:14 +0200
commitaab6cefe8dc132ec6a16e6af5c616765671ac9af (patch)
tree0e804535537ed40581a6feed0f10e180371e97a1 /sql/service_wsrep.cc
parent0b8b11b0b15f2d3d20dc801e50fa2beedc080dad (diff)
downloadmariadb-git-aab6cefe8dc132ec6a16e6af5c616765671ac9af.tar.gz
MDEV-20848 Fixes for MTR test galera_sr.GCF-1060 (#1421)
This patch contains two fixes: * wsrep_handle_mdl_conflict(): handle the case where SR transaction is in aborting state. Previously, a BF-BF conflict was reported, and the process would abort. * wsrep_thd_bf_abort(): do not restore thread vars after calling wsrep_bf_abort(). Thread vars are already restored in wsrep-lib if necessary. This also removes the assumption that the caller of wsrep_thd_bf_abort() is the given bf_thd, which is not the case. Also in this patch: * Remove unnecessary check for active victim transaction in wsrep_thd_bf_abort(): the exact same check is performed later in wsrep_bf_abort(). * Make wsrep_thd_bf_abort() and wsrep_log_thd() const-correct. * Change signature of wsrep_abort_thd() to take THD pointers instead of void pointers.
Diffstat (limited to 'sql/service_wsrep.cc')
-rw-r--r--sql/service_wsrep.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/sql/service_wsrep.cc b/sql/service_wsrep.cc
index 5526c343d69..7a2aa55e0cc 100644
--- a/sql/service_wsrep.cc
+++ b/sql/service_wsrep.cc
@@ -196,18 +196,10 @@ extern "C" void wsrep_handle_SR_rollback(THD *bf_thd,
}
}
-extern "C" my_bool wsrep_thd_bf_abort(const THD *bf_thd, THD *victim_thd,
+extern "C" my_bool wsrep_thd_bf_abort(THD *bf_thd, THD *victim_thd,
my_bool signal)
{
- /* Note: do not store/reset globals before wsrep_bf_abort() call
- to avoid losing BF thd context. */
- if (WSREP(victim_thd) && !victim_thd->wsrep_trx().active())
- {
- WSREP_DEBUG("BF abort for non active transaction");
- wsrep_start_transaction(victim_thd, victim_thd->wsrep_next_trx_id());
- }
my_bool ret= wsrep_bf_abort(bf_thd, victim_thd);
- wsrep_store_threadvars((THD*)bf_thd);
/*
Send awake signal if victim was BF aborted or does not
have wsrep on. Note that this should never interrupt RSU