• Marko Mäkelä's avatar
    MDEV-21132 Remove buf_page_t::newest_modification · 312569e2
    Marko Mäkelä authored
    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.
    312569e2
log0recv.cc 106 KB