Skip to content

Commit 6893e99

Browse files
committed
trx_purge_add_undo_to_history(): Non-functional cleanup
Simplify the debug code, and use mach_read_from_4() instead of the wrapper function mtr_read_ulint().
1 parent 397b6b1 commit 6893e99

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

storage/innobase/trx/trx0purge.cc

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -231,22 +231,18 @@ trx_purge_add_undo_to_history(const trx_t* trx, trx_undo_t*& undo, mtr_t* mtr)
231231
}
232232

233233
if (undo->state != TRX_UNDO_CACHED) {
234-
ulint hist_size;
235-
#ifdef UNIV_DEBUG
236-
trx_usegf_t* seg_header = undo_page + TRX_UNDO_SEG_HDR;
237-
#endif /* UNIV_DEBUG */
238-
239234
/* The undo log segment will not be reused */
240235
ut_a(undo->id < TRX_RSEG_N_SLOTS);
241236
trx_rsegf_set_nth_undo(rseg_header, undo->id, FIL_NULL, mtr);
242237

243238
MONITOR_DEC(MONITOR_NUM_UNDO_SLOT_USED);
244239

245-
hist_size = mtr_read_ulint(
246-
rseg_header + TRX_RSEG_HISTORY_SIZE, MLOG_4BYTES, mtr);
240+
uint32_t hist_size = mach_read_from_4(TRX_RSEG_HISTORY_SIZE
241+
+ rseg_header);
247242

248-
ut_ad(undo->size == flst_get_len(
249-
seg_header + TRX_UNDO_PAGE_LIST));
243+
ut_ad(undo->size == flst_get_len(TRX_UNDO_SEG_HDR
244+
+ TRX_UNDO_PAGE_LIST
245+
+ undo_page));
250246

251247
mlog_write_ulint(
252248
rseg_header + TRX_RSEG_HISTORY_SIZE,

0 commit comments

Comments
 (0)