summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-02-02 10:02:48 +0100
committerSergei Golubchik <serg@mariadb.org>2021-02-02 12:43:17 +0100
commit37e24970cbbcca4102094d177eee570b3338262a (patch)
treed3f17ac2c9afb5ebb6f91df052d90d86341f7dc6
parent2676c9aad79b66705420922d393a9f498a2a6693 (diff)
downloadmariadb-git-37e24970cbbcca4102094d177eee570b3338262a.tar.gz
merge
-rw-r--r--sql/wsrep_mysqld.cc2
-rw-r--r--storage/innobase/handler/ha_innodb.cc8
2 files changed, 7 insertions, 3 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index f57be3a8611..67077741d9b 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -2747,7 +2747,7 @@ extern "C" void wsrep_thd_awake(THD *thd, my_bool signal)
{
if (signal)
{
- thd->awake(KILL_QUERY);
+ thd->awake_no_mutex(KILL_QUERY);
}
else
{
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 01f5ad7173a..81a3f5c0da3 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -18767,15 +18767,17 @@ static void bg_wsrep_kill_trx(
DBUG_ENTER("bg_wsrep_kill_trx");
if (thd) {
+ wsrep_thd_LOCK(thd);
victim_trx = thd_to_trx(thd);
lock_mutex_enter();
trx_mutex_enter(victim_trx);
+ wsrep_thd_UNLOCK(thd);
if (victim_trx->id != arg->trx_id)
{
trx_mutex_exit(victim_trx);
lock_mutex_exit();
- wsrep_thd_UNLOCK(thd);
victim_trx = NULL;
+ wsrep_thd_kill_UNLOCK(thd);
}
}
@@ -18944,7 +18946,7 @@ ret_unlock:
lock_mutex_exit();
if (awake)
wsrep_thd_awake(thd, arg->signal);
- wsrep_thd_UNLOCK(thd);
+ wsrep_thd_kill_UNLOCK(thd);
ret:
free(arg);
@@ -19021,10 +19023,12 @@ wsrep_abort_transaction(
DBUG_VOID_RETURN;
} else {
WSREP_DEBUG("victim does not have transaction");
+ wsrep_thd_kill_LOCK(victim_thd);
wsrep_thd_LOCK(victim_thd);
wsrep_thd_set_conflict_state(victim_thd, MUST_ABORT);
wsrep_thd_UNLOCK(victim_thd);
wsrep_thd_awake(victim_thd, signal);
+ wsrep_thd_kill_UNLOCK(victim_thd);
}
DBUG_VOID_RETURN;