mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge bb-10.2-ext into 10.3
This commit is contained in:
@ -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
|
@ -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
|
643
mysql-test/suite/encryption/r/innodb-checksum-algorithm.result
Normal file
643
mysql-test/suite/encryption/r/innodb-checksum-algorithm.result
Normal file
@ -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;
|
@ -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;
|
||||
|
87
mysql-test/suite/encryption/r/innodb-first-page-read.result
Normal file
87
mysql-test/suite/encryption/r/innodb-first-page-read.result
Normal file
@ -0,0 +1,87 @@
|
||||
create database innodb_test;
|
||||
use innodb_test;
|
||||
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
|
||||
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact;
|
||||
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic;
|
||||
create table innodb_compressed(c1 bigint not null, b char(200)) engine=innodb row_format=compressed;
|
||||
create table innodb_compressed1(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=1;
|
||||
create table innodb_compressed2(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=2;
|
||||
create table innodb_compressed4(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=4;
|
||||
create table innodb_compressed8(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=8;
|
||||
create table innodb_compressed16(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=16;
|
||||
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant;
|
||||
create table innodb_pagecomp(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes;
|
||||
create table innodb_pagecomp1(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=1;
|
||||
create table innodb_pagecomp2(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=2;
|
||||
create table innodb_pagecomp3(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=3;
|
||||
create table innodb_pagecomp4(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=4;
|
||||
create table innodb_pagecomp5(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=5;
|
||||
create table innodb_pagecomp6(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=6;
|
||||
create table innodb_pagecomp7(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=7;
|
||||
create table innodb_pagecomp8(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=8;
|
||||
create table innodb_pagecomp9(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=9;
|
||||
create table innodb_datadir1(c1 bigint not null, b char(200)) engine=innodb DATA DIRECTORY='MYSQL_TMP_DIR';
|
||||
create table innodb_datadir2(c1 bigint not null, b char(200)) engine=innodb row_format=compressed DATA DIRECTORY='MYSQL_TMP_DIR';
|
||||
create table innodb_datadir3(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes DATA DIRECTORY='MYSQL_TMP_DIR';
|
||||
begin;
|
||||
insert into innodb_normal values (1,'secret');
|
||||
insert into innodb_compact select * from innodb_normal;
|
||||
insert into innodb_dynamic select * from innodb_normal;
|
||||
insert into innodb_compressed select * from innodb_normal;
|
||||
insert into innodb_compressed1 select * from innodb_normal;
|
||||
insert into innodb_compressed2 select * from innodb_normal;
|
||||
insert into innodb_compressed4 select * from innodb_normal;
|
||||
insert into innodb_compressed8 select * from innodb_normal;
|
||||
insert into innodb_compressed16 select * from innodb_normal;
|
||||
insert into innodb_redundant select * from innodb_normal;
|
||||
insert into innodb_pagecomp select * from innodb_normal;
|
||||
insert into innodb_pagecomp1 select * from innodb_normal;
|
||||
insert into innodb_pagecomp2 select * from innodb_normal;
|
||||
insert into innodb_pagecomp3 select * from innodb_normal;
|
||||
insert into innodb_pagecomp4 select * from innodb_normal;
|
||||
insert into innodb_pagecomp5 select * from innodb_normal;
|
||||
insert into innodb_pagecomp6 select * from innodb_normal;
|
||||
insert into innodb_pagecomp7 select * from innodb_normal;
|
||||
insert into innodb_pagecomp8 select * from innodb_normal;
|
||||
insert into innodb_pagecomp9 select * from innodb_normal;
|
||||
insert into innodb_datadir1 select * from innodb_normal;
|
||||
insert into innodb_datadir2 select * from innodb_normal;
|
||||
insert into innodb_datadir3 select * from innodb_normal;
|
||||
commit;
|
||||
# Restart server and see how many page 0's are read
|
||||
# result should be less than actual number of tables
|
||||
# i.e. < 23 + 3 = 26
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 26
|
||||
use innodb_test;
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 26
|
||||
use test;
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 26
|
||||
set global innodb_encrypt_tables=OFF;
|
||||
# wait until tables are decrypted
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 26
|
||||
use innodb_test;
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 26
|
||||
use test;
|
||||
# restart and see number read page 0
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 26
|
||||
use innodb_test;
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 26
|
||||
use test;
|
||||
drop database innodb_test;
|
||||
show status like 'innodb_pages0_read%';
|
||||
Variable_name Value
|
||||
Innodb_pages0_read 26
|
@ -64,5 +64,4 @@ FOUND 1 /public/ in t7.ibd
|
||||
FOUND 1 /public/ in t8.ibd
|
||||
# t9 page compressed expecting NOT FOUND
|
||||
NOT FOUND /public/ in t9.ibd
|
||||
use test;
|
||||
drop database enctests;
|
||||
|
120
mysql-test/suite/encryption/t/innodb-checksum-algorithm.test
Normal file
120
mysql-test/suite/encryption/t/innodb-checksum-algorithm.test
Normal file
@ -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;
|
@ -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
|
@ -1,4 +0,0 @@
|
||||
--innodb-tablespaces-encryption
|
||||
--innodb-encrypt-tables=on
|
||||
--innodb-encryption-threads=2
|
||||
--max_allowed_packet=64K
|
@ -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
|
||||
|
5
mysql-test/suite/encryption/t/innodb-first-page-read.opt
Normal file
5
mysql-test/suite/encryption/t/innodb-first-page-read.opt
Normal file
@ -0,0 +1,5 @@
|
||||
--innodb-encrypt-tables=ON
|
||||
--innodb-encrypt-log=ON
|
||||
--innodb-encryption-rotate-key-age=15
|
||||
--innodb-encryption-threads=4
|
||||
--innodb-tablespaces-encryption
|
92
mysql-test/suite/encryption/t/innodb-first-page-read.test
Normal file
92
mysql-test/suite/encryption/t/innodb-first-page-read.test
Normal file
@ -0,0 +1,92 @@
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/have_file_key_management_plugin.inc
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
create database innodb_test;
|
||||
use innodb_test;
|
||||
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
|
||||
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact;
|
||||
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic;
|
||||
create table innodb_compressed(c1 bigint not null, b char(200)) engine=innodb row_format=compressed;
|
||||
create table innodb_compressed1(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=1;
|
||||
create table innodb_compressed2(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=2;
|
||||
create table innodb_compressed4(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=4;
|
||||
create table innodb_compressed8(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=8;
|
||||
create table innodb_compressed16(c1 bigint not null, b char(200)) engine=innodb row_format=compressed key_block_size=16;
|
||||
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant;
|
||||
create table innodb_pagecomp(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes;
|
||||
create table innodb_pagecomp1(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=1;
|
||||
create table innodb_pagecomp2(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=2;
|
||||
create table innodb_pagecomp3(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=3;
|
||||
create table innodb_pagecomp4(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=4;
|
||||
create table innodb_pagecomp5(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=5;
|
||||
create table innodb_pagecomp6(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=6;
|
||||
create table innodb_pagecomp7(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=7;
|
||||
create table innodb_pagecomp8(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=8;
|
||||
create table innodb_pagecomp9(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes page_compression_level=9;
|
||||
|
||||
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
||||
eval create table innodb_datadir1(c1 bigint not null, b char(200)) engine=innodb DATA DIRECTORY='$MYSQL_TMP_DIR';
|
||||
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
||||
eval create table innodb_datadir2(c1 bigint not null, b char(200)) engine=innodb row_format=compressed DATA DIRECTORY='$MYSQL_TMP_DIR';
|
||||
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
|
||||
eval create table innodb_datadir3(c1 bigint not null, b char(200)) engine=innodb page_compressed=yes DATA DIRECTORY='$MYSQL_TMP_DIR';
|
||||
|
||||
begin;
|
||||
insert into innodb_normal values (1,'secret');
|
||||
insert into innodb_compact select * from innodb_normal;
|
||||
insert into innodb_dynamic select * from innodb_normal;
|
||||
insert into innodb_compressed select * from innodb_normal;
|
||||
insert into innodb_compressed1 select * from innodb_normal;
|
||||
insert into innodb_compressed2 select * from innodb_normal;
|
||||
insert into innodb_compressed4 select * from innodb_normal;
|
||||
insert into innodb_compressed8 select * from innodb_normal;
|
||||
insert into innodb_compressed16 select * from innodb_normal;
|
||||
insert into innodb_redundant select * from innodb_normal;
|
||||
insert into innodb_pagecomp select * from innodb_normal;
|
||||
insert into innodb_pagecomp1 select * from innodb_normal;
|
||||
insert into innodb_pagecomp2 select * from innodb_normal;
|
||||
insert into innodb_pagecomp3 select * from innodb_normal;
|
||||
insert into innodb_pagecomp4 select * from innodb_normal;
|
||||
insert into innodb_pagecomp5 select * from innodb_normal;
|
||||
insert into innodb_pagecomp6 select * from innodb_normal;
|
||||
insert into innodb_pagecomp7 select * from innodb_normal;
|
||||
insert into innodb_pagecomp8 select * from innodb_normal;
|
||||
insert into innodb_pagecomp9 select * from innodb_normal;
|
||||
insert into innodb_datadir1 select * from innodb_normal;
|
||||
insert into innodb_datadir2 select * from innodb_normal;
|
||||
insert into innodb_datadir3 select * from innodb_normal;
|
||||
commit;
|
||||
|
||||
--echo # Restart server and see how many page 0's are read
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--echo # result should be less than actual number of tables
|
||||
--echo # i.e. < 23 + 3 = 26
|
||||
show status like 'innodb_pages0_read%';
|
||||
use innodb_test;
|
||||
show status like 'innodb_pages0_read%';
|
||||
use test;
|
||||
show status like 'innodb_pages0_read%';
|
||||
|
||||
set global innodb_encrypt_tables=OFF;
|
||||
|
||||
--echo # wait until tables are decrypted
|
||||
--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0
|
||||
--source include/wait_condition.inc
|
||||
|
||||
show status like 'innodb_pages0_read%';
|
||||
use innodb_test;
|
||||
show status like 'innodb_pages0_read%';
|
||||
use test;
|
||||
|
||||
--echo # restart and see number read page 0
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
show status like 'innodb_pages0_read%';
|
||||
use innodb_test;
|
||||
show status like 'innodb_pages0_read%';
|
||||
use test;
|
||||
|
||||
drop database innodb_test;
|
||||
show status like 'innodb_pages0_read%';
|
@ -80,5 +80,4 @@ SET GLOBAL innodb_encrypt_tables=ON;
|
||||
|
||||
-- source include/start_mysqld.inc
|
||||
|
||||
use test;
|
||||
drop database enctests;
|
||||
|
Reference in New Issue
Block a user