mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
MDEV-29435 CHECK TABLE forgets to release latches after reporting failure
btr_validate_level(): Invoke mtr.commit() after a failure.
This omission was introduced in
commit 0b47c126e3
(MDEV-13542).
This commit is contained in:
@@ -17,4 +17,8 @@ pk c
|
|||||||
1 sql
|
1 sql
|
||||||
SELECT * FROM t1 WHERE pk = 12;
|
SELECT * FROM t1 WHERE pk = 12;
|
||||||
ERROR HY000: Index for table 't1' is corrupt; try to repair it
|
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;
|
DROP TABLE t1;
|
||||||
|
@@ -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("\\[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: 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: File '.*test/t1\\.ibd' is corrupted");
|
||||||
|
call mtr.add_suppression("InnoDB: In page .* of index `PRIMARY` of table `test`\\.`t1`");
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
CREATE TABLE t1 (pk INT PRIMARY KEY, c CHAR(255))ENGINE=InnoDB STATS_PERSISTENT=0;
|
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;
|
SELECT * FROM t1 WHERE PK = 1;
|
||||||
--error ER_NOT_KEYFILE
|
--error ER_NOT_KEYFILE
|
||||||
SELECT * FROM t1 WHERE pk = 12;
|
SELECT * FROM t1 WHERE pk = 12;
|
||||||
|
CHECK TABLE t1;
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
let $restart_parameters=;
|
let $restart_parameters=;
|
||||||
|
@@ -4879,6 +4879,7 @@ corrupted:
|
|||||||
loop:
|
loop:
|
||||||
if (!block) {
|
if (!block) {
|
||||||
invalid_page:
|
invalid_page:
|
||||||
|
mtr.commit();
|
||||||
func_exit:
|
func_exit:
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
return err;
|
return err;
|
||||||
|
Reference in New Issue
Block a user