summaryrefslogtreecommitdiff
path: root/storage/xtradb/trx/trx0trx.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/trx/trx0trx.cc')
-rw-r--r--storage/xtradb/trx/trx0trx.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/xtradb/trx/trx0trx.cc b/storage/xtradb/trx/trx0trx.cc
index 5ea63295792..4986ee201f8 100644
--- a/storage/xtradb/trx/trx0trx.cc
+++ b/storage/xtradb/trx/trx0trx.cc
@@ -473,11 +473,12 @@ trx_free_prepared(
/*==============*/
trx_t* trx) /*!< in, own: trx object */
{
- ut_ad(mutex_own(&trx_sys->mutex));
-
ut_a(trx_state_eq(trx, TRX_STATE_PREPARED));
ut_a(trx->magic_n == TRX_MAGIC_N);
+ mutex_exit(&trx_sys->mutex);
+ lock_trx_release_locks(trx);
+ mutex_enter(&trx_sys->mutex);
trx_undo_free_prepared(trx);
assert_trx_in_rw_list(trx);