summaryrefslogtreecommitdiff
path: root/sql/wsrep_thd.cc
diff options
context:
space:
mode:
authormkaruza <mario.karuza@galeracluster.com>2021-07-26 09:37:38 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2021-07-28 15:04:53 +0300
commit093227c05e27083c32dbd51b7f146aabe6429291 (patch)
tree00bd38038de50223c8d996ec3e09ded8b9f95cf9 /sql/wsrep_thd.cc
parent386ac12a48c7a4abcd2f82f21bcf5a48a235d7fd (diff)
downloadmariadb-git-093227c05e27083c32dbd51b7f146aabe6429291.tar.gz
MDEV-25410 Assertion `state_ == s_exec' failed - mysqld got signal 6
Victim threads which are in currently in process of aborting or already aborted should be skipped for another kill process. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
Diffstat (limited to 'sql/wsrep_thd.cc')
-rw-r--r--sql/wsrep_thd.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc
index 023da27c3c1..d8f3d8959e0 100644
--- a/sql/wsrep_thd.cc
+++ b/sql/wsrep_thd.cc
@@ -349,6 +349,15 @@ bool wsrep_bf_abort(const THD* bf_thd, THD* victim_thd)
if (WSREP(victim_thd) && !victim_thd->wsrep_trx().active())
{
WSREP_DEBUG("wsrep_bf_abort, BF abort for non active transaction");
+ switch (victim_thd->wsrep_trx().state())
+ {
+ case wsrep::transaction::s_aborting: /* fall through */
+ case wsrep::transaction::s_aborted:
+ WSREP_DEBUG("victim thd is already aborted or in aborting state.");
+ return false;
+ default:
+ break;
+ }
wsrep_start_transaction(victim_thd, victim_thd->wsrep_next_trx_id());
}