Skip to content

Commit

Permalink
MDEV-30479 OPT_PAGE_CHECKSUM mismatch after innodb_undo_log_truncate=ON
Browse files Browse the repository at this point in the history
page_recv_t::trim(): Do remove log records for mini-transactions
that end right at the threshold LSN. This will avoid an inconsistency
where a dirty page had been evicted from the buffer pool during
undo tablespace truncation, and recovery would attempt to apply
log records for which the last available copy in the data file is
too new. These changes would be discarded anyway.
  • Loading branch information
dr-m committed Feb 6, 2023
1 parent ff12a5b commit 461402a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/innobase/log/log0recv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@ inline bool page_recv_t::trim(lsn_t start_lsn)
{
while (log.head)
{
if (log.head->lsn >= start_lsn) return false;
if (log.head->lsn > start_lsn) return false;
last_offset= 1; /* the next record must not be same_page */
log_rec_t *next= log.head->next;
recv_sys.free(log.head);
Expand Down

0 comments on commit 461402a

Please sign in to comment.