From bdf62ece6ce8d397c3ee3e4669b4e7a62da4f939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 31 Aug 2022 17:52:16 +0300 Subject: MDEV-29374 InnoDB recovery fails with "Data structure corruption" recv_sys_t::free_corrupted_page(): Identify the corrupted page in an error or warning message. buf_page_free(): Just in case, register the page as modified. This should already have been done in mtr_t::free() as part of fseg_free_page_low(). mtr_t::memo_push(): Simplify a condition, so that when invoked with MTR_MEMO_PAGE_X_MODIFY, we will do the right thing. fseg_free_page_low(): Remove an accidentally added return statement that prevented mtr_t::free() from being called. This fixes a regression that was introduced in commit 0b47c126e31cddda1e94588799599e138400bcf8 (MDEV-13542). --- mysql-test/suite/encryption/r/innodb-redo-badkey.result | 1 + mysql-test/suite/encryption/t/corrupted_during_recovery.test | 1 + mysql-test/suite/encryption/t/innodb-redo-badkey.test | 1 + 3 files changed, 3 insertions(+) (limited to 'mysql-test/suite/encryption') diff --git a/mysql-test/suite/encryption/r/innodb-redo-badkey.result b/mysql-test/suite/encryption/r/innodb-redo-badkey.result index 9d583b32101..34fd043a7bd 100644 --- a/mysql-test/suite/encryption/r/innodb-redo-badkey.result +++ b/mysql-test/suite/encryption/r/innodb-redo-badkey.result @@ -8,6 +8,7 @@ call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed r call mtr.add_suppression("InnoDB: Failed to read page .* from file '.*'"); call mtr.add_suppression("InnoDB: OPT_PAGE_CHECKSUM mismatch"); call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore corruption"); +call mtr.add_suppression("InnoDB: (Unable to apply log to|Discarding log for) corrupted page "); call mtr.add_suppression("InnoDB: Plugin initialization aborted"); call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed"); call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space="); diff --git a/mysql-test/suite/encryption/t/corrupted_during_recovery.test b/mysql-test/suite/encryption/t/corrupted_during_recovery.test index 70650d0f746..bccac2bb182 100644 --- a/mysql-test/suite/encryption/t/corrupted_during_recovery.test +++ b/mysql-test/suite/encryption/t/corrupted_during_recovery.test @@ -9,6 +9,7 @@ call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed r call mtr.add_suppression("InnoDB: Failed to read page [123] from file '.*test.t1\\.ibd': Table is encrypted but decrypt failed"); call mtr.add_suppression("InnoDB: The page \\[page id: space=\\d+, page number=3\\] in file '.*test.t1\\.ibd' cannot be decrypted"); call mtr.add_suppression("InnoDB: Table in tablespace \\d+ encrypted. However key management plugin or used key_version \\d+ is not found or used encryption algorithm or method does not match. Can't continue opening the table."); +call mtr.add_suppression("InnoDB: (Unable to apply log to|Discarding log for) corrupted page "); --enable_query_log let INNODB_PAGE_SIZE=`select @@innodb_page_size`; diff --git a/mysql-test/suite/encryption/t/innodb-redo-badkey.test b/mysql-test/suite/encryption/t/innodb-redo-badkey.test index fba342aad04..393ca4ad375 100644 --- a/mysql-test/suite/encryption/t/innodb-redo-badkey.test +++ b/mysql-test/suite/encryption/t/innodb-redo-badkey.test @@ -17,6 +17,7 @@ call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed r call mtr.add_suppression("InnoDB: Failed to read page .* from file '.*'"); call mtr.add_suppression("InnoDB: OPT_PAGE_CHECKSUM mismatch"); call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore corruption"); +call mtr.add_suppression("InnoDB: (Unable to apply log to|Discarding log for) corrupted page "); call mtr.add_suppression("InnoDB: Plugin initialization aborted"); call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed"); # for innodb_checksum_algorithm=full_crc32 only -- cgit v1.2.1