Skip to content

Commit

Permalink
trx_purge_add_undo_to_history(): Non-functional cleanup
Browse files Browse the repository at this point in the history
Simplify the debug code, and use mach_read_from_4() instead of
the wrapper function mtr_read_ulint().
  • Loading branch information
dr-m committed Mar 19, 2019
1 parent 397b6b1 commit 6893e99
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions storage/innobase/trx/trx0purge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -231,22 +231,18 @@ trx_purge_add_undo_to_history(const trx_t* trx, trx_undo_t*& undo, mtr_t* mtr)
}

if (undo->state != TRX_UNDO_CACHED) {
ulint hist_size;
#ifdef UNIV_DEBUG
trx_usegf_t* seg_header = undo_page + TRX_UNDO_SEG_HDR;
#endif /* UNIV_DEBUG */

/* The undo log segment will not be reused */
ut_a(undo->id < TRX_RSEG_N_SLOTS);
trx_rsegf_set_nth_undo(rseg_header, undo->id, FIL_NULL, mtr);

MONITOR_DEC(MONITOR_NUM_UNDO_SLOT_USED);

hist_size = mtr_read_ulint(
rseg_header + TRX_RSEG_HISTORY_SIZE, MLOG_4BYTES, mtr);
uint32_t hist_size = mach_read_from_4(TRX_RSEG_HISTORY_SIZE
+ rseg_header);

ut_ad(undo->size == flst_get_len(
seg_header + TRX_UNDO_PAGE_LIST));
ut_ad(undo->size == flst_get_len(TRX_UNDO_SEG_HDR
+ TRX_UNDO_PAGE_LIST
+ undo_page));

mlog_write_ulint(
rseg_header + TRX_RSEG_HISTORY_SIZE,
Expand Down

0 comments on commit 6893e99

Please sign in to comment.