diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-10-27 10:20:22 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-10-27 10:37:30 +0300 |
commit | 02ba15a9dae97f23cfe47fa788c09d65aa1cfcd2 (patch) | |
tree | fd21cb66a7a5aeab867a08bad942e7e663cc87a9 /storage | |
parent | 00c466815357dddc24aea34c2bd866ba3ece5bd0 (diff) | |
download | mariadb-git-02ba15a9dae97f23cfe47fa788c09d65aa1cfcd2.tar.gz |
Relax a too strict assertion at shutdown
trx_free_prepared(): The function trx_resurrect_insert()
can resurrect a committed transaction when the TRX_UNDO_STATE
field is not TRX_UNDO_ACTIVE or TRX_UNDO_PREPARED.
(In the examined failure of mariabackup.xb_compressed_encrypted,
assertion failure in --apply-log shutdown at line 25,
the TRX_UNDO_STATE strangely contained the value 0xffff.)
In any case, the assertion must allow the state
TRX_STATE_COMMITTED_IN_MEMORY for resurrected transactions.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/trx/trx0trx.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index ffba8f314fb..dc8e115d2d1 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -616,8 +616,9 @@ trx_free_prepared( trx_t* trx) /*!< in, own: trx object */ { ut_a(trx_state_eq(trx, TRX_STATE_PREPARED) - || (trx_state_eq(trx, TRX_STATE_ACTIVE) - && trx->is_recovered + || (trx->is_recovered + && (trx_state_eq(trx, TRX_STATE_ACTIVE) + || trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY)) && (!srv_was_started || srv_operation == SRV_OPERATION_RESTORE || srv_operation == SRV_OPERATION_RESTORE_EXPORT |