diff options
Diffstat (limited to 'mysql-test')
22 files changed, 131 insertions, 1173 deletions
diff --git a/mysql-test/include/innodb_checksum_algorithm.combinations b/mysql-test/include/innodb_checksum_algorithm.combinations index 039bfaef676..4bdd89ae579 100644 --- a/mysql-test/include/innodb_checksum_algorithm.combinations +++ b/mysql-test/include/innodb_checksum_algorithm.combinations @@ -1,13 +1,6 @@ -[crc32] ---innodb-checksum-algorithm=crc32 - [strict_crc32] --innodb-checksum-algorithm=strict_crc32 --innodb-flush-sync=OFF -[full_crc32] ---innodb-checksum-algorithm=full_crc32 - [strict_full_crc32] --innodb-checksum-algorithm=strict_full_crc32 ---innodb-flush-sync=OFF diff --git a/mysql-test/suite/encryption/r/corrupted_during_recovery.result b/mysql-test/suite/encryption/r/corrupted_during_recovery.result index ea2f1ff3328..356dce64f8d 100644 --- a/mysql-test/suite/encryption/r/corrupted_during_recovery.result +++ b/mysql-test/suite/encryption/r/corrupted_during_recovery.result @@ -1,5 +1,3 @@ -# Work around MDEV-19541 -SET GLOBAL innodb_checksum_algorithm=crc32; CREATE TABLE t1(a BIGINT PRIMARY KEY) ENGINE=InnoDB, ENCRYPTED=YES; INSERT INTO t1 VALUES(1); CREATE TABLE t2(a BIGINT PRIMARY KEY) ENGINE=InnoDB, ENCRYPTED=YES; diff --git a/mysql-test/suite/encryption/r/innodb-checksum-algorithm,32k.rdiff b/mysql-test/suite/encryption/r/innodb-checksum-algorithm,32k.rdiff index d963cde132a..d8407ce5a03 100644 --- a/mysql-test/suite/encryption/r/innodb-checksum-algorithm,32k.rdiff +++ b/mysql-test/suite/encryption/r/innodb-checksum-algorithm,32k.rdiff @@ -1,38 +1,14 @@ --- suite/encryption/r/innodb-checksum-algorithm.result +++ suite/encryption/r/innodb-checksum-algorithm.result -@@ -13,9 +13,9 @@ +@@ -9,9 +9,9 @@ + SET GLOBAL innodb_checksum_algorithm = crc32; SET GLOBAL innodb_default_encryption_key_id=4; - SET GLOBAL innodb_checksum_algorithm=crc32; - create table tce_crc32(a serial, b blob, index(b(10))) engine=innodb + create table tce(a serial, b blob, index(b(10))) engine=innodb -ROW_FORMAT=COMPRESSED encrypted=yes; +ROW_FORMAT=DYNAMIC encrypted=yes; - create table tc_crc32(a serial, b blob, index(b(10))) engine=innodb + create table tc(a serial, b blob, index(b(10))) engine=innodb -ROW_FORMAT=COMPRESSED encrypted=no; +ROW_FORMAT=DYNAMIC encrypted=no; Warnings: Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1 - create table te_crc32(a serial, b blob, index(b(10))) engine=innodb -@@ -153,9 +153,9 @@ - t_crc32, tpe_crc32, tp_crc32; - SET GLOBAL innodb_checksum_algorithm=innodb; - create table tce_innodb(a serial, b blob, index(b(10))) engine=innodb --ROW_FORMAT=COMPRESSED encrypted=yes; -+ROW_FORMAT=DYNAMIC encrypted=yes; - create table tc_innodb(a serial, b blob, index(b(10))) engine=innodb --ROW_FORMAT=COMPRESSED encrypted=no; -+ROW_FORMAT=DYNAMIC encrypted=no; - Warnings: - Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1 - create table te_innodb(a serial, b blob, index(b(10))) engine=innodb -@@ -293,9 +293,9 @@ - t_innodb, tpe_innodb, tp_innodb; - SET GLOBAL innodb_checksum_algorithm=none; - create table tce_none(a serial, b blob, index(b(10))) engine=innodb --ROW_FORMAT=COMPRESSED encrypted=yes; -+ROW_FORMAT=DYNAMIC encrypted=yes; - create table tc_none(a serial, b blob, index(b(10))) engine=innodb --ROW_FORMAT=COMPRESSED encrypted=no; -+ROW_FORMAT=DYNAMIC encrypted=no; - Warnings: - Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1 - create table te_none(a serial, b blob, index(b(10))) engine=innodb + create table te(a serial, b blob, index(b(10))) engine=innodb diff --git a/mysql-test/suite/encryption/r/innodb-checksum-algorithm,64k.rdiff b/mysql-test/suite/encryption/r/innodb-checksum-algorithm,64k.rdiff index d963cde132a..d8407ce5a03 100644 --- a/mysql-test/suite/encryption/r/innodb-checksum-algorithm,64k.rdiff +++ b/mysql-test/suite/encryption/r/innodb-checksum-algorithm,64k.rdiff @@ -1,38 +1,14 @@ --- suite/encryption/r/innodb-checksum-algorithm.result +++ suite/encryption/r/innodb-checksum-algorithm.result -@@ -13,9 +13,9 @@ +@@ -9,9 +9,9 @@ + SET GLOBAL innodb_checksum_algorithm = crc32; SET GLOBAL innodb_default_encryption_key_id=4; - SET GLOBAL innodb_checksum_algorithm=crc32; - create table tce_crc32(a serial, b blob, index(b(10))) engine=innodb + create table tce(a serial, b blob, index(b(10))) engine=innodb -ROW_FORMAT=COMPRESSED encrypted=yes; +ROW_FORMAT=DYNAMIC encrypted=yes; - create table tc_crc32(a serial, b blob, index(b(10))) engine=innodb + create table tc(a serial, b blob, index(b(10))) engine=innodb -ROW_FORMAT=COMPRESSED encrypted=no; +ROW_FORMAT=DYNAMIC encrypted=no; Warnings: Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1 - create table te_crc32(a serial, b blob, index(b(10))) engine=innodb -@@ -153,9 +153,9 @@ - t_crc32, tpe_crc32, tp_crc32; - SET GLOBAL innodb_checksum_algorithm=innodb; - create table tce_innodb(a serial, b blob, index(b(10))) engine=innodb --ROW_FORMAT=COMPRESSED encrypted=yes; -+ROW_FORMAT=DYNAMIC encrypted=yes; - create table tc_innodb(a serial, b blob, index(b(10))) engine=innodb --ROW_FORMAT=COMPRESSED encrypted=no; -+ROW_FORMAT=DYNAMIC encrypted=no; - Warnings: - Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1 - create table te_innodb(a serial, b blob, index(b(10))) engine=innodb -@@ -293,9 +293,9 @@ - t_innodb, tpe_innodb, tp_innodb; - SET GLOBAL innodb_checksum_algorithm=none; - create table tce_none(a serial, b blob, index(b(10))) engine=innodb --ROW_FORMAT=COMPRESSED encrypted=yes; -+ROW_FORMAT=DYNAMIC encrypted=yes; - create table tc_none(a serial, b blob, index(b(10))) engine=innodb --ROW_FORMAT=COMPRESSED encrypted=no; -+ROW_FORMAT=DYNAMIC encrypted=no; - Warnings: - Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1 - create table te_none(a serial, b blob, index(b(10))) engine=innodb + create table te(a serial, b blob, index(b(10))) engine=innodb diff --git a/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result b/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result index ff42e975b8d..7b97eb6b5bd 100644 --- a/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result +++ b/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result @@ -1,439 +1,98 @@ SET @saved_file_per_table = @@global.innodb_file_per_table; -SET @saved_checksum_algorithm = @@global.innodb_checksum_algorithm; SET @saved_encrypt_tables = @@global.innodb_encrypt_tables; SET @saved_encryption_threads = @@global.innodb_encryption_threads; SET @saved_encryption_key_id = @@global.innodb_default_encryption_key_id; SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_encrypt_tables = ON; SET GLOBAL innodb_encryption_threads = 4; -call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_(crc32|none|innodb)\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"(innodb|none|crc32)\""); -SET GLOBAL innodb_checksum_algorithm = innodb; SET GLOBAL innodb_default_encryption_key_id=4; -SET GLOBAL innodb_checksum_algorithm=crc32; -create table tce_crc32(a serial, b blob, index(b(10))) engine=innodb +create table tce(a serial, b blob, index(b(10))) engine=innodb ROW_FORMAT=COMPRESSED encrypted=yes; -create table tc_crc32(a serial, b blob, index(b(10))) engine=innodb +create table tc(a serial, b blob, index(b(10))) engine=innodb ROW_FORMAT=COMPRESSED encrypted=no; Warnings: Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1 -create table te_crc32(a serial, b blob, index(b(10))) engine=innodb +create table te(a serial, b blob, index(b(10))) engine=innodb encrypted=yes; -create table t_crc32(a serial, b blob, index(b(10))) engine=innodb +create table t(a serial, b blob, index(b(10))) engine=innodb encrypted=no; Warnings: Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1 -create table tpe_crc32(a serial, b blob, index(b(10))) engine=innodb +create table tpe(a serial, b blob, index(b(10))) engine=innodb page_compressed=yes encrypted=yes; -create table tp_crc32(a serial, b blob, index(b(10))) engine=innodb +create table tp(a serial, b blob, index(b(10))) engine=innodb page_compressed=yes encrypted=no; Warnings: Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1 begin; -insert into tce_crc32(b) values (repeat('secret',20)); -insert into tc_crc32(b) values (repeat('secret',20)); -insert into te_crc32(b) values (repeat('secret',20)); -insert into t_crc32(b) values (repeat('secret',20)); -insert into tpe_crc32(b) values (repeat('secret',20)); -insert into tp_crc32(b) values (repeat('secret',20)); +insert into tce(b) values (repeat('secret',20)); +insert into tc(b) values (repeat('secret',20)); +insert into te(b) values (repeat('secret',20)); +insert into t(b) values (repeat('secret',20)); +insert into tpe(b) values (repeat('secret',20)); +insert into tp(b) values (repeat('secret',20)); commit; -FLUSH TABLES tce_crc32, tc_crc32, te_crc32, -t_crc32, tpe_crc32, tp_crc32 FOR EXPORT; -backup: tce_crc32 -backup: tc_crc32 -backup: te_crc32 -backup: t_crc32 -backup: tpe_crc32 -backup: tp_crc32 +FLUSH TABLES tce, tc, te, t, tpe, tp FOR EXPORT; +backup: tce +backup: tc +backup: te +backup: t +backup: tpe +backup: tp db.opt -t_crc32.cfg -t_crc32.frm -t_crc32.ibd -tc_crc32.cfg -tc_crc32.frm -tc_crc32.ibd -tce_crc32.cfg -tce_crc32.frm -tce_crc32.ibd -te_crc32.cfg -te_crc32.frm -te_crc32.ibd -tp_crc32.cfg -tp_crc32.frm -tp_crc32.ibd -tpe_crc32.cfg -tpe_crc32.frm -tpe_crc32.ibd +t.cfg +t.frm +t.ibd +tc.cfg +tc.frm +tc.ibd +tce.cfg +tce.frm +tce.ibd +te.cfg +te.frm +te.ibd +tp.cfg +tp.frm +tp.ibd +tpe.cfg +tpe.frm +tpe.ibd UNLOCK TABLES; -SET GLOBAL innodb_checksum_algorithm=crc32; -ALTER TABLE tce_crc32 DISCARD TABLESPACE; -ALTER TABLE tc_crc32 DISCARD TABLESPACE; -ALTER TABLE te_crc32 DISCARD TABLESPACE; -ALTER TABLE t_crc32 DISCARD TABLESPACE; -ALTER TABLE tpe_crc32 DISCARD TABLESPACE; -ALTER TABLE tp_crc32 DISCARD TABLESPACE; -restore: tce_crc32 .ibd and .cfg files -restore: tc_crc32 .ibd and .cfg files -restore: te_crc32 .ibd and .cfg files -restore: t_crc32 .ibd and .cfg files -restore: tpe_crc32 .ibd and .cfg files -restore: tp_crc32 .ibd and .cfg files -ALTER TABLE tce_crc32 IMPORT TABLESPACE; -update tce_crc32 set b=substr(b,1); -ALTER TABLE tc_crc32 IMPORT TABLESPACE; -update tc_crc32 set b=substr(b,1); -ALTER TABLE te_crc32 IMPORT TABLESPACE; -update te_crc32 set b=substr(b,1); -ALTER TABLE t_crc32 IMPORT TABLESPACE; -update t_crc32 set b=substr(b,1); -ALTER TABLE tpe_crc32 IMPORT TABLESPACE; -update tpe_crc32 set b=substr(b,1); -ALTER TABLE tp_crc32 IMPORT TABLESPACE; -update tp_crc32 set b=substr(b,1); -SET GLOBAL innodb_checksum_algorithm=innodb; -ALTER TABLE tce_crc32 DISCARD TABLESPACE; -ALTER TABLE tc_crc32 DISCARD TABLESPACE; -ALTER TABLE te_crc32 DISCARD TABLESPACE; -ALTER TABLE t_crc32 DISCARD TABLESPACE; -ALTER TABLE tpe_crc32 DISCARD TABLESPACE; -ALTER TABLE tp_crc32 DISCARD TABLESPACE; -restore: tce_crc32 .ibd and .cfg files -restore: tc_crc32 .ibd and .cfg files -restore: te_crc32 .ibd and .cfg files -restore: t_crc32 .ibd and .cfg files -restore: tpe_crc32 .ibd and .cfg files -restore: tp_crc32 .ibd and .cfg files -ALTER TABLE tce_crc32 IMPORT TABLESPACE; -update tce_crc32 set b=substr(b,1); -ALTER TABLE tc_crc32 IMPORT TABLESPACE; -update tc_crc32 set b=substr(b,1); -ALTER TABLE te_crc32 IMPORT TABLESPACE; -update te_crc32 set b=substr(b,1); -ALTER TABLE t_crc32 IMPORT TABLESPACE; -update t_crc32 set b=substr(b,1); -ALTER TABLE tpe_crc32 IMPORT TABLESPACE; -update tpe_crc32 set b=substr(b,1); -ALTER TABLE tp_crc32 IMPORT TABLESPACE; -update tp_crc32 set b=substr(b,1); -SET GLOBAL innodb_checksum_algorithm=none; -ALTER TABLE tce_crc32 DISCARD TABLESPACE; -ALTER TABLE tc_crc32 DISCARD TABLESPACE; -ALTER TABLE te_crc32 DISCARD TABLESPACE; -ALTER TABLE t_crc32 DISCARD TABLESPACE; -ALTER TABLE tpe_crc32 DISCARD TABLESPACE; -ALTER TABLE tp_crc32 DISCARD TABLESPACE; -restore: tce_crc32 .ibd and .cfg files -restore: tc_crc32 .ibd and .cfg files -restore: te_crc32 .ibd and .cfg files -restore: t_crc32 .ibd and .cfg files -restore: tpe_crc32 .ibd and .cfg files -restore: tp_crc32 .ibd and .cfg files -ALTER TABLE tce_crc32 IMPORT TABLESPACE; -update tce_crc32 set b=substr(b,1); -ALTER TABLE tc_crc32 IMPORT TABLESPACE; -update tc_crc32 set b=substr(b,1); -ALTER TABLE te_crc32 IMPORT TABLESPACE; -update te_crc32 set b=substr(b,1); -ALTER TABLE t_crc32 IMPORT TABLESPACE; -update t_crc32 set b=substr(b,1); -ALTER TABLE tpe_crc32 IMPORT TABLESPACE; -update tpe_crc32 set b=substr(b,1); -ALTER TABLE tp_crc32 IMPORT TABLESPACE; -update tp_crc32 set b=substr(b,1); -CHECK TABLE tce_crc32, tc_crc32, te_crc32, -t_crc32, tpe_crc32, tp_crc32; +ALTER TABLE tce DISCARD TABLESPACE; +ALTER TABLE tc DISCARD TABLESPACE; +ALTER TABLE te DISCARD TABLESPACE; +ALTER TABLE t DISCARD TABLESPACE; +ALTER TABLE tpe DISCARD TABLESPACE; +ALTER TABLE tp DISCARD TABLESPACE; +restore: tce .ibd and .cfg files +restore: tc .ibd and .cfg files +restore: te .ibd and .cfg files +restore: t .ibd and .cfg files +restore: tpe .ibd and .cfg files +restore: tp .ibd and .cfg files +ALTER TABLE tce IMPORT TABLESPACE; +update tce set b=substr(b,1); +ALTER TABLE tc IMPORT TABLESPACE; +update tc set b=substr(b,1); +ALTER TABLE te IMPORT TABLESPACE; +update te set b=substr(b,1); +ALTER TABLE t IMPORT TABLESPACE; +update t set b=substr(b,1); +ALTER TABLE tpe IMPORT TABLESPACE; +update tpe set b=substr(b,1); +ALTER TABLE tp IMPORT TABLESPACE; +update tp set b=substr(b,1); +CHECK TABLE tce, tc, te, t, tpe, tp; Table Op Msg_type Msg_text -test.tce_crc32 check status OK -test.tc_crc32 check status OK -test.te_crc32 check status OK -test.t_crc32 check status OK -test.tpe_crc32 check status OK -test.tp_crc32 check status OK -DROP TABLE tce_crc32, tc_crc32, te_crc32, -t_crc32, tpe_crc32, tp_crc32; -SET GLOBAL innodb_checksum_algorithm=innodb; -create table tce_innodb(a serial, b blob, index(b(10))) engine=innodb -ROW_FORMAT=COMPRESSED encrypted=yes; -create table tc_innodb(a serial, b blob, index(b(10))) engine=innodb -ROW_FORMAT=COMPRESSED encrypted=no; -Warnings: -Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1 -create table te_innodb(a serial, b blob, index(b(10))) engine=innodb -encrypted=yes; -create table t_innodb(a serial, b blob, index(b(10))) engine=innodb -encrypted=no; -Warnings: -Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1 -create table tpe_innodb(a serial, b blob, index(b(10))) engine=innodb -page_compressed=yes encrypted=yes; -create table tp_innodb(a serial, b blob, index(b(10))) engine=innodb -page_compressed=yes encrypted=no; -Warnings: -Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1 -begin; -insert into tce_innodb(b) values (repeat('secret',20)); -insert into tc_innodb(b) values (repeat('secret',20)); -insert into te_innodb(b) values (repeat('secret',20)); -insert into t_innodb(b) values (repeat('secret',20)); -insert into tpe_innodb(b) values (repeat('secret',20)); -insert into tp_innodb(b) values (repeat('secret',20)); -commit; -FLUSH TABLES tce_innodb, tc_innodb, te_innodb, -t_innodb, tpe_innodb, tp_innodb FOR EXPORT; -backup: tce_innodb -backup: tc_innodb -backup: te_innodb -backup: t_innodb -backup: tpe_innodb -backup: tp_innodb -db.opt -t_innodb.cfg -t_innodb.frm -t_innodb.ibd -tc_innodb.cfg -tc_innodb.frm -tc_innodb.ibd -tce_innodb.cfg -tce_innodb.frm -tce_innodb.ibd -te_innodb.cfg -te_innodb.frm -te_innodb.ibd -tp_innodb.cfg -tp_innodb.frm -tp_innodb.ibd -tpe_innodb.cfg -tpe_innodb.frm -tpe_innodb.ibd -UNLOCK TABLES; -SET GLOBAL innodb_checksum_algorithm=crc32; -ALTER TABLE tce_innodb DISCARD TABLESPACE; -ALTER TABLE tc_innodb DISCARD TABLESPACE; -ALTER TABLE te_innodb DISCARD TABLESPACE; -ALTER TABLE t_innodb DISCARD TABLESPACE; -ALTER TABLE tpe_innodb DISCARD TABLESPACE; -ALTER TABLE tp_innodb DISCARD TABLESPACE; -restore: tce_innodb .ibd and .cfg files -restore: tc_innodb .ibd and .cfg files -restore: te_innodb .ibd and .cfg files -restore: t_innodb .ibd and .cfg files -restore: tpe_innodb .ibd and .cfg files -restore: tp_innodb .ibd and .cfg files -ALTER TABLE tce_innodb IMPORT TABLESPACE; -update tce_innodb set b=substr(b,1); -ALTER TABLE tc_innodb IMPORT TABLESPACE; -update tc_innodb set b=substr(b,1); -ALTER TABLE te_innodb IMPORT TABLESPACE; -update te_innodb set b=substr(b,1); -ALTER TABLE t_innodb IMPORT TABLESPACE; -update t_innodb set b=substr(b,1); -ALTER TABLE tpe_innodb IMPORT TABLESPACE; -update tpe_innodb set b=substr(b,1); -ALTER TABLE tp_innodb IMPORT TABLESPACE; -update tp_innodb set b=substr(b,1); -SET GLOBAL innodb_checksum_algorithm=innodb; -ALTER TABLE tce_innodb DISCARD TABLESPACE; -ALTER TABLE tc_innodb DISCARD TABLESPACE; -ALTER TABLE te_innodb DISCARD TABLESPACE; -ALTER TABLE t_innodb DISCARD TABLESPACE; -ALTER TABLE tpe_innodb DISCARD TABLESPACE; -ALTER TABLE tp_innodb DISCARD TABLESPACE; -restore: tce_innodb .ibd and .cfg files -restore: tc_innodb .ibd and .cfg files -restore: te_innodb .ibd and .cfg files -restore: t_innodb .ibd and .cfg files -restore: tpe_innodb .ibd and .cfg files -restore: tp_innodb .ibd and .cfg files -ALTER TABLE tce_innodb IMPORT TABLESPACE; -update tce_innodb set b=substr(b,1); -ALTER TABLE tc_innodb IMPORT TABLESPACE; -update tc_innodb set b=substr(b,1); -ALTER TABLE te_innodb IMPORT TABLESPACE; -update te_innodb set b=substr(b,1); -ALTER TABLE t_innodb IMPORT TABLESPACE; -update t_innodb set b=substr(b,1); -ALTER TABLE tpe_innodb IMPORT TABLESPACE; -update tpe_innodb set b=substr(b,1); -ALTER TABLE tp_innodb IMPORT TABLESPACE; -update tp_innodb set b=substr(b,1); -SET GLOBAL innodb_checksum_algorithm=none; -ALTER TABLE tce_innodb DISCARD TABLESPACE; -ALTER TABLE tc_innodb DISCARD TABLESPACE; -ALTER TABLE te_innodb DISCARD TABLESPACE; -ALTER TABLE t_innodb DISCARD TABLESPACE; -ALTER TABLE tpe_innodb DISCARD TABLESPACE; -ALTER TABLE tp_innodb DISCARD TABLESPACE; -restore: tce_innodb .ibd and .cfg files -restore: tc_innodb .ibd and .cfg files -restore: te_innodb .ibd and .cfg files -restore: t_innodb .ibd and .cfg files -restore: tpe_innodb .ibd and .cfg files -restore: tp_innodb .ibd and .cfg files -ALTER TABLE tce_innodb IMPORT TABLESPACE; -update tce_innodb set b=substr(b,1); -ALTER TABLE tc_innodb IMPORT TABLESPACE; -update tc_innodb set b=substr(b,1); -ALTER TABLE te_innodb IMPORT TABLESPACE; -update te_innodb set b=substr(b,1); -ALTER TABLE t_innodb IMPORT TABLESPACE; -update t_innodb set b=substr(b,1); -ALTER TABLE tpe_innodb IMPORT TABLESPACE; -update tpe_innodb set b=substr(b,1); -ALTER TABLE tp_innodb IMPORT TABLESPACE; -update tp_innodb set b=substr(b,1); -CHECK TABLE tce_innodb, tc_innodb, te_innodb, -t_innodb, tpe_innodb, tp_innodb; -Table Op Msg_type Msg_text -test.tce_innodb check status OK -test.tc_innodb check status OK -test.te_innodb check status OK -test.t_innodb check status OK -test.tpe_innodb check status OK -test.tp_innodb check status OK -DROP TABLE tce_innodb, tc_innodb, te_innodb, -t_innodb, tpe_innodb, tp_innodb; -SET GLOBAL innodb_checksum_algorithm=none; -create table tce_none(a serial, b blob, index(b(10))) engine=innodb -ROW_FORMAT=COMPRESSED encrypted=yes; -create table tc_none(a serial, b blob, index(b(10))) engine=innodb -ROW_FORMAT=COMPRESSED encrypted=no; -Warnings: -Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1 -create table te_none(a serial, b blob, index(b(10))) engine=innodb -encrypted=yes; -create table t_none(a serial, b blob, index(b(10))) engine=innodb -encrypted=no; -Warnings: -Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1 -create table tpe_none(a serial, b blob, index(b(10))) engine=innodb -page_compressed=yes encrypted=yes; -create table tp_none(a serial, b blob, index(b(10))) engine=innodb -page_compressed=yes encrypted=no; -Warnings: -Warning 140 InnoDB: ENCRYPTED=NO implies ENCRYPTION_KEY_ID=1 -begin; -insert into tce_none(b) values (repeat('secret',20)); -insert into tc_none(b) values (repeat('secret',20)); -insert into te_none(b) values (repeat('secret',20)); -insert into t_none(b) values (repeat('secret',20)); -insert into tpe_none(b) values (repeat('secret',20)); -insert into tp_none(b) values (repeat('secret',20)); -commit; -FLUSH TABLES tce_none, tc_none, te_none, -t_none, tpe_none, tp_none FOR EXPORT; -backup: tce_none -backup: tc_none -backup: te_none -backup: t_none -backup: tpe_none -backup: tp_none -db.opt -t_none.cfg -t_none.frm -t_none.ibd -tc_none.cfg -tc_none.frm -tc_none.ibd -tce_none.cfg -tce_none.frm -tce_none.ibd -te_none.cfg -te_none.frm -te_none.ibd -tp_none.cfg -tp_none.frm -tp_none.ibd -tpe_none.cfg -tpe_none.frm -tpe_none.ibd -UNLOCK TABLES; -SET GLOBAL innodb_checksum_algorithm=crc32; -ALTER TABLE tce_none DISCARD TABLESPACE; -ALTER TABLE tc_none DISCARD TABLESPACE; -ALTER TABLE te_none DISCARD TABLESPACE; -ALTER TABLE t_none DISCARD TABLESPACE; -ALTER TABLE tpe_none DISCARD TABLESPACE; -ALTER TABLE tp_none DISCARD TABLESPACE; -restore: tce_none .ibd and .cfg files -restore: tc_none .ibd and .cfg files -restore: te_none .ibd and .cfg files -restore: t_none .ibd and .cfg files -restore: tpe_none .ibd and .cfg files -restore: tp_none .ibd and .cfg files -ALTER TABLE tce_none IMPORT TABLESPACE; -update tce_none set b=substr(b,1); -ALTER TABLE tc_none IMPORT TABLESPACE; -update tc_none set b=substr(b,1); -ALTER TABLE te_none IMPORT TABLESPACE; -update te_none set b=substr(b,1); -ALTER TABLE t_none IMPORT TABLESPACE; -update t_none set b=substr(b,1); -ALTER TABLE tpe_none IMPORT TABLESPACE; -update tpe_none set b=substr(b,1); -ALTER TABLE tp_none IMPORT TABLESPACE; -update tp_none set b=substr(b,1); -SET GLOBAL innodb_checksum_algorithm=innodb; -ALTER TABLE tce_none DISCARD TABLESPACE; -ALTER TABLE tc_none DISCARD TABLESPACE; -ALTER TABLE te_none DISCARD TABLESPACE; -ALTER TABLE t_none DISCARD TABLESPACE; -ALTER TABLE tpe_none DISCARD TABLESPACE; -ALTER TABLE tp_none DISCARD TABLESPACE; -restore: tce_none .ibd and .cfg files -restore: tc_none .ibd and .cfg files -restore: te_none .ibd and .cfg files -restore: t_none .ibd and .cfg files -restore: tpe_none .ibd and .cfg files -restore: tp_none .ibd and .cfg files -ALTER TABLE tce_none IMPORT TABLESPACE; -update tce_none set b=substr(b,1); -ALTER TABLE tc_none IMPORT TABLESPACE; -update tc_none set b=substr(b,1); -ALTER TABLE te_none IMPORT TABLESPACE; -update te_none set b=substr(b,1); -ALTER TABLE t_none IMPORT TABLESPACE; -update t_none set b=substr(b,1); -ALTER TABLE tpe_none IMPORT TABLESPACE; -update tpe_none set b=substr(b,1); -ALTER TABLE tp_none IMPORT TABLESPACE; -update tp_none set b=substr(b,1); -SET GLOBAL innodb_checksum_algorithm=none; -ALTER TABLE tce_none DISCARD TABLESPACE; -ALTER TABLE tc_none DISCARD TABLESPACE; -ALTER TABLE te_none DISCARD TABLESPACE; -ALTER TABLE t_none DISCARD TABLESPACE; -ALTER TABLE tpe_none DISCARD TABLESPACE; -ALTER TABLE tp_none DISCARD TABLESPACE; -restore: tce_none .ibd and .cfg files -restore: tc_none .ibd and .cfg files -restore: te_none .ibd and .cfg files -restore: t_none .ibd and .cfg files -restore: tpe_none .ibd and .cfg files -restore: tp_none .ibd and .cfg files -ALTER TABLE tce_none IMPORT TABLESPACE; -update tce_none set b=substr(b,1); -ALTER TABLE tc_none IMPORT TABLESPACE; -update tc_none set b=substr(b,1); -ALTER TABLE te_none IMPORT TABLESPACE; -update te_none set b=substr(b,1); -ALTER TABLE t_none IMPORT TABLESPACE; -update t_none set b=substr(b,1); -ALTER TABLE tpe_none IMPORT TABLESPACE; -update tpe_none set b=substr(b,1); -ALTER TABLE tp_none IMPORT TABLESPACE; -update tp_none set b=substr(b,1); -CHECK TABLE tce_none, tc_none, te_none, -t_none, tpe_none, tp_none; -Table Op Msg_type Msg_text -test.tce_none check status OK -test.tc_none check status OK -test.te_none check status OK -test.t_none check status OK -test.tpe_none check status OK -test.tp_none check status OK -DROP TABLE tce_none, tc_none, te_none, -t_none, tpe_none, tp_none; +test.tce check status OK +test.tc check status OK +test.te check status OK +test.t check status OK +test.tpe check status OK +test.tp check status OK +DROP TABLE tce, tc, te, t, tpe, tp; SET GLOBAL innodb_file_per_table = @saved_file_per_table; -SET GLOBAL innodb_checksum_algorithm = @saved_checksum_algorithm; SET GLOBAL innodb_encrypt_tables = @saved_encrypt_tables; SET GLOBAL innodb_encryption_threads = @saved_encryption_threads; SET GLOBAL innodb_default_encryption_key_id = @saved_encryption_key_id; diff --git a/mysql-test/suite/encryption/t/corrupted_during_recovery.combinations b/mysql-test/suite/encryption/t/corrupted_during_recovery.combinations index 729380593f3..9ac914f22ed 100644 --- a/mysql-test/suite/encryption/t/corrupted_during_recovery.combinations +++ b/mysql-test/suite/encryption/t/corrupted_during_recovery.combinations @@ -1,5 +1,7 @@ [strict_crc32] --innodb-checksum-algorithm=strict_crc32 +--skip-innodb-doublewrite [strict_full_crc32] --innodb-checksum-algorithm=strict_full_crc32 +--skip-innodb-doublewrite diff --git a/mysql-test/suite/encryption/t/corrupted_during_recovery.test b/mysql-test/suite/encryption/t/corrupted_during_recovery.test index 48445ccb08b..70650d0f746 100644 --- a/mysql-test/suite/encryption/t/corrupted_during_recovery.test +++ b/mysql-test/suite/encryption/t/corrupted_during_recovery.test @@ -11,10 +11,7 @@ call mtr.add_suppression("InnoDB: The page \\[page id: space=\\d+, page number=3 call mtr.add_suppression("InnoDB: Table in tablespace \\d+ encrypted. However key management plugin or used key_version \\d+ is not found or used encryption algorithm or method does not match. Can't continue opening the table."); --enable_query_log -let INNODB_CHECKSUM_ALGORITHM = `SELECT @@innodb_checksum_algorithm`; let INNODB_PAGE_SIZE=`select @@innodb_page_size`; ---echo # Work around MDEV-19541 -SET GLOBAL innodb_checksum_algorithm=crc32; CREATE TABLE t1(a BIGINT PRIMARY KEY) ENGINE=InnoDB, ENCRYPTED=YES; INSERT INTO t1 VALUES(1); # Force a redo log checkpoint. diff --git a/mysql-test/suite/encryption/t/innodb-checksum-algorithm.test b/mysql-test/suite/encryption/t/innodb-checksum-algorithm.test index c9a4a9e1b92..157fb25b185 100644 --- a/mysql-test/suite/encryption/t/innodb-checksum-algorithm.test +++ b/mysql-test/suite/encryption/t/innodb-checksum-algorithm.test @@ -1,8 +1,8 @@ +-- source include/innodb_checksum_algorithm.inc -- source include/innodb_page_size.inc -- source include/have_file_key_management_plugin.inc SET @saved_file_per_table = @@global.innodb_file_per_table; -SET @saved_checksum_algorithm = @@global.innodb_checksum_algorithm; SET @saved_encrypt_tables = @@global.innodb_encrypt_tables; SET @saved_encryption_threads = @@global.innodb_encryption_threads; SET @saved_encryption_key_id = @@global.innodb_default_encryption_key_id; @@ -11,9 +11,6 @@ SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_encrypt_tables = ON; SET GLOBAL innodb_encryption_threads = 4; -call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_(crc32|none|innodb)\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"(innodb|none|crc32)\""); - -SET GLOBAL innodb_checksum_algorithm = innodb; SET GLOBAL innodb_default_encryption_key_id=4; let MYSQLD_DATADIR =`SELECT @@datadir`; @@ -22,96 +19,65 @@ let MYSQLD_DATADIR =`SELECT @@datadir`; let $row_format_compressed= `select case when @@global.innodb_page_size>16384 then 'ROW_FORMAT=DYNAMIC' else 'ROW_FORMAT=COMPRESSED' end`; -let $from = 3; -while ($from) -{ -dec $from; -let checksum = `select case $from - when 0 then 'none' - when 1 then 'innodb' - when 2 then 'crc32' - end`; -eval SET GLOBAL innodb_checksum_algorithm=$checksum; - -eval create table tce_$checksum(a serial, b blob, index(b(10))) engine=innodb +eval create table tce(a serial, b blob, index(b(10))) engine=innodb $row_format_compressed encrypted=yes; -eval create table tc_$checksum(a serial, b blob, index(b(10))) engine=innodb +eval create table tc(a serial, b blob, index(b(10))) engine=innodb $row_format_compressed encrypted=no; -eval create table te_$checksum(a serial, b blob, index(b(10))) engine=innodb +eval create table te(a serial, b blob, index(b(10))) engine=innodb encrypted=yes; -eval create table t_$checksum(a serial, b blob, index(b(10))) engine=innodb +eval create table t(a serial, b blob, index(b(10))) engine=innodb encrypted=no; -eval create table tpe_$checksum(a serial, b blob, index(b(10))) engine=innodb +eval create table tpe(a serial, b blob, index(b(10))) engine=innodb page_compressed=yes encrypted=yes; -eval create table tp_$checksum(a serial, b blob, index(b(10))) engine=innodb +eval create table tp(a serial, b blob, index(b(10))) engine=innodb page_compressed=yes encrypted=no; begin; -eval insert into tce_$checksum(b) values (repeat('secret',20)); -eval insert into tc_$checksum(b) values (repeat('secret',20)); -eval insert into te_$checksum(b) values (repeat('secret',20)); -eval insert into t_$checksum(b) values (repeat('secret',20)); -eval insert into tpe_$checksum(b) values (repeat('secret',20)); -eval insert into tp_$checksum(b) values (repeat('secret',20)); +eval insert into tce(b) values (repeat('secret',20)); +eval insert into tc(b) values (repeat('secret',20)); +eval insert into te(b) values (repeat('secret',20)); +eval insert into t(b) values (repeat('secret',20)); +eval insert into tpe(b) values (repeat('secret',20)); +eval insert into tp(b) values (repeat('secret',20)); commit; -eval FLUSH TABLES tce_$checksum, tc_$checksum, te_$checksum, -t_$checksum, tpe_$checksum, tp_$checksum FOR EXPORT; +eval FLUSH TABLES tce, tc, te, t, tpe, tp FOR EXPORT; perl; do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; -my @tables = ("tce_", "tc_", "te_", "t_", "tpe_", "tp_"); -ib_backup_tablespaces("test", map{ $_ . $ENV{checksum} } @tables); +ib_backup_tablespaces("test", ("tce", "tc", "te", "t", "tpe", "tp")); EOF --list_files $MYSQLD_DATADIR/test UNLOCK TABLES; -let $to = 3; -while ($to) -{ -dec $to; -let $tocksum = `select case $to - when 0 then 'none' - when 1 then 'innodb' - when 2 then 'crc32' - end`; - -eval SET GLOBAL innodb_checksum_algorithm=$tocksum; - -eval ALTER TABLE tce_$checksum DISCARD TABLESPACE; -eval ALTER TABLE tc_$checksum DISCARD TABLESPACE; -eval ALTER TABLE te_$checksum DISCARD TABLESPACE; -eval ALTER TABLE t_$checksum DISCARD TABLESPACE; -eval ALTER TABLE tpe_$checksum DISCARD TABLESPACE; -eval ALTER TABLE tp_$checksum DISCARD TABLESPACE; +ALTER TABLE tce DISCARD TABLESPACE; +ALTER TABLE tc DISCARD TABLESPACE; +ALTER TABLE te DISCARD TABLESPACE; +ALTER TABLE t DISCARD TABLESPACE; +ALTER TABLE tpe DISCARD TABLESPACE; +ALTER TABLE tp DISCARD TABLESPACE; perl; do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; -my @tables = ("tce_", "tc_", "te_", "t_", "tpe_", "tp_"); -ib_restore_tablespaces("test", map{ $_ . $ENV{checksum} } @tables); +ib_restore_tablespaces("test", ("tce", "tc", "te", "t", "tpe", "tp")); EOF -eval ALTER TABLE tce_$checksum IMPORT TABLESPACE; -eval update tce_$checksum set b=substr(b,1); -eval ALTER TABLE tc_$checksum IMPORT TABLESPACE; -eval update tc_$checksum set b=substr(b,1); -eval ALTER TABLE te_$checksum IMPORT TABLESPACE; -eval update te_$checksum set b=substr(b,1); -eval ALTER TABLE t_$checksum IMPORT TABLESPACE; -eval update t_$checksum set b=substr(b,1); -eval ALTER TABLE tpe_$checksum IMPORT TABLESPACE; -eval update tpe_$checksum set b=substr(b,1); -eval ALTER TABLE tp_$checksum IMPORT TABLESPACE; -eval update tp_$checksum set b=substr(b,1); -} - -eval CHECK TABLE tce_$checksum, tc_$checksum, te_$checksum, -t_$checksum, tpe_$checksum, tp_$checksum; -eval DROP TABLE tce_$checksum, tc_$checksum, te_$checksum, -t_$checksum, tpe_$checksum, tp_$checksum; -} +ALTER TABLE tce IMPORT TABLESPACE; +update tce set b=substr(b,1); +ALTER TABLE tc IMPORT TABLESPACE; +update tc set b=substr(b,1); +ALTER TABLE te IMPORT TABLESPACE; +update te set b=substr(b,1); +ALTER TABLE t IMPORT TABLESPACE; +update t set b=substr(b,1); +ALTER TABLE tpe IMPORT TABLESPACE; +update tpe set b=substr(b,1); +ALTER TABLE tp IMPORT TABLESPACE; +update tp set b=substr(b,1); + +CHECK TABLE tce, tc, te, t, tpe, tp; +DROP TABLE tce, tc, te, t, tpe, tp; SET GLOBAL innodb_file_per_table = @saved_file_per_table; -SET GLOBAL innodb_checksum_algorithm = @saved_checksum_algorithm; SET GLOBAL innodb_encrypt_tables = @saved_encrypt_tables; SET GLOBAL innodb_encryption_threads = @saved_encryption_threads; SET GLOBAL innodb_default_encryption_key_id = @saved_encryption_key_id; diff --git a/mysql-test/suite/encryption/t/innodb-compressed-blob.combinations b/mysql-test/suite/encryption/t/innodb-compressed-blob.combinations deleted file mode 100644 index df4560f06e5..00000000000 --- a/mysql-test/suite/encryption/t/innodb-compressed-blob.combinations +++ /dev/null @@ -1,4 +0,0 @@ -[crc32] -loose-innodb-checksum-algorithm=crc32 -[none] -loose-innodb-checksum-algorithm=none diff --git a/mysql-test/suite/innodb/t/page_id_innochecksum.test b/mysql-test/suite/innodb/t/page_id_innochecksum.test index 106da09df6d..2726b3254da 100644 --- a/mysql-test/suite/innodb/t/page_id_innochecksum.test +++ b/mysql-test/suite/innodb/t/page_id_innochecksum.test @@ -54,7 +54,7 @@ close IBD_FILE; EOF --error 1 -exec $INNOCHECKSUM -C crc32 -l $resultlog $MYSQLD_DATADIR/test/t1.ibd; +exec $INNOCHECKSUM -l $resultlog $MYSQLD_DATADIR/test/t1.ibd; let SEARCH_FILE = $MYSQLTEST_VARDIR/tmp/result.log; let SEARCH_PATTERN=page id mismatch; diff --git a/mysql-test/suite/innodb_zip/include/innodb-wl6045.inc b/mysql-test/suite/innodb_zip/include/innodb-wl6045.inc deleted file mode 100644 index 26ce7e72983..00000000000 --- a/mysql-test/suite/innodb_zip/include/innodb-wl6045.inc +++ /dev/null @@ -1,20 +0,0 @@ ---echo ===> Testing size=$size ---disable_warnings ---eval CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=$size ---enable_warnings - -insert into t1 values(1,"I"); -insert into t1 values(2,"AM"); -insert into t1 values(3,"COMPRESSED"); - ---source include/shutdown_mysqld.inc - ---exec $INNOCHECKSUM $MYSQLD_DATADIR/test/t1.ibd ---exec $INNOCHECKSUM --write=crc32 $MYSQLD_DATADIR/test/t1.ibd ---exec $INNOCHECKSUM --strict-check=crc32 $MYSQLD_DATADIR/test/t1.ibd ---exec $INNOCHECKSUM --write=none $MYSQLD_DATADIR/test/t1.ibd ---exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/t1.ibd - ---source include/start_mysqld.inc -select * from t1; -drop table t1; diff --git a/mysql-test/suite/innodb_zip/r/innochecksum.result b/mysql-test/suite/innodb_zip/r/innochecksum.result index e1d3a187186..e6525af4b52 100644 --- a/mysql-test/suite/innodb_zip/r/innochecksum.result +++ b/mysql-test/suite/innodb_zip/r/innochecksum.result @@ -1,96 +1,22 @@ -# Set the environmental variables call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts"); call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); CREATE TABLE tab1(c1 INT PRIMARY KEY,c2 VARCHAR(20)) ENGINE=InnoDB; CREATE INDEX idx1 ON tab1(c2(10)); INSERT INTO tab1 VALUES(1, 'Innochecksum InnoDB1'); -CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -insert into t1 values(1,"i"); -insert into t1 values(2,"am"); -insert into t1 values(3,"compressed table"); # Shutdown the Server # Server Default checksum = innodb [1b]: check the innochecksum without --strict-check -[2]: check the innochecksum with full form --strict-check=crc32 -[3]: check the innochecksum with short form -C crc32 [4]: check the innochecksum with --no-check ignores algorithm check, warning is expected FOUND 1 /Error: --no-check must be associated with --write option./ in my_restart.err [5]: check the innochecksum with short form --no-check ignores algorithm check, warning is expected FOUND 1 /Error: --no-check must be associated with --write option./ in my_restart.err [6]: check the innochecksum with full form strict-check & no-check , an error is expected -FOUND 1 /Error: --strict-check option cannot be used together with --no-check option./ in my_restart.err +FOUND 1 /unknown variable 'strict-check=innodb'/ in my_restart.err [7]: check the innochecksum with short form strict-check & no-check , an error is expected -FOUND 1 /Error: --strict-check option cannot be used together with --no-check option./ in my_restart.err -[8]: check the innochecksum with short & full form combination -# strict-check & no-check, an error is expected -FOUND 1 /Error: --strict-check option cannot be used together with --no-check option./ in my_restart.err -[9]: check the innochecksum with full form --strict-check=innodb -[10]: check the innochecksum with full form --strict-check=none -# when server Default checksum=crc32 -[11]: check the innochecksum with short form -C innodb -# when server Default checksum=crc32 -[12]: check the innochecksum with short form -C none -# when server Default checksum=crc32 -[13]: check strict-check with invalid values -FOUND 1 /Error while setting value \'strict_innodb\' to \'strict-check\'/ in my_restart.err -FOUND 1 /Error while setting value \'strict_innodb\' to \'strict-check\'/ in my_restart.err -FOUND 1 /Error while setting value \'strict_crc32\' to \'strict-check\'/ in my_restart.err -FOUND 1 /Error while setting value \'strict_crc32\' to \'strict-check\'/ in my_restart.err -FOUND 1 /Error while setting value \'strict_none\' to \'strict-check\'/ in my_restart.err -FOUND 1 /Error while setting value \'strict_none\' to \'strict-check\'/ in my_restart.err -FOUND 1 /Error while setting value \'InnoBD\' to \'strict-check\'/ in my_restart.err -FOUND 1 /Error while setting value \'InnoBD\' to \'strict-check\'/ in my_restart.err -FOUND 1 /Error while setting value \'crc\' to \'strict-check\'/ in my_restart.err -FOUND 1 /Error while setting value \'no\' to \'strict-check\'/ in my_restart.err -[14a]: when server default checksum=crc32 rewrite new checksum=crc32 with innochecksum -# Also check the long form of write option. -[14b]: when server default checksum=crc32 rewrite new checksum=innodb with innochecksum -# Also check the long form of write option. -# start the server with innodb_checksum_algorithm=InnoDB -# restart: --innodb_checksum_algorithm=innodb -INSERT INTO tab1 VALUES(2, 'Innochecksum CRC32'); -SELECT c1,c2 FROM tab1 order by c1,c2; -c1 c2 -1 Innochecksum InnoDB1 -2 Innochecksum CRC32 -# Stop the server -[15]: when server default checksum=crc32 rewrite new checksum=none with innochecksum -# Also check the short form of write option. -# Start the server with checksum algorithm=none -# restart: --innodb_checksum_algorithm=none -INSERT INTO tab1 VALUES(3, 'Innochecksum None'); -SELECT c1,c2 FROM tab1 order by c1,c2; -c1 c2 -1 Innochecksum InnoDB1 -2 Innochecksum CRC32 -3 Innochecksum None -DROP TABLE t1; -# Stop the server -[16]: rewrite into new checksum=crc32 with innochecksum -# Restart the DB server with innodb_checksum_algorithm=crc32 -# restart: --innodb_checksum_algorithm=crc32 -SELECT * FROM tab1; -c1 c2 -1 Innochecksum InnoDB1 -2 Innochecksum CRC32 -3 Innochecksum None -DELETE FROM tab1 where c1=3; -SELECT c1,c2 FROM tab1 order by c1,c2; -c1 c2 -1 Innochecksum InnoDB1 -2 Innochecksum CRC32 -# Stop server -[17]: rewrite into new checksum=InnoDB -# Restart the DB server with innodb_checksum_algorithm=InnoDB -# restart: --innodb_checksum_algorithm=innodb -DELETE FROM tab1 where c1=2; +FOUND 1 /unknown option '-C'/ in my_restart.err +FOUND 1 /unknown variable 'write=crc32'/ in my_restart.err +# restart SELECT * FROM tab1; c1 c2 1 Innochecksum InnoDB1 -# Stop server -[18]:check Innochecksum with invalid write options -FOUND 1 /Error while setting value \'strict_crc32\' to \'write\'/ in my_restart.err -FOUND 1 /Error while setting value \'strict_innodb\' to \'write\'/ in my_restart.err -FOUND 1 /Error while setting value \'crc23\' to \'write\'/ in my_restart.err -# restart DROP TABLE tab1; diff --git a/mysql-test/suite/innodb_zip/r/innochecksum_2.result b/mysql-test/suite/innodb_zip/r/innochecksum_2.result index bfd03c72f12..7be6f6f9af3 100644 --- a/mysql-test/suite/innodb_zip/r/innochecksum_2.result +++ b/mysql-test/suite/innodb_zip/r/innochecksum_2.result @@ -25,10 +25,8 @@ count FALSE start-page 0 end-page 0 page 0 -strict-check crc32 no-check FALSE allow-mismatches 0 -write crc32 page-type-summary FALSE page-type-dump MYSQLTEST_VARDIR/tmp/dump.txt per-page-details FALSE @@ -42,7 +40,7 @@ innochecksum Ver #.#.# Copyright (c) YEAR, YEAR , Oracle, MariaDB Corporation Ab and others. InnoDB offline file checksum utility. -Usage: innochecksum [-c] [-s <start page>] [-e <end page>] [-p <page>] [-i] [-v] [-a <allow mismatches>] [-n] [-C <strict-check>] [-w <write>] [-S] [-D <page type dump>] [-l <log>] [-l] [-m <merge pages>] <filename or [-]> +Usage: innochecksum [-c] [-s <start page>] [-e <end page>] [-p <page>] [-i] [-v] [-a <allow mismatches>] [-n] [-S] [-D <page type dump>] [-l <log>] [-l] [-m <merge pages>] <filename or [-]> See https://mariadb.com/kb/en/library/innochecksum/ for usage hints. -?, --help Displays this help and exits. -I, --info Synonym for --help. @@ -53,14 +51,9 @@ See https://mariadb.com/kb/en/library/innochecksum/ for usage hints. -s, --start-page=# Start on this page number (0 based). -e, --end-page=# End at this page number (0 based). -p, --page=# Check only this page (0 based). - -C, --strict-check=name - Specify the strict checksum algorithm by the user.. One - of: crc32, crc32, innodb, innodb, none, none -n, --no-check Ignore the checksum verification. -a, --allow-mismatches=# Maximum checksum mismatch allowed. - -w, --write=name Rewrite the checksum algorithm by the user.. One of: - crc32, crc32, innodb, innodb, none, none -S, --page-type-summary Display a count of each page type in a tablespace. -D, --page-type-dump=name @@ -80,10 +73,8 @@ count FALSE start-page 0 end-page 0 page 0 -strict-check crc32 no-check FALSE allow-mismatches 0 -write crc32 page-type-summary FALSE page-type-dump (No default value) per-page-details FALSE @@ -96,67 +87,3 @@ Number of pages:# [4]:# Print the version of innochecksum and exit innochecksum Ver #.#.## Restart the DB server DROP TABLE t1; -[5]:# Check the innochecksum for compressed table t1 with different key_block_size -# Test for KEY_BLOCK_SIZE=1 -===> Testing size=1 -CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; -insert into t1 values(1,"I"); -insert into t1 values(2,"AM"); -insert into t1 values(3,"COMPRESSED"); -select * from t1; -id msg -1 I -2 AM -3 COMPRESSED -drop table t1; -# Test for KEY_BLOCK_SIZE=2 -===> Testing size=2 -CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; -insert into t1 values(1,"I"); -insert into t1 values(2,"AM"); -insert into t1 values(3,"COMPRESSED"); -select * from t1; -id msg -1 I -2 AM -3 COMPRESSED -drop table t1; -# Test for for KEY_BLOCK_SIZE=4 -===> Testing size=4 -CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -insert into t1 values(1,"I"); -insert into t1 values(2,"AM"); -insert into t1 values(3,"COMPRESSED"); -select * from t1; -id msg -1 I -2 AM -3 COMPRESSED -drop table t1; -set innodb_strict_mode=off; -# Test for for KEY_BLOCK_SIZE=8 -===> Testing size=8 -CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -insert into t1 values(1,"I"); -insert into t1 values(2,"AM"); -insert into t1 values(3,"COMPRESSED"); -select * from t1; -id msg -1 I -2 AM -3 COMPRESSED -drop table t1; -set innodb_strict_mode=off; -# Test for KEY_BLOCK_SIZE=16 -===> Testing size=16 -CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16; -insert into t1 values(1,"I"); -insert into t1 values(2,"AM"); -insert into t1 values(3,"COMPRESSED"); -select * from t1; -id msg -1 I -2 AM -3 COMPRESSED -drop table t1; -# Test[5] completed diff --git a/mysql-test/suite/innodb_zip/r/innochecksum_3.result b/mysql-test/suite/innodb_zip/r/innochecksum_3.result index cfe1e4852ba..b7ba8704347 100644 --- a/mysql-test/suite/innodb_zip/r/innochecksum_3.result +++ b/mysql-test/suite/innodb_zip/r/innochecksum_3.result @@ -1,7 +1,6 @@ # Set the environmental variables call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts"); call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to.*"); -[1]: Further Test are for rewrite checksum (innodb|crc32|none) for all ibd file & start the server. CREATE TABLE tab1 (pk INTEGER NOT NULL PRIMARY KEY, linestring_key GEOMETRY NOT NULL, linestring_nokey GEOMETRY NOT NULL) @@ -35,58 +34,6 @@ INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7) VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,2); INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7) VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,1); -SELECT * FROM tab2 ORDER BY col_7; -# stop the server -[1(a)]: Rewrite into new checksum=InnoDB for all *.ibd file and ibdata1 -: start the server with innodb_checksum_algorithm=strict_innodb -# restart: --innodb_checksum_algorithm=strict_innodb -INSERT INTO tab1 (pk, linestring_key, linestring_nokey) -VALUES (2, ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'), ST_GeomFromText('LINESTRING(10 10,20 20,30 30)')); -SET @col_1 = repeat('a', 5); -SET @col_2 = repeat('b', 20); -SET @col_3 = repeat('c', 100); -SET @col_4 = repeat('d', 100); -SET @col_5 = repeat('e', 100); -SET @col_6 = repeat('f', 100); -INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7) -VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,6); -SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey) -FROM tab1 ORDER BY pk; -SELECT * FROM tab2 ORDER BY col_7; -# stop the server -[1(b)]: Rewrite into new checksum=crc32 for all *.ibd file and ibdata1 -# start the server with innodb_checksum_algorithm=strict_crc32 -# restart: --innodb_checksum_algorithm=strict_crc32 -INSERT INTO tab1 (pk, linestring_key, linestring_nokey) -VALUES (3, ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'), -ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))')); -SET @col_1 = repeat('g', 5); -SET @col_2 = repeat('h', 20); -SET @col_3 = repeat('i', 100); -SET @col_4 = repeat('j', 100); -SET @col_5 = repeat('k', 100); -SET @col_6 = repeat('l', 100); -INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7) -VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,7); -SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey) -FROM tab1 ORDER BY pk; -SELECT * FROM tab2 ORDER BY col_7; -# stop the server -[1(c)]: Rewrite into new checksum=none for all *.ibd file and ibdata1 -# restart: --innodb_checksum_algorithm=strict_none -INSERT INTO tab1 (pk, linestring_key, linestring_nokey) -VALUES (4, ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '), ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) ')); -SET @col_1 = repeat('m', 5); -SET @col_2 = repeat('n', 20); -SET @col_3 = repeat('o', 100); -SET @col_4 = repeat('p', 100); -SET @col_5 = repeat('q', 100); -SET @col_6 = repeat('r', 100); -INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7) -VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,8); -SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey) -FROM tab1 ORDER BY pk; -SELECT * FROM tab2 ORDER BY col_7; # stop the server [2]: Check the page type summary with shortform for tab1.ibd @@ -184,10 +131,8 @@ count FALSE start-page 0 end-page 0 page 0 -strict-check crc32 no-check FALSE allow-mismatches 0 -write crc32 page-type-summary FALSE page-type-dump MYSQLTEST_VARDIR/tmp/dump.txt per-page-details FALSE diff --git a/mysql-test/suite/innodb_zip/t/innochecksum.combinations b/mysql-test/suite/innodb_zip/t/innochecksum.combinations deleted file mode 100644 index 79e5f7836ed..00000000000 --- a/mysql-test/suite/innodb_zip/t/innochecksum.combinations +++ /dev/null @@ -1,5 +0,0 @@ -[crc32] ---innodb-checksum-algorithm=crc32 - -[full_crc32] ---innodb-checksum-algorithm=full_crc32 diff --git a/mysql-test/suite/innodb_zip/t/innochecksum.opt b/mysql-test/suite/innodb_zip/t/innochecksum.opt deleted file mode 100644 index ac26eca328c..00000000000 --- a/mysql-test/suite/innodb_zip/t/innochecksum.opt +++ /dev/null @@ -1 +0,0 @@ ---skip-innodb-doublewrite diff --git a/mysql-test/suite/innodb_zip/t/innochecksum.test b/mysql-test/suite/innodb_zip/t/innochecksum.test index ea5654056d9..60860adeac8 100644 --- a/mysql-test/suite/innodb_zip/t/innochecksum.test +++ b/mysql-test/suite/innodb_zip/t/innochecksum.test @@ -1,19 +1,12 @@ #************************************************************ # WL6045:Improve Innochecksum #************************************************************ ---source include/innodb_page_size_small.inc +--source include/have_innodb.inc --source include/no_valgrind_without_big.inc -# Embedded server does not support crashing. --source include/not_embedded.inc -# Avoid CrashReporter popup on Mac. ---source include/not_crashrep.inc - ---echo # Set the environmental variables -let MYSQLD_BASEDIR= `SELECT @@basedir`; -let MYSQLD_DATADIR= `SELECT @@datadir`; +let $MYSQLD_DATADIR= `SELECT @@datadir`; let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err; -let $checksum_algorithm = `SELECT @@innodb_checksum_algorithm`; call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts"); call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed"); @@ -21,10 +14,6 @@ call mtr.add_suppression("InnoDB: Warning: database page corruption or a failed" CREATE TABLE tab1(c1 INT PRIMARY KEY,c2 VARCHAR(20)) ENGINE=InnoDB; CREATE INDEX idx1 ON tab1(c2(10)); INSERT INTO tab1 VALUES(1, 'Innochecksum InnoDB1'); -CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -insert into t1 values(1,"i"); -insert into t1 values(2,"am"); -insert into t1 values(3,"compressed table"); --echo # Shutdown the Server --source include/shutdown_mysqld.inc @@ -42,12 +31,6 @@ insert into t1 values(3,"compressed table"); --echo [1b]: check the innochecksum without --strict-check --exec $INNOCHECKSUM $MYSQLD_DATADIR/test/tab1.ibd ---echo [2]: check the innochecksum with full form --strict-check=crc32 ---exec $INNOCHECKSUM --strict-check=crc32 $MYSQLD_DATADIR/test/tab1.ibd - ---echo [3]: check the innochecksum with short form -C crc32 ---exec $INNOCHECKSUM -C crc32 $MYSQLD_DATADIR/test/tab1.ibd - --echo [4]: check the innochecksum with --no-check ignores algorithm check, warning is expected --error 1 --exec $INNOCHECKSUM --no-check $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE @@ -63,195 +46,21 @@ let SEARCH_PATTERN= Error: --no-check must be associated with --write option.; --echo [6]: check the innochecksum with full form strict-check & no-check , an error is expected --error 1 --exec $INNOCHECKSUM --strict-check=innodb --no-check $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE -let SEARCH_PATTERN= Error: --strict-check option cannot be used together with --no-check option.; +let SEARCH_PATTERN= unknown variable 'strict-check=innodb'; --source include/search_pattern_in_file.inc --echo [7]: check the innochecksum with short form strict-check & no-check , an error is expected --error 1 --exec $INNOCHECKSUM -C innodb -n $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE -let SEARCH_PATTERN= Error: --strict-check option cannot be used together with --no-check option.; ---source include/search_pattern_in_file.inc - ---echo [8]: check the innochecksum with short & full form combination ---echo # strict-check & no-check, an error is expected ---error 1 ---exec $INNOCHECKSUM --strict-check=innodb -n $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE -let SEARCH_PATTERN= Error: --strict-check option cannot be used together with --no-check option.; ---source include/search_pattern_in_file.inc - ---echo [9]: check the innochecksum with full form --strict-check=innodb -# Server Default checksum = crc32 -let $error_code = 0; - -if ($checksum_algorithm == "crc32") -{ - let $error_code = 1; -} - -if ($checksum_algorithm == "strict_crc32") -{ - let $error_code = 1; -} - ---error $error_code ---exec $INNOCHECKSUM --strict-check=innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE - ---echo [10]: check the innochecksum with full form --strict-check=none ---echo # when server Default checksum=crc32 ---error $error_code ---exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE - ---echo [11]: check the innochecksum with short form -C innodb ---echo # when server Default checksum=crc32 ---error $error_code ---exec $INNOCHECKSUM -C innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE - ---echo [12]: check the innochecksum with short form -C none ---echo # when server Default checksum=crc32 ---error $error_code ---exec $INNOCHECKSUM -C none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE - ---echo [13]: check strict-check with invalid values ---error 1 ---exec $INNOCHECKSUM --strict-check=strict_innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE -let SEARCH_PATTERN= Error while setting value \'strict_innodb\' to \'strict-check\'; ---source include/search_pattern_in_file.inc - ---error 1 ---exec $INNOCHECKSUM -C strict_innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE -let SEARCH_PATTERN= Error while setting value \'strict_innodb\' to \'strict-check\'; +let SEARCH_PATTERN= unknown option '-C'; --source include/search_pattern_in_file.inc --error 1 ---exec $INNOCHECKSUM --strict-check=strict_crc32 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE -let SEARCH_PATTERN= Error while setting value \'strict_crc32\' to \'strict-check\'; +--exec $INNOCHECKSUM --no-check --write=crc32 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE +let SEARCH_PATTERN= unknown variable 'write=crc32'; --source include/search_pattern_in_file.inc ---error 1 ---exec $INNOCHECKSUM -C strict_crc32 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE -let SEARCH_PATTERN= Error while setting value \'strict_crc32\' to \'strict-check\'; ---source include/search_pattern_in_file.inc - ---error 1 ---exec $INNOCHECKSUM --strict-check=strict_none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE -let SEARCH_PATTERN= Error while setting value \'strict_none\' to \'strict-check\'; ---source include/search_pattern_in_file.inc - ---error 1 ---exec $INNOCHECKSUM -C strict_none $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE -let SEARCH_PATTERN= Error while setting value \'strict_none\' to \'strict-check\'; ---source include/search_pattern_in_file.inc - ---error 1 ---exec $INNOCHECKSUM --strict-check=InnoBD $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE -let SEARCH_PATTERN= Error while setting value \'InnoBD\' to \'strict-check\'; ---source include/search_pattern_in_file.inc - ---error 1 ---exec $INNOCHECKSUM -C InnoBD $MYSQLD_DATADIR/test/tab1.ibd 2>$SEARCH_FILE -let SEARCH_PATTERN= Error while setting value \'InnoBD\' to \'strict-check\'; ---source include/search_pattern_in_file.inc - ---error 1 ---exec $INNOCHECKSUM --strict-check=crc $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE -let SEARCH_PATTERN= Error while setting value \'crc\' to \'strict-check\'; ---source include/search_pattern_in_file.inc - ---error 1 ---exec $INNOCHECKSUM --strict-check=no $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE -let SEARCH_PATTERN= Error while setting value \'no\' to \'strict-check\'; ---source include/search_pattern_in_file.inc - ---echo [14a]: when server default checksum=crc32 rewrite new checksum=crc32 with innochecksum ---echo # Also check the long form of write option. ---exec $INNOCHECKSUM --strict-check=crc32 --write=crc32 $MYSQLD_DATADIR/test/tab1.ibd ---exec $INNOCHECKSUM --strict-check=crc32 --write=crc32 $MYSQLD_DATADIR/test/t1.ibd -# Rewrite done, verify with --strict-check=crc32 ---exec $INNOCHECKSUM --strict-check=crc32 $MYSQLD_DATADIR/test/tab1.ibd ---exec $INNOCHECKSUM --strict-check=crc32 $MYSQLD_DATADIR/test/t1.ibd - ---echo [14b]: when server default checksum=crc32 rewrite new checksum=innodb with innochecksum ---echo # Also check the long form of write option. ---exec $INNOCHECKSUM --no-check --write=innodb $MYSQLD_DATADIR/test/tab1.ibd ---exec $INNOCHECKSUM --strict-check=crc32 --write=innodb $MYSQLD_DATADIR/test/t1.ibd -# Rewrite done, verify with --strict-check=innodb ---exec $INNOCHECKSUM --strict-check=innodb $MYSQLD_DATADIR/test/tab1.ibd - ---echo # start the server with innodb_checksum_algorithm=InnoDB ---let $restart_parameters= --innodb_checksum_algorithm=innodb ---source include/start_mysqld.inc - -INSERT INTO tab1 VALUES(2, 'Innochecksum CRC32'); -SELECT c1,c2 FROM tab1 order by c1,c2; - ---echo # Stop the server ---source include/shutdown_mysqld.inc - ---echo [15]: when server default checksum=crc32 rewrite new checksum=none with innochecksum ---echo # Also check the short form of write option. ---exec $INNOCHECKSUM --no-check -w none $MYSQLD_DATADIR/test/tab1.ibd ---exec $INNOCHECKSUM --no-check -w none $MYSQLD_DATADIR/test/t1.ibd -# Rewrite done, verify with --strict-check=none ---exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/tab1.ibd ---exec $INNOCHECKSUM --strict-check=none $MYSQLD_DATADIR/test/t1.ibd - ---echo # Start the server with checksum algorithm=none ---let $restart_parameters= --innodb_checksum_algorithm=none ---source include/start_mysqld.inc - -INSERT INTO tab1 VALUES(3, 'Innochecksum None'); -SELECT c1,c2 FROM tab1 order by c1,c2; -DROP TABLE t1; - ---echo # Stop the server ---source include/shutdown_mysqld.inc - ---echo [16]: rewrite into new checksum=crc32 with innochecksum ---exec $INNOCHECKSUM --no-check --write=crc32 $MYSQLD_DATADIR/test/tab1.ibd - ---echo # Restart the DB server with innodb_checksum_algorithm=crc32 ---let $restart_parameters= --innodb_checksum_algorithm=crc32 --source include/start_mysqld.inc SELECT * FROM tab1; -DELETE FROM tab1 where c1=3; -SELECT c1,c2 FROM tab1 order by c1,c2; - ---echo # Stop server ---source include/shutdown_mysqld.inc - ---echo [17]: rewrite into new checksum=InnoDB ---exec $INNOCHECKSUM --no-check --write=InnoDB $MYSQLD_DATADIR/test/tab1.ibd - ---echo # Restart the DB server with innodb_checksum_algorithm=InnoDB ---let $restart_parameters= --innodb_checksum_algorithm=innodb ---source include/start_mysqld.inc - -DELETE FROM tab1 where c1=2; -SELECT * FROM tab1; - ---echo # Stop server ---source include/shutdown_mysqld.inc - ---echo [18]:check Innochecksum with invalid write options ---error 1 ---exec $INNOCHECKSUM --no-check --write=strict_crc32 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE -let SEARCH_PATTERN=Error while setting value \'strict_crc32\' to \'write\'; ---source include/search_pattern_in_file.inc - ---error 1 ---exec $INNOCHECKSUM --no-check --write=strict_innodb $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE -let SEARCH_PATTERN=Error while setting value \'strict_innodb\' to \'write\'; ---source include/search_pattern_in_file.inc - ---error 1 ---exec $INNOCHECKSUM --no-check --write=crc23 $MYSQLD_DATADIR/test/tab1.ibd 2> $SEARCH_FILE -let SEARCH_PATTERN=Error while setting value \'crc23\' to \'write\'; ---source include/search_pattern_in_file.inc ---remove_file $SEARCH_FILE - -# Cleanup ---let $restart_parameters= ---source include/start_mysqld.inc - DROP TABLE tab1; diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_2.test b/mysql-test/suite/innodb_zip/t/innochecksum_2.test index 1efe653cd1a..62e792c1ce4 100644 --- a/mysql-test/suite/innodb_zip/t/innochecksum_2.test +++ b/mysql-test/suite/innodb_zip/t/innochecksum_2.test @@ -3,7 +3,6 @@ #************************************************************ --source include/innodb_page_size_small.inc --source include/have_debug.inc ---source include/no_valgrind_without_big.inc # Avoid CrashReporter popup on Mac. --source include/not_crashrep.inc @@ -93,27 +92,3 @@ EOF --source include/start_mysqld.inc DROP TABLE t1; - ---echo [5]:# Check the innochecksum for compressed table t1 with different key_block_size ---echo # Test for KEY_BLOCK_SIZE=1 ---let $size=1 ---source ../include/innodb-wl6045.inc - ---echo # Test for KEY_BLOCK_SIZE=2 ---let $size=2 ---source ../include/innodb-wl6045.inc - ---echo # Test for for KEY_BLOCK_SIZE=4 ---let $size=4 ---source ../include/innodb-wl6045.inc - -set innodb_strict_mode=off; ---echo # Test for for KEY_BLOCK_SIZE=8 ---let $size=8 ---source ../include/innodb-wl6045.inc - -set innodb_strict_mode=off; ---echo # Test for KEY_BLOCK_SIZE=16 ---let $size=16 ---source ../include/innodb-wl6045.inc ---echo # Test[5] completed diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_3.test b/mysql-test/suite/innodb_zip/t/innochecksum_3.test index dab10dcc997..88898aea521 100644 --- a/mysql-test/suite/innodb_zip/t/innochecksum_3.test +++ b/mysql-test/suite/innodb_zip/t/innochecksum_3.test @@ -19,8 +19,6 @@ let SEARCH_FILE= $MYSQLTEST_VARDIR/log/my_restart.err; call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts"); call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to.*"); ---echo [1]: Further Test are for rewrite checksum (innodb|crc32|none) for all ibd file & start the server. - CREATE TABLE tab1 (pk INTEGER NOT NULL PRIMARY KEY, linestring_key GEOMETRY NOT NULL, linestring_nokey GEOMETRY NOT NULL) @@ -59,137 +57,6 @@ while ($i) { dec $i; } ---disable_result_log -SELECT * FROM tab2 ORDER BY col_7; - ---echo # stop the server ---source include/shutdown_mysqld.inc - ---echo [1(a)]: Rewrite into new checksum=InnoDB for all *.ibd file and ibdata1 ---exec $INNOCHECKSUM --write=InnoDB $MYSQLD_DATADIR/test/tab1.ibd ---exec $INNOCHECKSUM --write=InnoDB $MYSQLD_DATADIR/test/tab2.ibd ---exec $INNOCHECKSUM --write=InnoDB $MYSQLD_DATADIR/ibdata1 -perl; -foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) { - system("$ENV{INNOCHECKSUM} --no-check --write=InnoDB $_") -} -EOF - ---echo : start the server with innodb_checksum_algorithm=strict_innodb ---let $restart_parameters= --innodb_checksum_algorithm=strict_innodb ---source include/start_mysqld.inc - -INSERT INTO tab1 (pk, linestring_key, linestring_nokey) -VALUES (2, ST_GeomFromText('LINESTRING(10 10,20 20,30 30)'), ST_GeomFromText('LINESTRING(10 10,20 20,30 30)')); - -# load the with repeat function -SET @col_1 = repeat('a', 5); -SET @col_2 = repeat('b', 20); -SET @col_3 = repeat('c', 100); -SET @col_4 = repeat('d', 100); -SET @col_5 = repeat('e', 100); -SET @col_6 = repeat('f', 100); - -# check the table status is GOOD with DML -let $i = 6; -eval INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7) -VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,$i); - --- disable_result_log -SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey) -FROM tab1 ORDER BY pk; - --- disable_result_log -SELECT * FROM tab2 ORDER BY col_7; - ---echo # stop the server ---source include/shutdown_mysqld.inc - ---echo [1(b)]: Rewrite into new checksum=crc32 for all *.ibd file and ibdata1 ---exec $INNOCHECKSUM --write=CRC32 $MYSQLD_DATADIR/test/tab1.ibd ---exec $INNOCHECKSUM --write=CRC32 $MYSQLD_DATADIR/test/tab2.ibd ---exec $INNOCHECKSUM --write=CRC32 $MYSQLD_DATADIR/ibdata1 -perl; -foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) { - system("$ENV{INNOCHECKSUM} --no-check --write=crc32 $_") -} -EOF - ---echo # start the server with innodb_checksum_algorithm=strict_crc32 ---let $restart_parameters= --innodb_checksum_algorithm=strict_crc32 ---source include/start_mysqld.inc - -# check the table status is GOOD with DML -INSERT INTO tab1 (pk, linestring_key, linestring_nokey) -VALUES (3, ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))'), -ST_GeomFromText('POLYGON((0 0,5 5,10 10,15 15,0 0),(10 10,20 20,30 30,40 40,10 10))')); - -# load the with repeat function -SET @col_1 = repeat('g', 5); -SET @col_2 = repeat('h', 20); -SET @col_3 = repeat('i', 100); -SET @col_4 = repeat('j', 100); -SET @col_5 = repeat('k', 100); -SET @col_6 = repeat('l', 100); - -# check the table status is GOOD with DML -let $i = 7; -eval INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7) -VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,$i); - -# check the records from table --- disable_result_log -SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey) -FROM tab1 ORDER BY pk; - --- disable_result_log -SELECT * FROM tab2 ORDER BY col_7; - ---echo # stop the server ---source include/shutdown_mysqld.inc - ---echo [1(c)]: Rewrite into new checksum=none for all *.ibd file and ibdata1 ---exec $INNOCHECKSUM --write=none $MYSQLD_DATADIR/test/tab1.ibd ---exec $INNOCHECKSUM --write=none $MYSQLD_DATADIR/test/tab2.ibd ---exec $INNOCHECKSUM --write=none $MYSQLD_DATADIR/ibdata1 -perl; -foreach (glob("$ENV{MYSQLD_DATADIR}/undo*")) { - system("$ENV{INNOCHECKSUM} --no-check --write=NONE $_") -} -foreach (glob("$ENV{MYSQLD_DATADIR}/*/*.ibd")) { - system("$ENV{INNOCHECKSUM} --no-check --write=NONE $_") -} -EOF - ---let $restart_parameters= --innodb_checksum_algorithm=strict_none ---source include/start_mysqld.inc ---let $restart_parameters= -# check the table status is GOOD with DML -INSERT INTO tab1 (pk, linestring_key, linestring_nokey) -VALUES (4, ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) '), ST_GeomFromText('MULTIPOINT(0 0,5 5,10 10,20 20) ')); - -# load the with repeat function -SET @col_1 = repeat('m', 5); -SET @col_2 = repeat('n', 20); -SET @col_3 = repeat('o', 100); -SET @col_4 = repeat('p', 100); -SET @col_5 = repeat('q', 100); -SET @col_6 = repeat('r', 100); - -# check the table status is GOOD with DML -let $i = 8; -eval INSERT INTO tab2(col_1,col_2,col_3,col_4,col_5,col_6,col_7) -VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,$i); - -# check the records from table --- disable_result_log -SELECT pk,ST_AsText(linestring_key),ST_AsText(linestring_nokey) -FROM tab1 ORDER BY pk; - ---disable_result_log -SELECT * FROM tab2 ORDER BY col_7; ---enable_result_log - --echo # stop the server --source include/shutdown_mysqld.inc diff --git a/mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result b/mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result index 91d3c65597a..b17d8ea4fbb 100644 --- a/mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_checksum_algorithm_basic.result @@ -10,22 +10,6 @@ SET GLOBAL innodb_checksum_algorithm = 'strict_crc32'; SELECT @@global.innodb_checksum_algorithm; @@global.innodb_checksum_algorithm strict_crc32 -SET GLOBAL innodb_checksum_algorithm = 'innodb'; -SELECT @@global.innodb_checksum_algorithm; -@@global.innodb_checksum_algorithm -innodb -SET GLOBAL innodb_checksum_algorithm = 'strict_innodb'; -SELECT @@global.innodb_checksum_algorithm; -@@global.innodb_checksum_algorithm -strict_innodb -SET GLOBAL innodb_checksum_algorithm = 'none'; -SELECT @@global.innodb_checksum_algorithm; -@@global.innodb_checksum_algorithm -none -SET GLOBAL innodb_checksum_algorithm = 'strict_none'; -SELECT @@global.innodb_checksum_algorithm; -@@global.innodb_checksum_algorithm -strict_none SET GLOBAL innodb_checksum_algorithm = 'full_crc32'; SELECT @@global.innodb_checksum_algorithm; @@global.innodb_checksum_algorithm diff --git a/mysql-test/suite/sys_vars/r/sysvars_innodb.result b/mysql-test/suite/sys_vars/r/sysvars_innodb.result index e47c35f4d1f..41e6b06fa7d 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_innodb.result +++ b/mysql-test/suite/sys_vars/r/sysvars_innodb.result @@ -294,7 +294,7 @@ VARIABLE_COMMENT The algorithm InnoDB uses for page checksumming. Possible value NUMERIC_MIN_VALUE NULL NUMERIC_MAX_VALUE NULL NUMERIC_BLOCK_SIZE NULL -ENUM_VALUE_LIST crc32,strict_crc32,innodb,strict_innodb,none,strict_none,full_crc32,strict_full_crc32 +ENUM_VALUE_LIST crc32,strict_crc32,full_crc32,strict_full_crc32 READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME INNODB_CMP_PER_INDEX_ENABLED diff --git a/mysql-test/suite/sys_vars/t/innodb_checksum_algorithm_basic.test b/mysql-test/suite/sys_vars/t/innodb_checksum_algorithm_basic.test index 947007a5dd1..b0a0fcc92f5 100644 --- a/mysql-test/suite/sys_vars/t/innodb_checksum_algorithm_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_checksum_algorithm_basic.test @@ -10,18 +10,6 @@ SELECT @@global.innodb_checksum_algorithm; SET GLOBAL innodb_checksum_algorithm = 'strict_crc32'; SELECT @@global.innodb_checksum_algorithm; -SET GLOBAL innodb_checksum_algorithm = 'innodb'; -SELECT @@global.innodb_checksum_algorithm; - -SET GLOBAL innodb_checksum_algorithm = 'strict_innodb'; -SELECT @@global.innodb_checksum_algorithm; - -SET GLOBAL innodb_checksum_algorithm = 'none'; -SELECT @@global.innodb_checksum_algorithm; - -SET GLOBAL innodb_checksum_algorithm = 'strict_none'; -SELECT @@global.innodb_checksum_algorithm; - SET GLOBAL innodb_checksum_algorithm = 'full_crc32'; SELECT @@global.innodb_checksum_algorithm; |