|
|
|
@ -5564,27 +5564,6 @@ fil_page_set_type( |
|
|
|
mach_write_to_2(page + FIL_PAGE_TYPE, type); |
|
|
|
} |
|
|
|
|
|
|
|
/** Reset the page type.
|
|
|
|
Data files created before MySQL 5.1 may contain garbage in FIL_PAGE_TYPE. |
|
|
|
In MySQL 3.23.53, only undo log pages and index pages were tagged. |
|
|
|
Any other pages were written with uninitialized bytes in FIL_PAGE_TYPE. |
|
|
|
@param[in] page_id page number |
|
|
|
@param[in,out] page page with invalid FIL_PAGE_TYPE |
|
|
|
@param[in] type expected page type |
|
|
|
@param[in,out] mtr mini-transaction */ |
|
|
|
void |
|
|
|
fil_page_reset_type( |
|
|
|
const page_id_t page_id, |
|
|
|
byte* page, |
|
|
|
ulint type, |
|
|
|
mtr_t* mtr) |
|
|
|
{ |
|
|
|
ib::info() |
|
|
|
<< "Resetting invalid page " << page_id << " type " |
|
|
|
<< fil_page_get_type(page) << " to " << type << "."; |
|
|
|
mlog_write_ulint(page + FIL_PAGE_TYPE, type, MLOG_2BYTES, mtr); |
|
|
|
} |
|
|
|
|
|
|
|
/****************************************************************//**
|
|
|
|
Closes the tablespace memory cache. */ |
|
|
|
void |
|
|
|
@ -6311,25 +6290,3 @@ fil_space_set_punch_hole( |
|
|
|
{ |
|
|
|
node->space->punch_hole = val; |
|
|
|
} |
|
|
|
|
|
|
|
/** Check (and if needed, reset) the page type.
|
|
|
|
Data files created before MySQL 5.1 may contain |
|
|
|
garbage in the FIL_PAGE_TYPE field. |
|
|
|
In MySQL 3.23.53, only undo log pages and index pages were tagged. |
|
|
|
Any other pages were written with uninitialized bytes in FIL_PAGE_TYPE. |
|
|
|
@param[in] page_id page number |
|
|
|
@param[in,out] page page with possibly invalid FIL_PAGE_TYPE |
|
|
|
@param[in] type expected page type |
|
|
|
@param[in,out] mtr mini-transaction */ |
|
|
|
void |
|
|
|
fil_block_check_type( |
|
|
|
const buf_block_t& block, |
|
|
|
ulint type, |
|
|
|
mtr_t* mtr) |
|
|
|
{ |
|
|
|
ulint page_type = fil_page_get_type(block.frame); |
|
|
|
|
|
|
|
if (page_type != type) { |
|
|
|
fil_page_reset_type(block.page.id, block.frame, type, mtr); |
|
|
|
} |
|
|
|
} |