diff options
Diffstat (limited to 'storage/innobase/lock')
-rw-r--r-- | storage/innobase/lock/lock0lock.cc | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index 8cb9f19d93d..8634f7e73c5 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -6552,26 +6552,12 @@ lock_trx_release_locks( { check_trx_state(trx); - if (trx_state_eq(trx, TRX_STATE_PREPARED) - || trx_state_eq(trx, TRX_STATE_PREPARED_RECOVERED)) { - - mutex_enter(&trx_sys->mutex); - - ut_a(trx_sys->n_prepared_trx > 0); - --trx_sys->n_prepared_trx; - - if (trx->is_recovered) { - ut_a(trx_sys->n_prepared_recovered_trx > 0); - trx_sys->n_prepared_recovered_trx--; - } - - mutex_exit(&trx_sys->mutex); - } else { - ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE) - || (trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY) - && trx->is_recovered - && !UT_LIST_GET_LEN(trx->lock.trx_locks))); - } + ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE) + || trx_state_eq(trx, TRX_STATE_PREPARED) + || trx_state_eq(trx, TRX_STATE_PREPARED_RECOVERED) + || (trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY) + && trx->is_recovered + && !UT_LIST_GET_LEN(trx->lock.trx_locks))); bool release_lock; |