From 7b57c5ea6f1fda5100ce4a5fb61ee63e8a153d0f Mon Sep 17 00:00:00 2001 From: Seppo Jaakola Date: Thu, 20 Mar 2014 16:03:20 +0200 Subject: [PATCH] References: https://mariadb.atlassian.net/browse/MDEV-5908 - moved releasing of wsrep THD mutex and thd->awake later, so that wsrep->abort_pre_commit() is guaranteed to run for a thread which is still in conflict state --- BUILD/compile-amd64-debug-wsrep | 0 storage/innobase/handler/ha_innodb.cc | 6 ++++-- 2 files changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 BUILD/compile-amd64-debug-wsrep diff --git a/BUILD/compile-amd64-debug-wsrep b/BUILD/compile-amd64-debug-wsrep old mode 100644 new mode 100755 diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 748a2134ce9..1ef5d252fe3 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -16771,8 +16771,6 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, WSREP_DEBUG("kill query for: %ld", wsrep_thd_thread_id(thd)); - wsrep_thd_UNLOCK(thd); - wsrep_thd_awake(thd, signal); WSREP_DEBUG("kill trx QUERY_COMMITTING for %llu", victim_trx->id); @@ -16789,6 +16787,8 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, case WSREP_WARNING: WSREP_DEBUG("cancel commit warning: %llu", victim_trx->id); + wsrep_thd_UNLOCK(thd); + wsrep_thd_awake(thd, signal); DBUG_RETURN(1); break; case WSREP_OK: @@ -16806,6 +16806,8 @@ wsrep_innobase_kill_one_trx(void * const bf_thd_ptr, break; } } + wsrep_thd_UNLOCK(thd); + wsrep_thd_awake(thd, signal); break; case QUERY_EXEC: /* it is possible that victim trx is itself waiting for some