diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index 5a6f73a9f01..2db693bf9f8 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -2798,8 +2798,6 @@ void recv_recover_page_func( #endif /* !UNIV_HOTBACKUP */ ) { - lsn_t end_lsn; - if (!modification_to_page) { #ifndef UNIV_HOTBACKUP ut_a(recv_needed_recovery); @@ -2824,16 +2822,7 @@ void recv_recover_page_func( recv_addr->space, recv_addr->page_no, block, &mtr, ULINT_UNDEFINED, LSN_MAX); - end_lsn = recv->start_lsn + recv->len; - - mach_write_to_8(FIL_PAGE_LSN + page, end_lsn); - mach_write_to_8(UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM + page, - end_lsn); - - if (page_zip) { - mach_write_to_8(FIL_PAGE_LSN + page_zip->data, end_lsn); - } #ifdef UNIV_HOTBACKUP ++applied_recs; } else { @@ -2856,6 +2845,15 @@ void recv_recover_page_func( #ifndef UNIV_HOTBACKUP if (modification_to_page) { + mach_write_to_8(FIL_PAGE_LSN + page, end_lsn); + + mach_write_to_8(UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM + page, + end_lsn); + + if (page_zip) { + mach_write_to_8(FIL_PAGE_LSN + page_zip->data, end_lsn); + } + buf_flush_recv_note_modification(block, start_lsn, end_lsn); } #else /* !UNIV_HOTBACKUP */