diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2023-02-06 20:29:29 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2023-02-06 20:29:29 +0200 |
commit | 461402a56432fa5cd0f6d53118ccce23081fca18 (patch) | |
tree | 5b47d9d2c471b46c6aabb9f8beb604fd6f8e278e | |
parent | ff12a5b8977439da0675ecb9e8be1d215549d4a3 (diff) | |
download | mariadb-git-461402a56432fa5cd0f6d53118ccce23081fca18.tar.gz |
MDEV-30479 OPT_PAGE_CHECKSUM mismatch after innodb_undo_log_truncate=ON
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.
-rw-r--r-- | storage/innobase/log/log0recv.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index d21251dd2d9..7129de59e64 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -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); |