mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
31 lines
1.7 KiB
Plaintext
31 lines
1.7 KiB
Plaintext
call mtr.add_suppression("Table `test`\\.`t[123]` (has an unreadable root page|is corrupted)");
|
|
call mtr.add_suppression("InnoDB: File '.*test/t[123]\\.ibd' is corrupted");
|
|
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t[13]\\.ibd'");
|
|
call mtr.add_suppression("InnoDB: Failed to read page 6 from file '.*test/t2\\.ibd'");
|
|
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page number=[36]\\] in file .*test.t[123]\\.ibd looks corrupted; key_version=");
|
|
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption in an InnoDB type table");
|
|
call mtr.add_suppression("\\[ERROR\\] mariadbd.*: Index for table 't2' is corrupt; try to repair it");
|
|
set global innodb_compression_algorithm = 1;
|
|
# Create and populate tables to be corrupted
|
|
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT,c char(200)) ENGINE=InnoDB encrypted=yes;
|
|
CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT,c char(200)) ENGINE=InnoDB row_format=compressed encrypted=yes;
|
|
CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=InnoDB page_compressed=yes encrypted=yes;
|
|
BEGIN;
|
|
INSERT INTO t1 (b,c) VALUES ('corrupt me','secret');
|
|
INSERT INTO t1 (b,c) VALUES ('corrupt me','moresecretmoresecret');
|
|
INSERT INTO t2 select * from t1;
|
|
INSERT INTO t3 select * from t1;
|
|
COMMIT;
|
|
# Backup tables before corrupting
|
|
# Corrupt tables
|
|
# restart
|
|
SELECT * FROM t1;
|
|
ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate.
|
|
SELECT * FROM t2;
|
|
Got one of the listed errors
|
|
SELECT * FROM t3;
|
|
ERROR HY000: Table `test`.`t3` is corrupted. Please drop the table and recreate.
|
|
# Restore the original tables
|
|
# restart
|
|
DROP TABLE t1,t2,t3;
|