summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-09-05 12:42:45 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-09-05 14:13:17 +0300
commit5cf29795b19b16723a0d7a2b9cf438de94b7a229 (patch)
tree0e2a1ba0c5fae62d742c7b6ea31b264ed59559ff
parentd5aed991de77206782d05b95676eaa47d23efcbe (diff)
downloadmariadb-git-5cf29795b19b16723a0d7a2b9cf438de94b7a229.tar.gz
Restore a tighter assertion
-rw-r--r--storage/innobase/trx/trx0trx.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc
index 7a05c6f955b..2f79dfd5008 100644
--- a/storage/innobase/trx/trx0trx.cc
+++ b/storage/innobase/trx/trx0trx.cc
@@ -463,6 +463,9 @@ void trx_free(trx_t*& trx)
/** Transition to committed state, to release implicit locks. */
inline void trx_t::commit_state()
{
+ ut_ad(state == TRX_STATE_PREPARED
+ || state == TRX_STATE_PREPARED_RECOVERED
+ || state == TRX_STATE_ACTIVE);
/* This makes the transaction committed in memory and makes its
changes to data visible to other transactions. NOTE that there is a
small discrepancy from the strict formal visibility rules here: a
@@ -476,9 +479,6 @@ inline void trx_t::commit_state()
committing transaction T. In the case where the log flush fails, and
T never gets committed, also T2 will never get committed. */
trx_mutex_enter(this);
- ut_ad(state != TRX_STATE_NOT_STARTED);
- ut_ad(state != TRX_STATE_COMMITTED_IN_MEMORY
- || (is_recovered && !UT_LIST_GET_LEN(lock.trx_locks)));
state= TRX_STATE_COMMITTED_IN_MEMORY;
trx_mutex_exit(this);
ut_ad(id || !is_referenced());