mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 11:57:38 +02:00
MDEV-21132 Remove buf_page_t::newest_modification
At each mini-transaction commit, the log sequence number of the mini-transaction must be written to each modified page, so that it will be available in the FIL_PAGE_LSN field when the page is being read in crash recovery. InnoDB was unnecessarily allocating redundant storage for the field, in buf_page_t::newest_modification. Let us access FIL_PAGE_LSN directly. Furthermore, on ALTER TABLE...IMPORT TABLESPACE, let us write 0 to FIL_PAGE_LSN instead of using log_sys.lsn. buf_flush_init_for_writing(), buf_flush_update_zip_checksum(), fil_encrypt_buf_for_full_crc32(), fil_encrypt_buf(), fil_space_encrypt(): Remove the parameter lsn. buf_page_get_newest_modification(): Merge with the only caller. buf_tmp_reserve_compression_buf(), buf_tmp_page_encrypt(), buf_page_encrypt(): Define static in the same compilation unit with the only caller. PageConverter::m_current_lsn: Remove. Write 0 to FIL_PAGE_LSN on ALTER TABLE...IMPORT TABLESPACE.
This commit is contained in:
parent
777b399618
commit
312569e2fd
13 changed files with 291 additions and 451 deletions
|
|
@ -4255,8 +4255,6 @@ i_s_innodb_buffer_page_get_info(
|
|||
|
||||
page_info->fix_count = bpage->buf_fix_count;
|
||||
|
||||
page_info->newest_mod = bpage->newest_modification;
|
||||
|
||||
page_info->oldest_mod = bpage->oldest_modification;
|
||||
|
||||
page_info->access_time = bpage->access_time;
|
||||
|
|
@ -4276,6 +4274,7 @@ i_s_innodb_buffer_page_get_info(
|
|||
break;
|
||||
case BUF_IO_READ:
|
||||
page_info->page_type = I_S_PAGE_TYPE_UNKNOWN;
|
||||
page_info->newest_mod = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -4296,6 +4295,7 @@ i_s_innodb_buffer_page_get_info(
|
|||
frame = bpage->zip.data;
|
||||
}
|
||||
|
||||
page_info->newest_mod = mach_read_from_8(FIL_PAGE_LSN + frame);
|
||||
i_s_innodb_set_page_type(page_info, frame);
|
||||
} else {
|
||||
page_info->page_type = I_S_PAGE_TYPE_UNKNOWN;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue