MDEV-8139: Clean up the freeing of B-tree pages

btr_page_free(): Renamed from btr_page_free_low().
If scrubbing is enabled, zero out the page with proper redo logging.
Only pass ahi=true to fseg_free_page() if the page is actually indexed.

fil_space_t::modify_check(): Renamed from fsp_space_modify_check().

fsp_init_file_page(): Define inline.
This commit is contained in:
Marko Mäkelä 2019-04-08 14:41:02 +03:00
commit 4b822111ef
7 changed files with 98 additions and 218 deletions

View file

@ -688,6 +688,26 @@ fsp_descr_page(
@param[in,out] block buffer pool block */
void fsp_apply_init_file_page(buf_block_t* block);
/** Initialize a file page.
@param[in] space tablespace
@param[in,out] block file page
@param[in,out] mtr mini-transaction */
inline void fsp_init_file_page(
#ifdef UNIV_DEBUG
const fil_space_t* space,
#endif
buf_block_t* block, mtr_t* mtr)
{
ut_d(space->modify_check(*mtr));
ut_ad(space->id == block->page.id.space());
fsp_apply_init_file_page(block);
mlog_write_initial_log_record(block->frame, MLOG_INIT_FILE_PAGE2, mtr);
}
#ifndef UNIV_DEBUG
# define fsp_init_file_page(space, block, mtr) fsp_init_file_page(block, mtr)
#endif
#ifdef UNIV_BTR_PRINT
/*******************************************************************//**
Writes info of a segment. */