mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch 'bb-10.1-jan-encryption' into bb-10.1-serg
With changes: * update tests to pass (new encryption/encryption_key_id syntax). * not merged the code that makes engine aware of the encryption mode (CRYPT_SCHEME_1_CBC, CRYPT_SCHEME_1_CTR, storing it on disk, etc), because now the encryption plugin is handling it. * compression+encryption did not work in either branch before the merge - and it does not work after the merge. it might be more broken after the merge though - some of that code was not merged. * page checksumming code was not moved (moving of page checksumming from fil_space_encrypt() to fil_space_decrypt was not merged). * restored deleted lines in buf_page_get_frame(), otherwise innodb_scrub test failed.
This commit is contained in:
@ -1,38 +1,38 @@
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_encryption`=1 `page_encryption_key`=1
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encryption`='on' `encryption_key_id`=1
|
||||
insert t1 values (12345, repeat('1234567890', 20));
|
||||
alter table t1 page_encryption_key=2;
|
||||
alter table t1 encryption_key_id=2;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_encryption`=1 `page_encryption_key`=2
|
||||
alter table t1 page_encryption_key=3;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encryption`='on' `encryption_key_id`=2
|
||||
alter table t1 encryption_key_id=3;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_encryption`=1 `page_encryption_key`=2
|
||||
alter table t1 page_encryption_key=33;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encryption`='on' `encryption_key_id`=2
|
||||
alter table t1 encryption_key_id=33;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_encryption`=1 `page_encryption_key`=33
|
||||
alter table t1 page_encryption_key=4;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encryption`='on' `encryption_key_id`=33
|
||||
alter table t1 encryption_key_id=4;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_encryption`=1 `page_encryption_key`=4
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encryption`='on' `encryption_key_id`=4
|
||||
drop table t1;
|
||||
|
@ -1,7 +1,7 @@
|
||||
call mtr.add_suppression("Cannot decrypt .*filekeys-data.enc. Wrong key");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
|
@ -1,7 +1,7 @@
|
||||
call mtr.add_suppression("File 'bad' not found");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
|
@ -1,38 +1,38 @@
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_encryption`=1 `page_encryption_key`=1
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encryption`='on' `encryption_key_id`=1
|
||||
insert t1 values (12345, repeat('1234567890', 20));
|
||||
alter table t1 page_encryption_key=2;
|
||||
alter table t1 encryption_key_id=2;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_encryption`=1 `page_encryption_key`=2
|
||||
alter table t1 page_encryption_key=3;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encryption`='on' `encryption_key_id`=2
|
||||
alter table t1 encryption_key_id=3;
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_encryption`=1 `page_encryption_key`=2
|
||||
alter table t1 page_encryption_key=33;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encryption`='on' `encryption_key_id`=2
|
||||
alter table t1 encryption_key_id=33;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_encryption`=1 `page_encryption_key`=33
|
||||
alter table t1 page_encryption_key=4;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encryption`='on' `encryption_key_id`=33
|
||||
alter table t1 encryption_key_id=4;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` bigint(20) NOT NULL,
|
||||
`b` char(200) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `page_encryption`=1 `page_encryption_key`=4
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encryption`='on' `encryption_key_id`=4
|
||||
drop table t1;
|
||||
|
@ -1,7 +1,7 @@
|
||||
call mtr.add_suppression("Cannot decrypt .*filekeys-data.enc. Wrong key");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
|
@ -1,7 +1,7 @@
|
||||
call mtr.add_suppression("File '' not found");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
|
@ -1,7 +1,7 @@
|
||||
call mtr.add_suppression("File '.*keys.txt' not found");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
@ -11,7 +11,7 @@ ERROR HY000: Invalid key id at MYSQL_TMP_DIR/keys.txt line 2, column 2
|
||||
call mtr.add_suppression("File '.*keys.txt' not found");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
@ -19,7 +19,7 @@ plugin_status
|
||||
call mtr.add_suppression("Invalid key id");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
@ -29,7 +29,7 @@ ERROR HY000: Invalid key id at MYSQL_TMP_DIR/keys.txt line 2, column 11
|
||||
call mtr.add_suppression("Invalid key id");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
@ -37,7 +37,7 @@ plugin_status
|
||||
call mtr.add_suppression("Invalid key id");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
@ -47,7 +47,7 @@ ERROR HY000: Invalid key at MYSQL_TMP_DIR/keys.txt line 2, column 47
|
||||
call mtr.add_suppression("Invalid key id");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
@ -55,7 +55,7 @@ plugin_status
|
||||
call mtr.add_suppression("Invalid key");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
@ -65,7 +65,7 @@ ERROR HY000: Invalid key at MYSQL_TMP_DIR/keys.txt line 2, column 33
|
||||
call mtr.add_suppression("Invalid key");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
@ -73,7 +73,7 @@ plugin_status
|
||||
call mtr.add_suppression("Invalid key");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
@ -83,7 +83,7 @@ ERROR HY000: Syntax error at MYSQL_TMP_DIR/keys.txt line 2, column 2
|
||||
call mtr.add_suppression("Invalid key");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
@ -91,7 +91,7 @@ plugin_status
|
||||
call mtr.add_suppression("Syntax error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
@ -101,7 +101,7 @@ ERROR HY000: Syntax error at MYSQL_TMP_DIR/keys.txt line 2, column 1
|
||||
call mtr.add_suppression("Syntax error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
@ -109,7 +109,7 @@ plugin_status
|
||||
call mtr.add_suppression("Syntax error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
|
@ -1,7 +1,7 @@
|
||||
call mtr.add_suppression("Cannot decrypt .*keys.txt. Not encrypted");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=1;
|
||||
create table t1(c1 bigint not null, b char(200)) engine=innodb encryption='on' encryption_key_id=1;
|
||||
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
|
||||
select plugin_status from information_schema.plugins
|
||||
where plugin_name = 'file_key_management';
|
||||
|
Reference in New Issue
Block a user