diff options
3 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/leaf_page_corrupted_during_recovery.result b/mysql-test/suite/innodb/r/leaf_page_corrupted_during_recovery.result index 37ddb0a9348..ca010d663fa 100644 --- a/mysql-test/suite/innodb/r/leaf_page_corrupted_during_recovery.result +++ b/mysql-test/suite/innodb/r/leaf_page_corrupted_during_recovery.result @@ -17,4 +17,8 @@ pk c 1 sql SELECT * FROM t1 WHERE pk = 12; ERROR HY000: Index for table 't1' is corrupt; try to repair it +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check Warning InnoDB: The B-tree of index PRIMARY is corrupted. +test.t1 check error Corrupt DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test b/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test index d28712fec5c..ddf0090c9e2 100644 --- a/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test +++ b/mysql-test/suite/innodb/t/leaf_page_corrupted_during_recovery.test @@ -11,6 +11,7 @@ call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption"); call mtr.add_suppression("\\[ERROR\\] (mysqld|mariadbd).*: Index for table 't1' is corrupt; try to repair it"); call mtr.add_suppression("InnoDB: btr_pcur_open_low level: 0 table: `test`\\.`t1` index: `PRIMARY`"); call mtr.add_suppression("InnoDB: File '.*test/t1\\.ibd' is corrupted"); +call mtr.add_suppression("InnoDB: In page .* of index `PRIMARY` of table `test`\\.`t1`"); --enable_query_log CREATE TABLE t1 (pk INT PRIMARY KEY, c CHAR(255))ENGINE=InnoDB STATS_PERSISTENT=0; @@ -54,6 +55,7 @@ let $restart_parameters=--innodb-force-recovery=2; SELECT * FROM t1 WHERE PK = 1; --error ER_NOT_KEYFILE SELECT * FROM t1 WHERE pk = 12; +CHECK TABLE t1; DROP TABLE t1; let $restart_parameters=; diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc index 772ac99a5d5..3e48955e85a 100644 --- a/storage/innobase/btr/btr0btr.cc +++ b/storage/innobase/btr/btr0btr.cc @@ -4879,6 +4879,7 @@ corrupted: loop: if (!block) { invalid_page: + mtr.commit(); func_exit: mem_heap_free(heap); return err; |