/************************************************************************** Writes the mtr log entry of an undo log page initialization. */ UNIV_INLINE void trx_undo_page_init_log( /*====================*/ page_t* undo_page, /* in: undo log page */ ulint type, /* in: undo log type */ mtr_t* mtr) /* in: mtr */ { mlog_write_initial_log_record(undo_page, MLOG_UNDO_INIT, mtr); mlog_catenate_ulint_compressed(mtr, type); }
ibool trx_undo_erase_page_end( /*====================*/ page_t* undo_page, /*!< in/out: undo page whose end to erase */ mtr_t* mtr) /*!< in/out: mini-transaction */ { ulint first_free; first_free = mach_read_from_2(undo_page + TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_FREE); memset(undo_page + first_free, 0xff, (UNIV_PAGE_SIZE - FIL_PAGE_DATA_END) - first_free); mlog_write_initial_log_record(undo_page, MLOG_UNDO_ERASE_END, mtr); return(first_free != TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_HDR_SIZE); }
/***********************************************************************//** Erases the unused undo log page end. */ static void trx_undo_erase_page_end( /*====================*/ page_t* undo_page, /*!< in: undo page whose end to erase */ mtr_t* mtr) /*!< in: mtr */ { ulint first_free; first_free = mach_read_from_2(undo_page + TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_FREE); memset(undo_page + first_free, 0xff, (UNIV_PAGE_SIZE - FIL_PAGE_DATA_END) - first_free); mlog_write_initial_log_record(undo_page, MLOG_UNDO_ERASE_END, mtr); }