From e02ce4ad416b0c2b4e4f00da99df7412e168becf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 29 Sep 2026 15:34:10 +0300 Subject: [PATCH] MDEV-41310: Assertion current_lsn < archive_header_was_reset failed log_t::write_checkpoint(): Correct an off-by-one error in the assertion expression. We may reach the very end of the current log file. A subsequent log_t::write_buf() will invoke archive_new_write(), which will create a new log file if needed. Tested by: Saahil Alam --- storage/innobase/buf/buf0flu.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index 299da45582c..9c3811a010c 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -1941,7 +1941,7 @@ inline lsn_t log_t::write_checkpoint(lsn_t checkpoint, lsn_t end_lsn) noexcept set_capacity(); archive_header_was_reset= first_lsn + capacity(); ut_ad(current_lsn >= first_lsn); - ut_ad(current_lsn < archive_header_was_reset); + ut_ad(current_lsn <= archive_header_was_reset); next_checkpoint_no= uint16_t(4 * is_encrypted()); if (is_encrypted())