diff options
Diffstat (limited to 'storage/innobase/trx/trx0roll.cc')
-rw-r--r-- | storage/innobase/trx/trx0roll.cc | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/storage/innobase/trx/trx0roll.cc b/storage/innobase/trx/trx0roll.cc index 946c90f457c..0d2d6beac90 100644 --- a/storage/innobase/trx/trx0roll.cc +++ b/storage/innobase/trx/trx0roll.cc @@ -1012,7 +1012,7 @@ trx_roll_pop_top_rec_of_trx(trx_t* trx, roll_ptr_t* roll_ptr, mem_heap_t* heap) if the transaction object is committed and reused later, we will default to a full ROLLBACK. */ trx->roll_limit = 0; - ut_d(trx->in_rollback = false); + trx->in_rollback = false; mutex_exit(&trx->undo_mutex); return(NULL); } @@ -1028,10 +1028,20 @@ trx_roll_pop_top_rec_of_trx(trx_t* trx, roll_ptr_t* roll_ptr, mem_heap_t* heap) trx_undo_rec_t* undo_rec = trx_roll_pop_top_rec(trx, undo, &mtr); const undo_no_t undo_no = trx_undo_rec_get_undo_no(undo_rec); - if (trx_undo_rec_get_type(undo_rec) == TRX_UNDO_INSERT_REC) { + switch (trx_undo_rec_get_type(undo_rec)) { + case TRX_UNDO_INSERT_DEFAULT: + /* This record type was introduced in MDEV-11369 + instant ADD COLUMN, which was implemented after + MDEV-12288 removed the insert_undo log. There is no + instant ADD COLUMN for temporary tables. Therefore, + this record can only be present in the main undo log. */ + ut_ad(undo == update); + /* fall through */ + case TRX_UNDO_INSERT_REC: ut_ad(undo == insert || undo == update || undo == temp); *roll_ptr |= 1ULL << ROLL_PTR_INSERT_FLAG_POS; - } else { + break; + default: ut_ad(undo == update || undo == temp); } @@ -1119,7 +1129,7 @@ trx_rollback_start( ut_ad(!trx->in_rollback); trx->roll_limit = roll_limit; - ut_d(trx->in_rollback = true); + trx->in_rollback = true; ut_a(trx->roll_limit <= trx->undo_no); |