summaryrefslogtreecommitdiff
path: root/mysql-test/suite/encryption/r/innodb-corrupted.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/encryption/r/innodb-corrupted.result')
-rw-r--r--mysql-test/suite/encryption/r/innodb-corrupted.result146
1 files changed, 146 insertions, 0 deletions
diff --git a/mysql-test/suite/encryption/r/innodb-corrupted.result b/mysql-test/suite/encryption/r/innodb-corrupted.result
new file mode 100644
index 00000000000..be745777c04
--- /dev/null
+++ b/mysql-test/suite/encryption/r/innodb-corrupted.result
@@ -0,0 +1,146 @@
+set global innodb_encrypt_tables='FORCE';
+select @@innodb_encrypt_tables;
+@@innodb_encrypt_tables
+FORCE
+set global innodb_default_encryption_key_id=4;
+select @@innodb_default_encryption_key_id;
+@@innodb_default_encryption_key_id
+1
+set global innodb_compression_algorithm=zlib;
+select @@innodb_compression_algorithm;
+@@innodb_compression_algorithm
+zlib
+set global innodb_file_format = `Barracuda`;
+set global innodb_file_per_table = on;
+call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page \\[page id: space=[0-9]+, page number=[0-9]+\\]. You may have to recover from a backup.");
+call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t2 page \\[page id: space=[0-9]+, page number=[0-9]+\\]. You may have to recover from a backup.");
+call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t3 page \\[page id: space=[0-9]+, page number=[0-9]+\\]. You may have to recover from a backup.");
+call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t4 page \\[page id: space=[0-9]+, page number=[0-9]+\\]. You may have to recover from a backup.");
+call mtr.add_suppression("InnoDB: Page \\[page id: space=[0-9]+, page number= [0-9]+\\] in file ./test/t[0-9]+.ibd may be corrupted. Post compression checksum [0-9]+ stored [0-9]+ compression_method [ZLIB|SNAPPY|LZ4|LZO|LZMA|BZIP2]");
+call mtr.add_suppression("InnoDB: Background Page read failed to read or decrypt \\[page id: space=[0-9]+, page number=[0-9]+\\]");
+call mtr.add_suppression("mysqld: Index for table 't[0-9]+' is corrupt; try to repair it");
+create table t0 (c1 int not null auto_increment primary key, b char(200)) engine=innodb;
+create table t1 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=1;
+create table t2 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=2;
+create table t3 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=3;
+create table t4 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=4;
+create table t5 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=5;
+create table t6 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=6;
+create table t7 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=7;
+create table t8 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=8;
+create table t9 (c1 int not null auto_increment primary key, b char(200)) engine=innodb page_compressed=1 page_compression_level=9;
+select count(*) from t1;
+count(*)
+50
+select count(*) from t3;
+count(*)
+50
+select count(*) from t4;
+count(*)
+50
+select count(*) from t5;
+count(*)
+50
+select count(*) from t6;
+count(*)
+50
+select count(*) from t6;
+count(*)
+50
+select count(*) from t7;
+count(*)
+50
+select count(*) from t8;
+count(*)
+50
+select count(*) from t9;
+count(*)
+50
+# t0 expected FOUND
+NOT FOUND /AaAaAaAa/ in t0.ibd
+# t1 page compressed expected NOT FOUND
+NOT FOUND /AaAaAaAa/ in t1.ibd
+# t2 page compressed expected NOT FOUND
+NOT FOUND /AaAaAaAa/ in t2.ibd
+# t3 page compressed expected NOT FOUND
+NOT FOUND /AaAaAaAa/ in t3.ibd
+# t4 page compressed expected NOT FOUND
+NOT FOUND /AaAaAaAa/ in t4.ibd
+# t5 page compressed expected NOT FOUND
+NOT FOUND /AaAaAaAa/ in t5.ibd
+# t6 page compressed expected NOT FOUND
+NOT FOUND /AaAaAaAa/ in t6.ibd
+# t7 page compressed expected NOT FOUND
+NOT FOUND /AaAaAaAa/ in t7.ibd
+# t8 page compressed expected NOT FOUND
+NOT FOUND /AaAaAaAa/ in t8.ibd
+# t9 page compressed expected NOT FOUND
+NOT FOUND /AaAaAaAa/ in t9.ibd
+# Run innochecksum on t9
+# Run innochecksum on t8
+# Run innochecksum on t7
+# Run innochecksum on t6
+# Run innochecksum on t5
+# Run innochecksum on t4
+# Run innochecksum on t3
+# Run innochecksum on t2
+# Run innochecksum on t1
+select count(*) from t0;
+count(*)
+50
+select count(*) from t1;
+count(*)
+50
+select count(*) from t3;
+count(*)
+50
+select count(*) from t4;
+count(*)
+50
+select count(*) from t5;
+count(*)
+50
+select count(*) from t6;
+count(*)
+50
+select count(*) from t7;
+count(*)
+50
+select count(*) from t8;
+count(*)
+50
+select count(*) from t9;
+count(*)
+50
+# Restart server
+# Corrupting tablespaces...
+# Corruption done
+# Run innochecksum on t0
+# Run innochecksum on t4
+# Run innochecksum on t3
+# Run innochecksum on t2
+# Start server again
+select * from t1;
+Got one of the listed errors
+select * from t2;
+Got one of the listed errors
+select * from t3;
+Got one of the listed errors
+select * from t4;
+Got one of the listed errors
+select count(*) from t5;
+count(*)
+50
+select count(*) from t6;
+count(*)
+50
+select count(*) from t7;
+count(*)
+50
+select count(*) from t8;
+count(*)
+50
+select count(*) from t9;
+count(*)
+50
+drop table t0, t1, t2, t3, t4, t5, t6, t7, t8, t9;