Commit 1621d32e authored by Marko Mäkelä's avatar Marko Mäkelä

Remove the unused redo log record type MLOG_INIT_FILE_PAGE

InnoDB stopped generating the MLOG_INIT_FILE_PAGE record in
MySQL 5.7.5. Starting with MySQL 5.7.9 (which was imported to
MariaDB Server 10.2.2), the InnoDB redo log format tag prevents
crash recovery from old-format redo logs.

Remove the dead code for dealing with MLOG_INIT_FILE_PAGE.
parent 825b6a35
...@@ -129,14 +129,6 @@ enum mlog_id_t { ...@@ -129,14 +129,6 @@ enum mlog_id_t {
MLOG_LSN = 28, MLOG_LSN = 28,
#endif /* UNIV_LOG_LSN_DEBUG */ #endif /* UNIV_LOG_LSN_DEBUG */
/** this means that a file page is taken into use and the prior
contents of the page should be ignored: in recovery we must not
trust the lsn values stored to the file page.
Note: it's deprecated because it causes crash recovery problem
in bulk create index, and actually we don't need to reset page
lsn in recv_recover_page_func() now. */
MLOG_INIT_FILE_PAGE = 29,
/** write a string to a page */ /** write a string to a page */
MLOG_WRITE_STRING = 30, MLOG_WRITE_STRING = 30,
...@@ -224,8 +216,7 @@ enum mlog_id_t { ...@@ -224,8 +216,7 @@ enum mlog_id_t {
/** create a R-tree compact page */ /** create a R-tree compact page */
MLOG_COMP_PAGE_CREATE_RTREE = 58, MLOG_COMP_PAGE_CREATE_RTREE = 58,
/** this means that a file page is taken into use. /** initialize a file page */
We use it to replace MLOG_INIT_FILE_PAGE. */
MLOG_INIT_FILE_PAGE2 = 59, MLOG_INIT_FILE_PAGE2 = 59,
/** Table is being truncated. (Marked only for file-per-table) */ /** Table is being truncated. (Marked only for file-per-table) */
......
...@@ -1400,7 +1400,6 @@ recv_parse_or_apply_log_rec_body( ...@@ -1400,7 +1400,6 @@ recv_parse_or_apply_log_rec_body(
/* Allow anything in page_type when creating a page. */ /* Allow anything in page_type when creating a page. */
ptr = ibuf_parse_bitmap_init(ptr, end_ptr, block, mtr); ptr = ibuf_parse_bitmap_init(ptr, end_ptr, block, mtr);
break; break;
case MLOG_INIT_FILE_PAGE:
case MLOG_INIT_FILE_PAGE2: case MLOG_INIT_FILE_PAGE2:
/* Allow anything in page_type when creating a page. */ /* Allow anything in page_type when creating a page. */
ptr = fsp_parse_init_file_page(ptr, end_ptr, block); ptr = fsp_parse_init_file_page(ptr, end_ptr, block);
...@@ -1753,18 +1752,6 @@ recv_recover_page(bool just_read_in, buf_block_t* block) ...@@ -1753,18 +1752,6 @@ recv_recover_page(bool just_read_in, buf_block_t* block)
buf = ((byte*)(recv->data)) + sizeof(recv_data_t); buf = ((byte*)(recv->data)) + sizeof(recv_data_t);
} }
if (recv->type == MLOG_INIT_FILE_PAGE) {
page_lsn = page_newest_lsn;
memset(FIL_PAGE_LSN + page, 0, 8);
memset(UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM
+ page, 0, 8);
if (page_zip) {
memset(FIL_PAGE_LSN + page_zip->data, 0, 8);
}
}
/* If per-table tablespace was truncated and there exist REDO /* If per-table tablespace was truncated and there exist REDO
records before truncate that are to be applied as part of records before truncate that are to be applied as part of
recovery (checkpoint didn't happen since truncate was done) recovery (checkpoint didn't happen since truncate was done)
...@@ -3619,9 +3606,6 @@ get_mlog_string(mlog_id_t type) ...@@ -3619,9 +3606,6 @@ get_mlog_string(mlog_id_t type)
return("MLOG_LSN"); return("MLOG_LSN");
#endif /* UNIV_LOG_LSN_DEBUG */ #endif /* UNIV_LOG_LSN_DEBUG */
case MLOG_INIT_FILE_PAGE:
return("MLOG_INIT_FILE_PAGE");
case MLOG_WRITE_STRING: case MLOG_WRITE_STRING:
return("MLOG_WRITE_STRING"); return("MLOG_WRITE_STRING");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment