diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-06-08 12:45:08 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-06-08 12:45:08 +0300 |
commit | 2d8fdfbde5d5d32df64bacfaa7574ecf83b0bc03 (patch) | |
tree | cea7cfc27b7f5c3c9d116a82330fef01350b08f4 /mysql-test/suite | |
parent | c4cbc7a8807250d2d5b5938b218fd9c423a0b30a (diff) | |
parent | fbeb9489cd7d6ad859a49ae5ab8f876f3d988470 (diff) | |
download | mariadb-git-2d8fdfbde5d5d32df64bacfaa7574ecf83b0bc03.tar.gz |
Merge 10.1 into 10.2
Replace have_innodb_zip.inc with innodb_page_size_small.inc.
Diffstat (limited to 'mysql-test/suite')
52 files changed, 1267 insertions, 173 deletions
diff --git a/mysql-test/suite/encryption/r/innodb-checksum-algorithm,32k.rdiff b/mysql-test/suite/encryption/r/innodb-checksum-algorithm,32k.rdiff new file mode 100644 index 00000000000..cd66df7440b --- /dev/null +++ b/mysql-test/suite/encryption/r/innodb-checksum-algorithm,32k.rdiff @@ -0,0 +1,38 @@ +--- suite/encryption/r/innodb-checksum-algorithm.result ++++ suite/encryption/r/innodb-checksum-algorithm,32k.reject +@@ -13,9 +13,9 @@ + 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 +-ROW_FORMAT=COMPRESSED encrypted=yes; ++ROW_FORMAT=DYNAMIC encrypted=yes; + create table tc_crc32(a serial, b blob, index(b(10))) engine=innodb +-ROW_FORMAT=COMPRESSED encrypted=no; ++ROW_FORMAT=DYNAMIC encrypted=no; + create table te_crc32(a serial, b blob, index(b(10))) engine=innodb + encrypted=yes; + create table t_crc32(a serial, b blob, index(b(10))) engine=innodb +@@ -222,9 +222,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; + 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 +@@ -431,9 +431,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; + 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 diff --git a/mysql-test/suite/encryption/r/innodb-checksum-algorithm,64k.rdiff b/mysql-test/suite/encryption/r/innodb-checksum-algorithm,64k.rdiff new file mode 100644 index 00000000000..523074297da --- /dev/null +++ b/mysql-test/suite/encryption/r/innodb-checksum-algorithm,64k.rdiff @@ -0,0 +1,38 @@ +--- suite/encryption/r/innodb-checksum-algorithm.result ++++ suite/encryption/r/innodb-checksum-algorithm,64k.reject +@@ -13,9 +13,9 @@ + 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 +-ROW_FORMAT=COMPRESSED encrypted=yes; ++ROW_FORMAT=DYNAMIC encrypted=yes; + create table tc_crc32(a serial, b blob, index(b(10))) engine=innodb +-ROW_FORMAT=COMPRESSED encrypted=no; ++ROW_FORMAT=DYNAMIC encrypted=no; + create table te_crc32(a serial, b blob, index(b(10))) engine=innodb + encrypted=yes; + create table t_crc32(a serial, b blob, index(b(10))) engine=innodb +@@ -222,9 +222,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; + 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 +@@ -431,9 +431,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; + 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 diff --git a/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result b/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result new file mode 100644 index 00000000000..a12b47ef31d --- /dev/null +++ b/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result @@ -0,0 +1,643 @@ +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 +ROW_FORMAT=COMPRESSED encrypted=yes; +create table tc_crc32(a serial, b blob, index(b(10))) engine=innodb +ROW_FORMAT=COMPRESSED encrypted=no; +create table te_crc32(a serial, b blob, index(b(10))) engine=innodb +encrypted=yes; +create table t_crc32(a serial, b blob, index(b(10))) engine=innodb +encrypted=no; +create table tpe_crc32(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 +page_compressed=yes encrypted=no; +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)); +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 +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 +UNLOCK TABLES; +SET GLOBAL innodb_checksum_algorithm=strict_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=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=strict_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=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=strict_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); +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; +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; +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; +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; +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 +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=strict_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=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=strict_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=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=strict_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); +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; +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; +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; +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 +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=strict_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=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=strict_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=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=strict_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); +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; +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/r/innodb-compressed-blob.result b/mysql-test/suite/encryption/r/innodb-compressed-blob.result index 5753188b168..bf43e1b30d6 100644 --- a/mysql-test/suite/encryption/r/innodb-compressed-blob.result +++ b/mysql-test/suite/encryption/r/innodb-compressed-blob.result @@ -1,4 +1,5 @@ call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\."); +call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[1-3]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]"); # Restart mysqld --file-key-management-filename=keys2.txt SET GLOBAL innodb_file_per_table = ON; set GLOBAL innodb_default_encryption_key_id=4; diff --git a/mysql-test/suite/encryption/t/innodb-checksum-algorithm.test b/mysql-test/suite/encryption/t/innodb-checksum-algorithm.test new file mode 100644 index 00000000000..7eaa1bd64c6 --- /dev/null +++ b/mysql-test/suite/encryption/t/innodb-checksum-algorithm.test @@ -0,0 +1,120 @@ +-- 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; + +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`; + +# ROW_FORMAT=COMPRESSED is unavailable with innodb_page_size=32k or 64k +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 +$row_format_compressed encrypted=yes; +eval create table tc_$checksum(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 +encrypted=yes; +eval create table t_$checksum(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 +page_compressed=yes encrypted=yes; +eval create table tp_$checksum(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)); +commit; + +eval FLUSH TABLES tce_$checksum, tc_$checksum, te_$checksum, +t_$checksum, tpe_$checksum, tp_$checksum 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); +EOF +--list_files $MYSQLD_DATADIR/test +UNLOCK TABLES; + +let $to = 6; +while ($to) +{ +dec $to; +let $tocksum = `select case $to + when 0 then 'none' + when 1 then 'strict_none' + when 2 then 'innodb' + when 3 then 'strict_innodb' + when 4 then 'crc32' + when 5 then 'strict_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; + +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); +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; +} + +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 new file mode 100644 index 00000000000..e096b023b52 --- /dev/null +++ b/mysql-test/suite/encryption/t/innodb-compressed-blob.combinations @@ -0,0 +1,12 @@ +[crc32] +loose-innodb-tablespaces-encryption +loose-innodb-encrypt-tables=on +loose-innodb-encryption-threads=4 +max_allowed_packet=64K +loose-innodb-checksum-algorithm=crc32 +[none] +loose-innodb-tablespaces-encryption +loose-innodb-encrypt-tables=on +loose-innodb-encryption-threads=4 +max_allowed_packet=64K +loose-innodb-checksum-algorithm=none diff --git a/mysql-test/suite/encryption/t/innodb-compressed-blob.opt b/mysql-test/suite/encryption/t/innodb-compressed-blob.opt deleted file mode 100644 index 36dcb6c6f26..00000000000 --- a/mysql-test/suite/encryption/t/innodb-compressed-blob.opt +++ /dev/null @@ -1,4 +0,0 @@ ---innodb-tablespaces-encryption ---innodb-encrypt-tables=on ---innodb-encryption-threads=2 ---max_allowed_packet=64K diff --git a/mysql-test/suite/encryption/t/innodb-compressed-blob.test b/mysql-test/suite/encryption/t/innodb-compressed-blob.test index 6256aaf5c33..4f28f8e183d 100644 --- a/mysql-test/suite/encryption/t/innodb-compressed-blob.test +++ b/mysql-test/suite/encryption/t/innodb-compressed-blob.test @@ -1,10 +1,11 @@ --- source include/have_innodb.inc +-- source include/innodb_page_size_small.inc -- source include/have_file_key_management_plugin.inc # embedded does not support restart -- source include/not_embedded.inc call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\."); +call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[1-3]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]"); --echo # Restart mysqld --file-key-management-filename=keys2.txt -- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt diff --git a/mysql-test/suite/galera/galera_2nodes.cnf b/mysql-test/suite/galera/galera_2nodes.cnf index 34bf1fc58fe..f120775d433 100644 --- a/mysql-test/suite/galera/galera_2nodes.cnf +++ b/mysql-test/suite/galera/galera_2nodes.cnf @@ -16,7 +16,7 @@ wsrep-sync-wait=7 #ist_port=@OPT.port #sst_port=@OPT.port wsrep-cluster-address=gcomm:// -wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;gcache.size=10M;evs.suspect_timeout=PT10S' +wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M' wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port' diff --git a/mysql-test/suite/galera/r/MW-309.result b/mysql-test/suite/galera/r/MW-309.result new file mode 100644 index 00000000000..3dd49a041ee --- /dev/null +++ b/mysql-test/suite/galera/r/MW-309.result @@ -0,0 +1,22 @@ +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +SET GLOBAL wsrep_max_ws_rows = 2; +SET AUTOCOMMIT=OFF; +START TRANSACTION; +SELECT * FROM t1 GROUP BY f1; +f1 +1 +SELECT * FROM t1 GROUP BY f1; +f1 +1 +SELECT * FROM t1 GROUP BY f1; +f1 +1 +SHOW STATUS LIKE '%wsrep%'; +SET GLOBAL wsrep_max_ws_rows = 0; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/MW-309.test b/mysql-test/suite/galera/t/MW-309.test new file mode 100644 index 00000000000..351a508ecec --- /dev/null +++ b/mysql-test/suite/galera/t/MW-309.test @@ -0,0 +1,32 @@ +# +# MW-309 Regression: wsrep_max_ws_rows limit also applies to certain SELECT queries +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; + +SET GLOBAL wsrep_max_ws_rows = 2; + +SET AUTOCOMMIT=OFF; +START TRANSACTION; +SELECT * FROM t1 GROUP BY f1; +SELECT * FROM t1 GROUP BY f1; + +--error 0 +SELECT * FROM t1 GROUP BY f1; + +--disable_result_log +--error 0 +SHOW STATUS LIKE '%wsrep%'; +--enable_result_log + +SET GLOBAL wsrep_max_ws_rows = 0; +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf b/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf index 7d684cef67d..b4bf5f02171 100644 --- a/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf +++ b/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.cnf @@ -1,9 +1,8 @@ !include ../galera_2nodes.cnf [mysqld] -#wsrep_sst_method=xtrabackup-v2 -#wsrep_sst_auth="root:" -#wsrep_debug=ON +wsrep_sst_method=xtrabackup-v2 +wsrep_sst_auth="root:" [mysqld.1] wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' diff --git a/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.test b/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.test index 251450f7099..30ce9bc4ceb 100644 --- a/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.test +++ b/mysql-test/suite/galera/t/galera_autoinc_sst_xtrabackup.test @@ -1,6 +1,6 @@ # # Test that autoincrement works correctly while the cluster membership -# is changing and IST takes place. +# is changing and SST takes place. # --source include/big_test.inc diff --git a/mysql-test/suite/galera/t/galera_var_cluster_address.test b/mysql-test/suite/galera/t/galera_var_cluster_address.test index 0f857eb1aac..03706bbbb12 100644 --- a/mysql-test/suite/galera/t/galera_var_cluster_address.test +++ b/mysql-test/suite/galera/t/galera_var_cluster_address.test @@ -76,4 +76,3 @@ CALL mtr.add_suppression("WSREP: wsrep::connect\\(gcomm://192.0.2.1\\) failed: 7 --source include/galera_end.inc --echo # End of test - diff --git a/mysql-test/suite/galera_3nodes/disabled.def b/mysql-test/suite/galera_3nodes/disabled.def index ca55c41ff72..502e7bfba68 100644 --- a/mysql-test/suite/galera_3nodes/disabled.def +++ b/mysql-test/suite/galera_3nodes/disabled.def @@ -5,3 +5,4 @@ galera_slave_options_do :MDEV-8798 galera_slave_options_ignore : MDEV-8798 galera_pc_bootstrap : TODO: Investigate: Timeout in wait_condition.inc galera_pc_weight : Test times out +galera_safe_to_bootstrap : I Really dont know :( diff --git a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf index 1ed273fdcb5..305bdaaae3a 100644 --- a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf +++ b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf @@ -14,11 +14,10 @@ wsrep-causal-reads=ON wsrep-sync-wait=7 [mysqld.1] -#galera_port=@OPT.port -#ist_port=@OPT.port -#sst_port=@OPT.port -wsrep-cluster-address=gcomm:// -wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;evs.suspect_timeout=PT10S' +wsrep-cluster-address='gcomm://' +wsrep_provider_options='base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S' + +wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port' diff --git a/mysql-test/suite/innodb/r/doublewrite.result b/mysql-test/suite/innodb/r/doublewrite.result index 6b913f49972..61c81ee9dff 100644 --- a/mysql-test/suite/innodb/r/doublewrite.result +++ b/mysql-test/suite/innodb/r/doublewrite.result @@ -231,6 +231,7 @@ set global innodb_buf_flush_list_now = 1; check table t1; Table Op Msg_type Msg_text test.t1 check status OK +FOUND 1 /\[ERROR\] InnoDB: .*test.t1\.ibd.*/ in mysqld.1.err select f1, f2 from t1; f1 f2 1 ############ @@ -238,6 +239,13 @@ f1 f2 3 //////////// 4 ------------ 5 ............ -# Test End -# --------------------------------------------------------------- drop table t1; +# +# MDEV-12600 crash during install_db with innodb_page_size=32K +# and ibdata1=3M +# +SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS +FOUND 1 /\[ERROR\] InnoDB: Cannot create doublewrite buffer/ in mysqld.1.err diff --git a/mysql-test/suite/innodb/r/temporary_table.result b/mysql-test/suite/innodb/r/temporary_table.result index da5ff361eeb..074dd413947 100644 --- a/mysql-test/suite/innodb/r/temporary_table.result +++ b/mysql-test/suite/innodb/r/temporary_table.result @@ -149,10 +149,6 @@ FOUND 2 /support raw device/ in mysqld.1.err SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 1 /The innodb_temporary data file 'ibtmp1' must be at least/ in mysqld.1.err -SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' -AND support IN ('YES', 'DEFAULT', 'ENABLED'); -ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS FOUND 1 /InnoDB: syntax error in file path/ in mysqld.1.err SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); diff --git a/mysql-test/suite/innodb/t/101_compatibility.test b/mysql-test/suite/innodb/t/101_compatibility.test index 83ab7914a69..78dee53e52f 100644 --- a/mysql-test/suite/innodb/t/101_compatibility.test +++ b/mysql-test/suite/innodb/t/101_compatibility.test @@ -1,4 +1,4 @@ ---source include/have_innodb.inc +--source include/innodb_page_size.inc --source include/not_embedded.inc -- echo # diff --git a/mysql-test/suite/innodb/t/alter_missing_tablespace.test b/mysql-test/suite/innodb/t/alter_missing_tablespace.test index 643b7a4833d..d877b8f3b5d 100644 --- a/mysql-test/suite/innodb/t/alter_missing_tablespace.test +++ b/mysql-test/suite/innodb/t/alter_missing_tablespace.test @@ -1,5 +1,5 @@ --source include/not_embedded.inc ---source include/have_innodb.inc +--source include/innodb_page_size.inc --echo # --echo # Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING diff --git a/mysql-test/suite/innodb/t/doublewrite.test b/mysql-test/suite/innodb/t/doublewrite.test index a153ad66b19..bdeaba2dcec 100644 --- a/mysql-test/suite/innodb/t/doublewrite.test +++ b/mysql-test/suite/innodb/t/doublewrite.test @@ -4,22 +4,27 @@ --echo # PAGE OF SYSTEM TABLESPACE --echo # ---source include/have_innodb.inc +--source include/innodb_page_size.inc --source include/have_debug.inc --source include/not_embedded.inc # Slow shutdown and restart to make sure ibuf merge is finished SET GLOBAL innodb_fast_shutdown = 0; --disable_query_log -call mtr.add_suppression("Header page consists of zero bytes"); -call mtr.add_suppression("Checksum mismatch in datafile"); -call mtr.add_suppression("but the innodb_page_size start-up parameter is"); -call mtr.add_suppression("adjusting FSP_SPACE_FLAGS"); +call mtr.add_suppression("InnoDB: Header page consists of zero bytes"); +call mtr.add_suppression("InnoDB: Checksum mismatch in datafile: .*, Space ID:0, Flags: 0"); +call mtr.add_suppression("InnoDB: Data file .* uses page size .* but the innodb_page_size start-up parameter is"); +call mtr.add_suppression("InnoDB: adjusting FSP_SPACE_FLAGS"); +call mtr.add_suppression("InnoDB: New log files created"); +call mtr.add_suppression("InnoDB: Cannot create doublewrite buffer: the first file in innodb_data_file_path must be at least (3|6|12)M\\."); +call mtr.add_suppression("InnoDB: Database creation was aborted"); +call mtr.add_suppression("Plugin 'InnoDB' (init function returned error|registration as a STORAGE ENGINE failed)"); --enable_query_log --source include/restart_mysqld.inc let INNODB_PAGE_SIZE=`select @@innodb_page_size`; let MYSQLD_DATADIR=`select @@datadir`; +let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err; show variables like 'innodb_doublewrite'; show variables like 'innodb_fil_make_page_dirty_debug'; @@ -392,9 +397,38 @@ EOF --source include/start_mysqld.inc check table t1; -select f1, f2 from t1; +--let SEARCH_PATTERN= \[ERROR\] InnoDB: .*test.t1\\.ibd.* +--source include/search_pattern_in_file.inc ---echo # Test End ---echo # --------------------------------------------------------------- +select f1, f2 from t1; drop table t1; + +--echo # +--echo # MDEV-12600 crash during install_db with innodb_page_size=32K +--echo # and ibdata1=3M +--echo # +let bugdir= $MYSQLTEST_VARDIR/tmp/doublewrite; +--mkdir $bugdir + +let $check_no_innodb=SELECT * FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); + +--let $ibp=--innodb-log-group-home-dir=$bugdir --innodb-data-home-dir=$bugdir +--let $ibd=$ibp --innodb-undo-tablespaces=0 --innodb-log-files-in-group=2 +--let $ibp=$ibp --innodb-data-file-path=ibdata1:1M;ibdata2:1M:autoextend + +--let $restart_parameters= $ibp +--source include/restart_mysqld.inc +eval $check_no_innodb; +--let SEARCH_PATTERN= \[ERROR\] InnoDB: Cannot create doublewrite buffer +--source include/search_pattern_in_file.inc +--let $restart_parameters= +--source include/restart_mysqld.inc + +--remove_file $bugdir/ibdata1 +--remove_file $bugdir/ibdata2 +--remove_file $bugdir/ib_logfile0 +--remove_file $bugdir/ib_logfile1 +--rmdir $bugdir diff --git a/mysql-test/suite/innodb/t/innodb-alter-debug.test b/mysql-test/suite/innodb/t/innodb-alter-debug.test index 70017ffba35..f4996916e9f 100644 --- a/mysql-test/suite/innodb/t/innodb-alter-debug.test +++ b/mysql-test/suite/innodb/t/innodb-alter-debug.test @@ -1,4 +1,4 @@ ---source include/have_innodb.inc +--source include/innodb_page_size.inc --source include/have_debug.inc --source include/have_debug_sync.inc diff --git a/mysql-test/suite/innodb/t/innodb-alter-nullable.test b/mysql-test/suite/innodb/t/innodb-alter-nullable.test index 3f1e82b3183..bb5cdee000a 100644 --- a/mysql-test/suite/innodb/t/innodb-alter-nullable.test +++ b/mysql-test/suite/innodb/t/innodb-alter-nullable.test @@ -1,4 +1,4 @@ ---source include/have_innodb.inc +--source include/innodb_page_size.inc # Save the initial number of concurrent sessions. --source include/count_sessions.inc diff --git a/mysql-test/suite/innodb/t/innodb-alter-table.test b/mysql-test/suite/innodb/t/innodb-alter-table.test index 45342b4a218..97f0075f344 100644 --- a/mysql-test/suite/innodb/t/innodb-alter-table.test +++ b/mysql-test/suite/innodb/t/innodb-alter-table.test @@ -1,4 +1,4 @@ ---source include/have_innodb.inc +--source include/innodb_page_size.inc # # MMDEV-8386: MariaDB creates very big tmp file and hangs on xtradb diff --git a/mysql-test/suite/innodb/t/innodb-alter-tempfile.test b/mysql-test/suite/innodb/t/innodb-alter-tempfile.test index ec1ea35f1cf..d3f34b12ea6 100644 --- a/mysql-test/suite/innodb/t/innodb-alter-tempfile.test +++ b/mysql-test/suite/innodb/t/innodb-alter-tempfile.test @@ -10,8 +10,7 @@ # Avoid CrashReporter popup on Mac --source include/not_crashrep.inc -# InnoDB is required ---source include/have_innodb.inc +--source include/innodb_page_size.inc --echo # --echo # Bug #18734396 INNODB IN-PLACE ALTER FAILURES BLOCK FUTURE ALTERS diff --git a/mysql-test/suite/innodb/t/log_data_file_size.test b/mysql-test/suite/innodb/t/log_data_file_size.test index 56a9d35bd92..8a0e88efc76 100644 --- a/mysql-test/suite/innodb/t/log_data_file_size.test +++ b/mysql-test/suite/innodb/t/log_data_file_size.test @@ -1,4 +1,4 @@ ---source include/have_innodb.inc +--source include/innodb_page_size.inc --source include/not_embedded.inc let INNODB_PAGE_SIZE=`select @@innodb_page_size`; diff --git a/mysql-test/suite/innodb/t/temporary_table.test b/mysql-test/suite/innodb/t/temporary_table.test index f841acff1c0..1148f2ee1a0 100644 --- a/mysql-test/suite/innodb/t/temporary_table.test +++ b/mysql-test/suite/innodb/t/temporary_table.test @@ -15,7 +15,6 @@ call mtr.add_suppression("The table 't1' is full"); call mtr.add_suppression("Plugin 'InnoDB' init function returned error"); call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed"); call mtr.add_suppression("InnoDB: Tablespace doesn't support raw devices"); -call mtr.add_suppression("InnoDB: The innodb_temporary data file 'ibtmp1' must be at least"); call mtr.add_suppression("InnoDB: Plugin initialization aborted"); call mtr.add_suppression("innodb_temporary and innodb_system file names seem to be the same"); call mtr.add_suppression("Could not create the shared innodb_temporary"); @@ -143,12 +142,6 @@ eval $check_no_innodb; --source include/search_pattern_in_file.inc eval $check_no_innodb; ---let $restart_parameters= --innodb_temp_data_file_path=ibtmp1:2M:autoextend ---source include/restart_mysqld.inc ---let SEARCH_PATTERN = The innodb_temporary data file 'ibtmp1' must be at least ---source include/search_pattern_in_file.inc -eval $check_no_innodb; - --let $restart_parameters= --innodb_temp_data_file_path= --source include/restart_mysqld.inc --let SEARCH_PATTERN = InnoDB: syntax error in file path diff --git a/mysql-test/suite/innodb_zip/include/have_innodb_zip.inc b/mysql-test/suite/innodb_zip/include/have_innodb_zip.inc deleted file mode 100644 index 6af83d51304..00000000000 --- a/mysql-test/suite/innodb_zip/include/have_innodb_zip.inc +++ /dev/null @@ -1,4 +0,0 @@ -if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value <= 16384`) -{ - --skip Test with InnoDB zip requires page size not greater than 16k. -} diff --git a/mysql-test/suite/innodb_zip/r/wl6344_compress_level.result b/mysql-test/suite/innodb_zip/r/wl6344_compress_level.result index 5cdfe162b6a..b33d9c0c8de 100644 --- a/mysql-test/suite/innodb_zip/r/wl6344_compress_level.result +++ b/mysql-test/suite/innodb_zip/r/wl6344_compress_level.result @@ -1,28 +1,13 @@ -USE test; -DROP TABLE IF EXISTS tab5; -Warnings: -Note 1051 Unknown table 'test.tab5' -DROP TABLE IF EXISTS tab6; -Warnings: -Note 1051 Unknown table 'test.tab6' -#set the other madatory flags before test starts SET GLOBAL Innodb_file_per_table=on; -#set the compression level=0 (No compress) +SET @save_innodb_compression_level = @@global.innodb_compression_level; SET global innodb_compression_level=0; -#check the compression level and the compressed_pages is default -SELECT @@innodb_compression_level; -@@innodb_compression_level -0 -SELECT @@Innodb_file_per_table; -@@Innodb_file_per_table -1 #create table with 1K block size CREATE TABLE tab5 (col_1 CHAR (255) , col_2 VARCHAR (255), col_3 longtext, col_4 longtext,col_5 longtext, col_6 longtext , col_7 longtext , col_8 longtext ,col_9 longtext , -col_10 longtext ,col_11 int auto_increment primary key) +col_10 longtext ,col_11 int auto_increment primary key) ENGINE = innodb ROW_FORMAT=compressed key_block_size=1; #create indexes CREATE INDEX idx1 ON tab5(col_4(10)); @@ -42,7 +27,8 @@ SET @col_7 = repeat('g', 100); SET @col_8 = repeat('h', 100); SET @col_9 = repeat('i', 100); SET @col_10 = repeat('j', 100); -#insert 10 records +#insert 10 records +BEGIN; INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10) VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10); INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10) @@ -63,7 +49,8 @@ INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10) VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10); INSERT INTO tab5(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10) VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10); -#set the compression level=9 (High compress) +COMMIT; +#set the compression level=9 (High compress) SET global innodb_compression_level=9; #create table with 1K block size CREATE TABLE tab6 (col_1 CHAR (255) , @@ -80,18 +67,8 @@ CREATE INDEX idx3 ON tab6(col_6(10)); CREATE INDEX idx4 ON tab6(col_7(10)); CREATE INDEX idx5 ON tab6(col_8(10)); CREATE INDEX idx6 ON tab6(col_11); -#load the with repeat function -SET @col_1 = repeat('a', 100); -SET @col_2 = repeat('b', 100); -SET @col_3 = repeat('c', 100); -SET @col_4 = repeat('d', 100); -SET @col_5 = repeat('e', 100); -SET @col_6 = repeat('f', 100); -SET @col_7 = repeat('g', 100); -SET @col_8 = repeat('h', 100); -SET @col_9 = repeat('i', 100); -SET @col_10 = repeat('j', 100); -#insert 10 records +#insert 10 records +BEGIN; INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10) VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10); INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10) @@ -112,24 +89,21 @@ INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10) VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10); INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_10) VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10); +COMMIT; #diff the sizes of the No compressed table and high compressed table -SET @size=(SELECT -(SELECT (SUM(DATA_LENGTH+INDEX_LENGTH)/1024/1024) -FROM INFORMATION_SCHEMA.TABLES +SET @size=(SELECT +(SELECT (SUM(DATA_LENGTH+INDEX_LENGTH)/1024/1024) +FROM INFORMATION_SCHEMA.TABLES WHERE table_name='tab5' AND ENGINE='InnoDB' AND table_schema='test') - -(SELECT SUM(DATA_LENGTH+INDEX_LENGTH)/1024/1024 -FROM INFORMATION_SCHEMA.TABLES +(SELECT SUM(DATA_LENGTH+INDEX_LENGTH)/1024/1024 +FROM INFORMATION_SCHEMA.TABLES WHERE table_name='tab6' AND ENGINE='InnoDB' AND table_schema='test') FROM DUAL); -#check the size of the table, it should not be Negative value +#check the size of the table, it should not be Negative value #The results of this query Test pass = 1 and fail=0 SELECT @size >= 0; @size >= 0 1 -# -# Cleanup -# -DROP TABLE tab5; -DROP TABLE tab6; -#reset back the compression_level to default. +DROP TABLE tab5, tab6; +SET GLOBAL innodb_compression_level = @save_innodb_compression_level; diff --git a/mysql-test/suite/innodb_zip/t/bug36169.test b/mysql-test/suite/innodb_zip/t/bug36169.test index 5452c929b92..07566b204bd 100644 --- a/mysql-test/suite/innodb_zip/t/bug36169.test +++ b/mysql-test/suite/innodb_zip/t/bug36169.test @@ -3,8 +3,7 @@ # http://bugs.mysql.com/36169 # --- source include/have_innodb.inc --- source include/have_innodb_zip.inc +-- source include/innodb_page_size_small.inc let $file_per_table=`select @@innodb_file_per_table`; SET GLOBAL innodb_file_per_table=ON; diff --git a/mysql-test/suite/innodb_zip/t/bug52745.test b/mysql-test/suite/innodb_zip/t/bug52745.test index a3de7323efe..be4b5c2bfcb 100644 --- a/mysql-test/suite/innodb_zip/t/bug52745.test +++ b/mysql-test/suite/innodb_zip/t/bug52745.test @@ -1,5 +1,4 @@ --- source include/have_innodb.inc --- source include/have_innodb_zip.inc +-- source include/innodb_page_size_small.inc let $file_per_table=`select @@innodb_file_per_table`; SET GLOBAL innodb_file_per_table=on; diff --git a/mysql-test/suite/innodb_zip/t/bug53591.test b/mysql-test/suite/innodb_zip/t/bug53591.test index 1943c59fe17..67223027bad 100644 --- a/mysql-test/suite/innodb_zip/t/bug53591.test +++ b/mysql-test/suite/innodb_zip/t/bug53591.test @@ -1,5 +1,4 @@ --- source include/have_innodb.inc --- source include/have_innodb_zip.inc +-- source include/innodb_page_size_small.inc let $file_per_table=`select @@innodb_file_per_table`; diff --git a/mysql-test/suite/innodb_zip/t/bug56680.test b/mysql-test/suite/innodb_zip/t/bug56680.test index 694c5ffac59..da37f6a28b4 100644 --- a/mysql-test/suite/innodb_zip/t/bug56680.test +++ b/mysql-test/suite/innodb_zip/t/bug56680.test @@ -3,8 +3,7 @@ # # Bug #56680 InnoDB may return wrong results from a case-insensitive index # --- source include/have_innodb.inc --- source include/have_innodb_zip.inc +-- source include/innodb_page_size_small.inc -- disable_query_log SET @tx_isolation_orig = @@tx_isolation; diff --git a/mysql-test/suite/innodb_zip/t/create_options.test b/mysql-test/suite/innodb_zip/t/create_options.test index 86ef141cae8..e7303dee8f3 100644 --- a/mysql-test/suite/innodb_zip/t/create_options.test +++ b/mysql-test/suite/innodb_zip/t/create_options.test @@ -57,8 +57,7 @@ # since they are rejected for InnoDB page sizes of 8k and 16k. # See innodb_16k and innodb_8k for those tests. --- source include/have_innodb.inc --- source include/have_innodb_zip.inc +--source include/innodb_page_size_small.inc SET default_storage_engine=InnoDB; --disable_query_log diff --git a/mysql-test/suite/innodb_zip/t/innochecksum.test b/mysql-test/suite/innodb_zip/t/innochecksum.test index 0403251bf64..63a4b418677 100644 --- a/mysql-test/suite/innodb_zip/t/innochecksum.test +++ b/mysql-test/suite/innodb_zip/t/innochecksum.test @@ -1,8 +1,7 @@ #************************************************************ # WL6045:Improve Innochecksum #************************************************************ ---source include/have_innodb.inc ---source include/have_innodb_zip.inc +--source include/innodb_page_size_small.inc --source include/no_valgrind_without_big.inc # Embedded server does not support crashing. --source include/not_embedded.inc diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_2.test b/mysql-test/suite/innodb_zip/t/innochecksum_2.test index 7f4ad336805..330bb81ba75 100644 --- a/mysql-test/suite/innodb_zip/t/innochecksum_2.test +++ b/mysql-test/suite/innodb_zip/t/innochecksum_2.test @@ -1,8 +1,7 @@ #************************************************************ # WL6045:Improve Innochecksum #************************************************************ ---source include/have_innodb.inc ---source include/have_innodb_zip.inc +--source include/innodb_page_size_small.inc --source include/have_debug.inc --source include/no_valgrind_without_big.inc # Avoid CrashReporter popup on Mac. diff --git a/mysql-test/suite/innodb_zip/t/innochecksum_3.test b/mysql-test/suite/innodb_zip/t/innochecksum_3.test index 7895510b335..54c67ff1a9b 100644 --- a/mysql-test/suite/innodb_zip/t/innochecksum_3.test +++ b/mysql-test/suite/innodb_zip/t/innochecksum_3.test @@ -1,8 +1,7 @@ #************************************************************ # WL6045:Improve Innochecksum #************************************************************ ---source include/have_innodb.inc ---source include/have_innodb_zip.inc +--source include/innodb_page_size_small.inc --source include/no_valgrind_without_big.inc diff --git a/mysql-test/suite/innodb_zip/t/innodb-zip.test b/mysql-test/suite/innodb_zip/t/innodb-zip.test index 8a201cb37ae..a2b55144c61 100644 --- a/mysql-test/suite/innodb_zip/t/innodb-zip.test +++ b/mysql-test/suite/innodb_zip/t/innodb-zip.test @@ -1,4 +1,4 @@ --- source include/have_innodb.inc +--source include/innodb_page_size_small.inc CREATE DATABASE mysqltest_innodb_zip; USE mysqltest_innodb_zip; @@ -8,7 +8,6 @@ SELECT table_name, row_format, data_length, index_length let $per_table=`select @@innodb_file_per_table`; let $format=`select @@innodb_file_format`; -let $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`; let $innodb_file_format_orig=`select @@innodb_file_format`; let $innodb_file_format_max_orig=`select @@innodb_file_format_max`; SET @save_innodb_stats_on_metadata=@@global.innodb_stats_on_metadata; @@ -354,7 +353,6 @@ drop table normal_table, zip_table; -- disable_query_log eval set global innodb_file_format=$format; eval set global innodb_file_per_table=$per_table; -eval set session innodb_strict_mode=$innodb_strict_mode_orig; eval SET GLOBAL innodb_file_format=$innodb_file_format_orig; eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig; SET @@global.innodb_stats_on_metadata=@save_innodb_stats_on_metadata; diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug36169.test b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test index 93051d56639..6a9b2099fa8 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_bug36169.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test @@ -1,4 +1,4 @@ ---source include/have_innodb.inc +--source include/innodb_page_size_small.inc # # Bug#36169 create innodb compressed table with too large row size crashed # http://bugs.mysql.com/36169 diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug36172.test b/mysql-test/suite/innodb_zip/t/innodb_bug36172.test index 622e0c56b15..6d21d656fd8 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_bug36172.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug36172.test @@ -1,4 +1,4 @@ ---source include/have_innodb.inc +--source include/innodb_page_size_small.inc # # Test case for bug 36172 # diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug52745.test b/mysql-test/suite/innodb_zip/t/innodb_bug52745.test index 5882278ab9b..b7efd0692ca 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_bug52745.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug52745.test @@ -1,4 +1,4 @@ --- source include/have_innodb.inc +--source include/innodb_page_size_small.inc SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR CREATE TABLE bug52745 ( diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug53591.test b/mysql-test/suite/innodb_zip/t/innodb_bug53591.test index 1366e0e43ac..0bce587f106 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_bug53591.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug53591.test @@ -1,4 +1,4 @@ --- source include/have_innodb.inc +--source include/innodb_page_size_small.inc SET GLOBAL innodb_strict_mode=on; set old_alter_table=0; diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug56680.test b/mysql-test/suite/innodb_zip/t/innodb_bug56680.test index 4e73b1fce0f..0cb1c897f2e 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_bug56680.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug56680.test @@ -1,4 +1,4 @@ ---source include/have_innodb.inc +--source include/innodb_page_size_small.inc # # Bug #56680 InnoDB may return wrong results from a case-insensitive index # diff --git a/mysql-test/suite/innodb_zip/t/restart.test b/mysql-test/suite/innodb_zip/t/restart.test index a2dacdb4a05..05ac8274278 100644 --- a/mysql-test/suite/innodb_zip/t/restart.test +++ b/mysql-test/suite/innodb_zip/t/restart.test @@ -1,9 +1,7 @@ # # These test make sure that tables are visible after rebooting # - ---source include/have_innodb.inc ---source include/have_innodb_zip.inc +--source include/innodb_page_size_small.inc --source include/have_partition.inc --source include/not_embedded.inc SET default_storage_engine=InnoDB; diff --git a/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test index 392a3ed2879..0898a32fbf5 100644 --- a/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test +++ b/mysql-test/suite/innodb_zip/t/wl5522_debug_zip.test @@ -10,8 +10,7 @@ # Avoid CrashReporter popup on Mac --source include/not_crashrep.inc --- source include/have_innodb.inc --- source include/have_innodb_zip.inc +-- source include/innodb_page_size_small.inc call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue."); diff --git a/mysql-test/suite/innodb_zip/t/wl5522_zip.test b/mysql-test/suite/innodb_zip/t/wl5522_zip.test index 7863c2b3ffb..d92093262ac 100644 --- a/mysql-test/suite/innodb_zip/t/wl5522_zip.test +++ b/mysql-test/suite/innodb_zip/t/wl5522_zip.test @@ -1,8 +1,7 @@ # Not supported in embedded --source include/not_embedded.inc --- source include/have_innodb.inc --- source include/have_innodb_zip.inc +-- source include/innodb_page_size_small.inc call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists. Please DISCARD the tablespace before IMPORT."); diff --git a/mysql-test/suite/innodb_zip/t/wl6344_compress_level.test b/mysql-test/suite/innodb_zip/t/wl6344_compress_level.test index df4e66967f7..690efffed56 100644 --- a/mysql-test/suite/innodb_zip/t/wl6344_compress_level.test +++ b/mysql-test/suite/innodb_zip/t/wl6344_compress_level.test @@ -9,31 +9,20 @@ # greater than the # the size of the table when compression level=9 #******************************************************************* ---source include/have_innodb.inc ---source include/have_innodb_zip.inc +--source include/innodb_page_size_small.inc -USE test; -DROP TABLE IF EXISTS tab5; -DROP TABLE IF EXISTS tab6; - ---echo #set the other madatory flags before test starts SET GLOBAL Innodb_file_per_table=on; -let $innodb_compression_level = `SELECT @@global.innodb_compression_level`; +SET @save_innodb_compression_level = @@global.innodb_compression_level; ---echo #set the compression level=0 (No compress) SET global innodb_compression_level=0; --- echo #check the compression level and the compressed_pages is default -SELECT @@innodb_compression_level; -SELECT @@Innodb_file_per_table; - -- echo #create table with 1K block size CREATE TABLE tab5 (col_1 CHAR (255) , col_2 VARCHAR (255), col_3 longtext, col_4 longtext,col_5 longtext, col_6 longtext , col_7 longtext , col_8 longtext ,col_9 longtext , -col_10 longtext ,col_11 int auto_increment primary key) +col_10 longtext ,col_11 int auto_increment primary key) ENGINE = innodb ROW_FORMAT=compressed key_block_size=1; -- echo #create indexes @@ -56,7 +45,8 @@ SET @col_8 = repeat('h', 100); SET @col_9 = repeat('i', 100); SET @col_10 = repeat('j', 100); ---echo #insert 10 records +--echo #insert 10 records +BEGIN; let $i = 10; while ($i) { @@ -65,8 +55,9 @@ VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10); dec $i; } +COMMIT; ---echo #set the compression level=9 (High compress) +--echo #set the compression level=9 (High compress) SET global innodb_compression_level=9; -- echo #create table with 1K block size @@ -86,19 +77,8 @@ CREATE INDEX idx4 ON tab6(col_7(10)); CREATE INDEX idx5 ON tab6(col_8(10)); CREATE INDEX idx6 ON tab6(col_11); ---echo #load the with repeat function -SET @col_1 = repeat('a', 100); -SET @col_2 = repeat('b', 100); -SET @col_3 = repeat('c', 100); -SET @col_4 = repeat('d', 100); -SET @col_5 = repeat('e', 100); -SET @col_6 = repeat('f', 100); -SET @col_7 = repeat('g', 100); -SET @col_8 = repeat('h', 100); -SET @col_9 = repeat('i', 100); -SET @col_10 = repeat('j', 100); - ---echo #insert 10 records +--echo #insert 10 records +BEGIN; let $i = 10; while ($i) { @@ -106,30 +86,23 @@ eval INSERT INTO tab6(col_1,col_2,col_3,col_4,col_5,col_6,col_7,col_8,col_9,col_ VALUES (@col_1,@col_2,@col_3,@col_4,@cl_5,@col_6,@col_7,@col_8,@col_9,@col_10); dec $i; } +COMMIT; -- echo #diff the sizes of the No compressed table and high compressed table -SET @size=(SELECT -(SELECT (SUM(DATA_LENGTH+INDEX_LENGTH)/1024/1024) -FROM INFORMATION_SCHEMA.TABLES +SET @size=(SELECT +(SELECT (SUM(DATA_LENGTH+INDEX_LENGTH)/1024/1024) +FROM INFORMATION_SCHEMA.TABLES WHERE table_name='tab5' AND ENGINE='InnoDB' AND table_schema='test') - -(SELECT SUM(DATA_LENGTH+INDEX_LENGTH)/1024/1024 -FROM INFORMATION_SCHEMA.TABLES +(SELECT SUM(DATA_LENGTH+INDEX_LENGTH)/1024/1024 +FROM INFORMATION_SCHEMA.TABLES WHERE table_name='tab6' AND ENGINE='InnoDB' AND table_schema='test') FROM DUAL); ---echo #check the size of the table, it should not be Negative value +--echo #check the size of the table, it should not be Negative value --echo #The results of this query Test pass = 1 and fail=0 SELECT @size >= 0; +DROP TABLE tab5, tab6; ---echo # ---echo # Cleanup ---echo # -DROP TABLE tab5; -DROP TABLE tab6; - ---echo #reset back the compression_level to default. ---disable_query_log -eval SET GLOBAL innodb_compression_level=$innodb_compression_level; ---enable_query_log +SET GLOBAL innodb_compression_level = @save_innodb_compression_level; diff --git a/mysql-test/suite/multi_source/mdev-9544.cnf b/mysql-test/suite/multi_source/mdev-9544.cnf new file mode 100644 index 00000000000..b43aca5370d --- /dev/null +++ b/mysql-test/suite/multi_source/mdev-9544.cnf @@ -0,0 +1,22 @@ +!include my.cnf + +[mysqld.1] +log-bin +log-slave-updates + +[mysqld.2] +log-bin +log-slave-updates + +[mysqld.3] +log-bin +log-slave-updates + +[mysqld.4] +server-id=4 +log-bin=server4-bin +log-slave-updates + +[ENV] +SERVER_MYPORT_4= @mysqld.4.port +SERVER_MYSOCK_4= @mysqld.4.socket diff --git a/mysql-test/suite/multi_source/mdev-9544.result b/mysql-test/suite/multi_source/mdev-9544.result new file mode 100644 index 00000000000..e7e4bcda8ff --- /dev/null +++ b/mysql-test/suite/multi_source/mdev-9544.result @@ -0,0 +1,78 @@ +create database a; +use a; +create table t1(a int); +insert into t1 values(1); +create table t2(a int); +insert into t2 values(1); +create database b; +use b; +create table t1(a int); +insert into t1 values(1); +create table t2(a int); +insert into t2 values(1); +create database c; +use c; +create table t1(a int); +insert into t1 values(1); +create table t2(a int); +insert into t2 values(1); +change master 'm1' to master_port=MYPORT_1 , master_host='127.0.0.1', master_user='root'; +change master 'm2' to master_port=MYPORT_2 , master_host='127.0.0.1', master_user='root'; +change master to master_port=MYPORT_3 , master_host='127.0.0.1', master_user='root'; +start all slaves; +set default_master_connection = 'm1'; +include/wait_for_slave_to_start.inc +set default_master_connection = 'm2'; +include/wait_for_slave_to_start.inc +set default_master_connection = ''; +include/wait_for_slave_to_start.inc +use a; +show tables; +Tables_in_a +t1 +t2 +use b; +show tables; +Tables_in_b +t1 +t2 +use c; +show tables; +Tables_in_c +t1 +t2 +#TEST +SET default_master_connection = "m1"; +SET default_master_connection = "m2"; +SET default_master_connection = ""; +flush logs; +SET default_master_connection = "m1"; +#log Rotated +mysqld-relay-bin.000002 +mysqld-relay-bin.000003 +mysqld-relay-bin.index +SET default_master_connection = "m2"; +#log Rotated +mysqld-relay-bin-m1.000002 +mysqld-relay-bin-m1.000003 +mysqld-relay-bin-m1.index +SET default_master_connection = ""; +#log Rotated +mysqld-relay-bin-m2.000002 +mysqld-relay-bin-m2.000003 +mysqld-relay-bin-m2.index +#CleanUp +drop database a; +drop database b; +drop database c; +stop all slaves; +Warnings: +Note 1938 SLAVE 'm2' stopped +Note 1938 SLAVE '' stopped +Note 1938 SLAVE 'm1' stopped +SET default_master_connection = "m1"; +include/wait_for_slave_to_stop.inc +SET default_master_connection = "m2"; +include/wait_for_slave_to_stop.inc +SET default_master_connection = ""; +include/wait_for_slave_to_stop.inc diff --git a/mysql-test/suite/multi_source/mdev-9544.test b/mysql-test/suite/multi_source/mdev-9544.test new file mode 100644 index 00000000000..f532a63a585 --- /dev/null +++ b/mysql-test/suite/multi_source/mdev-9544.test @@ -0,0 +1,116 @@ +--source include/not_embedded.inc +--source include/have_innodb.inc +--source include/have_debug.inc + +--connect (server_1,127.0.0.1,root,,,$SERVER_MYPORT_1) +--connect (server_2,127.0.0.1,root,,,$SERVER_MYPORT_2) +--connect (server_3,127.0.0.1,root,,,$SERVER_MYPORT_3) +--connect (server_4,127.0.0.1,root,,,$SERVER_MYPORT_4) + +--connection server_1 +create database a; +use a; +create table t1(a int); +insert into t1 values(1); +create table t2(a int); +insert into t2 values(1); +--save_master_pos + +--connection server_2 +create database b; +use b; +create table t1(a int); +insert into t1 values(1); +create table t2(a int); +insert into t2 values(1); +--save_master_pos + +--connection server_3 +create database c; +use c; +create table t1(a int); +insert into t1 values(1); +create table t2(a int); +insert into t2 values(1); +--save_master_pos + +--connection server_4 +--disable_warnings +--replace_result $SERVER_MYPORT_1 MYPORT_1 +eval change master 'm1' to master_port=$SERVER_MYPORT_1 , master_host='127.0.0.1', master_user='root'; +--replace_result $SERVER_MYPORT_2 MYPORT_2 +eval change master 'm2' to master_port=$SERVER_MYPORT_2 , master_host='127.0.0.1', master_user='root'; +--replace_result $SERVER_MYPORT_3 MYPORT_3 +eval change master to master_port=$SERVER_MYPORT_3 , master_host='127.0.0.1', master_user='root'; +start all slaves; +set default_master_connection = 'm1'; +--source include/wait_for_slave_to_start.inc +set default_master_connection = 'm2'; +--source include/wait_for_slave_to_start.inc +set default_master_connection = ''; +--source include/wait_for_slave_to_start.inc + +--enable_warnings +--sync_with_master 0,'m1' +--sync_with_master 0,'m2' +--sync_with_master 0,'' +use a; +show tables; +use b; +show tables; +use c; +show tables; +--echo #TEST +SET default_master_connection = "m1"; +--let $old_m1 = query_get_value("show relaylog events;", "Log_name",1) +SET default_master_connection = "m2"; +--let $old_m2 = query_get_value("show relaylog events;", "Log_name",1) +SET default_master_connection = ""; +--let $old__ = query_get_value("show relaylog events;", "Log_name",1) +flush logs; +--sleep 2 +--let $MYSQLD_DATADIR = `select @@datadir` +SET default_master_connection = "m1"; +--let $new_m1 = query_get_value("show relaylog events;", "Log_name",1) +--if ($new_m1 != $old_m1) { + --echo #log Rotated + --exec ls $MYSQLD_DATADIR | grep "mysqld-relay-bin\." +} +SET default_master_connection = "m2"; +--let $new_m2 = query_get_value("show relaylog events;", "Log_name",1) +--if ($new_m2 != $old_m2) { + --echo #log Rotated + --exec ls $MYSQLD_DATADIR | grep "mysqld-relay-bin-m1" +} +SET default_master_connection = ""; +--let $new__ = query_get_value("show relaylog events;", "Log_name",1) +--if ($new__ != $old__) { + --echo #log Rotated + --exec ls $MYSQLD_DATADIR | grep "mysqld-relay-bin-m2" +} + +--echo #CleanUp +--connection server_1 +drop database a; +--save_master_pos + +--connection server_2 +drop database b; +--save_master_pos + +--connection server_3 +drop database c; +--save_master_pos + +--connection server_4 +--sync_with_master 0,'m1' +--sync_with_master 0,'m2' +--sync_with_master 0,'' +stop all slaves; +SET default_master_connection = "m1"; +--source include/wait_for_slave_to_stop.inc +SET default_master_connection = "m2"; +--source include/wait_for_slave_to_stop.inc +SET default_master_connection = ""; +--source include/wait_for_slave_to_stop.inc + diff --git a/mysql-test/suite/perfschema/t/start_server_1_digest-master.opt b/mysql-test/suite/perfschema/t/start_server_1_digest-master.opt index e59be3eb02f..c3a6012fbac 100644 --- a/mysql-test/suite/perfschema/t/start_server_1_digest-master.opt +++ b/mysql-test/suite/perfschema/t/start_server_1_digest-master.opt @@ -1 +1 @@ ---performance-schema-digests-size=1 +--loose-performance-schema-digests-size=1 diff --git a/mysql-test/suite/wsrep/include/check_galera_version.inc b/mysql-test/suite/wsrep/include/check_galera_version.inc index 38b4ada98b9..cb35269249b 100644 --- a/mysql-test/suite/wsrep/include/check_galera_version.inc +++ b/mysql-test/suite/wsrep/include/check_galera_version.inc @@ -12,11 +12,29 @@ --disable_query_log -eval SET @GALERA_VERSION=(SELECT CONCAT('$galera_version', '%')); +# Required Version -if (!`SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE - VARIABLE_NAME LIKE 'wsrep_provider_version' AND - VARIABLE_VALUE LIKE @GALERA_VERSION`) +eval SET @GALERA_VERSION='$galera_version'; +SELECT CAST(REGEXP_REPLACE(@GALERA_VERSION,'^(\\d+)\\.(\\d+)\\.(\\d+).*','\\1') AS UNSIGNED) INTO @GALERA_MAJOR_VERSION; +SELECT CAST(REGEXP_REPLACE(@GALERA_VERSION,'^(\\d+)\\.(\\d+)\\.(\\d+).*','\\2') AS UNSIGNED) INTO @GALERA_MID_VERSION; +SELECT CAST(REGEXP_REPLACE(@GALERA_VERSION,'^(\\d+)\\.(\\d+)\\.(\\d+).*','\\3') AS UNSIGNED) INTO @GALERA_MINOR_VERSION; + +# Actual +SELECT VARIABLE_VALUE INTO @ACTUAL_GALERA_VERSION FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE 'wsrep_provider_version'; + +SELECT CAST(REGEXP_REPLACE(@ACTUAL_GALERA_VERSION,'^(\\d+)\\.(\\d+)\\.(\\d+).*','\\1') AS UNSIGNED) INTO @ACTUAL_GALERA_MAJOR_VERSION; +SELECT CAST(REGEXP_REPLACE(@ACTUAL_GALERA_VERSION,'^(\\d+)\\.(\\d+)\\.(\\d+).*','\\2') AS UNSIGNED) INTO @ACTUAL_GALERA_MID_VERSION; +SELECT CAST(REGEXP_REPLACE(@ACTUAL_GALERA_VERSION,'^(\\d+)\\.(\\d+)\\.(\\d+).*','\\3') AS UNSIGNED) INTO @ACTUAL_GALERA_MINOR_VERSION; + +# For testing +#SELECT @GALERA_MAJOR_VERSION, @GALERA_MID_VERSION, @GALERA_MINOR_VERSION; +#SELECT @ACTUAL_GALERA_VERSION; +#SELECT @ACTUAL_GALERA_MAJOR_VERSION, @ACTUAL_GALERA_MID_VERSION, @ACTUAL_GALERA_MINOR_VERSION; + +if (!`SELECT (@ACTUAL_GALERA_MAJOR_VERSION > @GALERA_MAJOR_VERSION) OR + (@ACTUAL_GALERA_MAJOR_VERSION = @GALERA_MAJOR_VERSION AND @ACTUAL_GALERA_MID_VERSION > @GALERA_MID_VERSION) OR + (@ACTUAL_GALERA_MAJOR_VERSION = @GALERA_MAJOR_VERSION AND @ACTUAL_GALERA_MID_VERSION = @GALERA_MID_VERSION AND @ACTUAL_GALERA_MINOR_VERSION >= @GALERA_MINOR_VERSION) + `) { skip Test requires Galera library version $galera_version; } |