summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-12-22 17:20:47 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-12-22 17:20:47 +0200
commitab5401b7fed3d3b75881161233c4e204a88372c5 (patch)
tree6c584fdb57c0b68f42a26c7bddfbe69ae08eb80e
parent29140022eaa24a87484f6e3c6951651878a59aed (diff)
downloadmariadb-git-bb-10.3-MDEV14638-1.tar.gz
Restore an assertionbb-10.3-MDEV14638-1
-rw-r--r--storage/innobase/read/read0read.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/storage/innobase/read/read0read.cc b/storage/innobase/read/read0read.cc
index c7917456bf2..b692bfa0fe1 100644
--- a/storage/innobase/read/read0read.cc
+++ b/storage/innobase/read/read0read.cc
@@ -424,13 +424,17 @@ ReadView::copy_trx_ids(const trx_ids_t& trx_ids)
}
#ifdef UNIV_DEBUG
- /* Assert that all transaction ids are in rw_trx_hash. If transaction
+ /* Assert that all transaction ids are active. If transaction
is in rw_trx_hash, it is guaranteed to be in ACTIVE or PREPARED state.
trx may have not been inserted to rw_trx_hash by this time, still it
is about to be inserted. Retry until it is there.*/
for (trx_ids_t::const_iterator it = trx_ids.begin();
it != trx_ids.end(); ++it) {
- while (!trx_sys.find_active(*it));
+ trx_t* trx;
+ while (!(trx = trx_sys.find_active(*it, true)));
+ ut_ad(trx->state == TRX_STATE_ACTIVE
+ || trx->state == TRX_STATE_PREPARED);
+ trx->ref_count.dec();
}
#endif /* UNIV_DEBUG */
}