| 1 |
call mtr.add_suppression("Table `test`\\.`t[123]` (has an unreadable root page|is corrupted)"); |
| 2 |
call mtr.add_suppression("InnoDB: File '.*test/t[123]\\.ibd' is corrupted"); |
| 3 |
call mtr.add_suppression("InnoDB: Failed to read page 3 from file '.*test/t[13]\\.ibd'"); |
| 4 |
call mtr.add_suppression("InnoDB: Failed to read page 6 from file '.*test/t2\\.ibd'"); |
| 5 |
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page number=[36]\\] in file .*test.t[123]\\.ibd looks corrupted; key_version="); |
| 6 |
call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption in an InnoDB type table"); |
| 7 |
call mtr.add_suppression("\\[ERROR\\] mariadbd.*: Index for table 't2' is corrupt; try to repair it"); |
| 8 |
set global innodb_compression_algorithm = 1; |
| 9 |
# Create and populate tables to be corrupted |
| 10 |
CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT,c char(200)) ENGINE=InnoDB encrypted=yes; |
| 11 |
CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT,c char(200)) ENGINE=InnoDB row_format=compressed encrypted=yes; |
| 12 |
CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200)) ENGINE=InnoDB page_compressed=yes encrypted=yes; |
| 13 |
BEGIN; |
| 14 |
INSERT INTO t1 (b,c) VALUES ('corrupt me','secret'); |
| 15 |
INSERT INTO t1 (b,c) VALUES ('corrupt me','moresecretmoresecret'); |
| 16 |
INSERT INTO t2 select * from t1; |
| 17 |
INSERT INTO t3 select * from t1; |
| 18 |
COMMIT; |
| 19 |
# Backup tables before corrupting |
| 20 |
# Corrupt tables |
| 21 |
# restart |
| 22 |
SELECT * FROM t1; |
| 23 |
ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate. |
| 24 |
SELECT * FROM t2; |
| 25 |
Got one of the listed errors |
| 26 |
SELECT * FROM t3; |
| 27 |
ERROR HY000: Table `test`.`t3` is corrupted. Please drop the table and recreate. |
| 28 |
# Restore the original tables |
| 29 |
# restart |
| 30 |
DROP TABLE t1,t2,t3; |