summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-11-25 09:39:51 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-11-25 09:39:51 +0200
commit312569e2fd79a6582161900e726847ad688ee3b0 (patch)
tree752095deba1341a42fc49393592beca2d8afc2c8 /extra
parent777b39961881b578854ea8eef47522319f0c00bb (diff)
downloadmariadb-git-312569e2fd79a6582161900e726847ad688ee3b0.tar.gz
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.
Diffstat (limited to 'extra')
-rw-r--r--extra/mariabackup/xtrabackup.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 6353b8f063c..03a82bfc58b 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -4585,7 +4585,7 @@ xb_space_create_file(
if (!zip_size) {
buf_flush_init_for_writing(
- NULL, page, NULL, 0,
+ NULL, page, NULL,
fil_space_t::full_crc32(flags));
ret = os_file_write(IORequestWrite, path, *file, page, 0,
@@ -4602,7 +4602,7 @@ xb_space_create_file(
page_zip.m_end = page_zip.m_nonempty =
page_zip.n_blobs = 0;
- buf_flush_init_for_writing(NULL, page, &page_zip, 0, false);
+ buf_flush_init_for_writing(NULL, page, &page_zip, false);
ret = os_file_write(IORequestWrite, path, *file,
page_zip.data, 0, zip_size);