Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
c91e3260
Commit
c91e3260
authored
Mar 30, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests for file_key_management plugin key file parser
parent
e02749aa
Changes
34
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
414 additions
and
7 deletions
+414
-7
mysql-test/std_data/keys.txt
mysql-test/std_data/keys.txt
+9
-3
mysql-test/suite/innodb/r/innodb-page_encryption.result
mysql-test/suite/innodb/r/innodb-page_encryption.result
+3
-1
mysql-test/suite/innodb/r/innodb-page_encryption_log_encryption.result
...ite/innodb/r/innodb-page_encryption_log_encryption.result
+2
-2
mysql-test/suite/innodb/t/innodb-page_encryption.test
mysql-test/suite/innodb/t/innodb-page_encryption.test
+2
-0
mysql-test/suite/innodb/t/innodb-page_encryption_log_encryption.test
...suite/innodb/t/innodb-page_encryption_log_encryption.test
+1
-1
mysql-test/suite/plugins/r/filekeys_encfile.result
mysql-test/suite/plugins/r/filekeys_encfile.result
+38
-0
mysql-test/suite/plugins/r/filekeys_encfile_bad.result
mysql-test/suite/plugins/r/filekeys_encfile_bad.result
+8
-0
mysql-test/suite/plugins/r/filekeys_encfile_badfile.result
mysql-test/suite/plugins/r/filekeys_encfile_badfile.result
+8
-0
mysql-test/suite/plugins/r/filekeys_encfile_file.result
mysql-test/suite/plugins/r/filekeys_encfile_file.result
+38
-0
mysql-test/suite/plugins/r/filekeys_encfile_no.result
mysql-test/suite/plugins/r/filekeys_encfile_no.result
+8
-0
mysql-test/suite/plugins/r/filekeys_nofile.result
mysql-test/suite/plugins/r/filekeys_nofile.result
+8
-0
mysql-test/suite/plugins/r/filekeys_syntax.result
mysql-test/suite/plugins/r/filekeys_syntax.result
+116
-0
mysql-test/suite/plugins/r/filekeys_unencfile.result
mysql-test/suite/plugins/r/filekeys_unencfile.result
+8
-0
mysql-test/suite/plugins/t/filekeys-data.enc
mysql-test/suite/plugins/t/filekeys-data.enc
+0
-0
mysql-test/suite/plugins/t/filekeys-data.key
mysql-test/suite/plugins/t/filekeys-data.key
+1
-0
mysql-test/suite/plugins/t/filekeys_badtest.inc
mysql-test/suite/plugins/t/filekeys_badtest.inc
+18
-0
mysql-test/suite/plugins/t/filekeys_encfile.opt
mysql-test/suite/plugins/t/filekeys_encfile.opt
+2
-0
mysql-test/suite/plugins/t/filekeys_encfile.test
mysql-test/suite/plugins/t/filekeys_encfile.test
+1
-0
mysql-test/suite/plugins/t/filekeys_encfile_bad.opt
mysql-test/suite/plugins/t/filekeys_encfile_bad.opt
+2
-0
mysql-test/suite/plugins/t/filekeys_encfile_bad.test
mysql-test/suite/plugins/t/filekeys_encfile_bad.test
+2
-0
mysql-test/suite/plugins/t/filekeys_encfile_badfile.opt
mysql-test/suite/plugins/t/filekeys_encfile_badfile.opt
+2
-0
mysql-test/suite/plugins/t/filekeys_encfile_badfile.test
mysql-test/suite/plugins/t/filekeys_encfile_badfile.test
+2
-0
mysql-test/suite/plugins/t/filekeys_encfile_file.opt
mysql-test/suite/plugins/t/filekeys_encfile_file.opt
+2
-0
mysql-test/suite/plugins/t/filekeys_encfile_file.test
mysql-test/suite/plugins/t/filekeys_encfile_file.test
+1
-0
mysql-test/suite/plugins/t/filekeys_encfile_no.opt
mysql-test/suite/plugins/t/filekeys_encfile_no.opt
+1
-0
mysql-test/suite/plugins/t/filekeys_encfile_no.test
mysql-test/suite/plugins/t/filekeys_encfile_no.test
+2
-0
mysql-test/suite/plugins/t/filekeys_goodtest.inc
mysql-test/suite/plugins/t/filekeys_goodtest.inc
+20
-0
mysql-test/suite/plugins/t/filekeys_nofile.test
mysql-test/suite/plugins/t/filekeys_nofile.test
+2
-0
mysql-test/suite/plugins/t/filekeys_plugin.inc
mysql-test/suite/plugins/t/filekeys_plugin.inc
+4
-0
mysql-test/suite/plugins/t/filekeys_plugin.opt
mysql-test/suite/plugins/t/filekeys_plugin.opt
+2
-0
mysql-test/suite/plugins/t/filekeys_syntax.opt
mysql-test/suite/plugins/t/filekeys_syntax.opt
+1
-0
mysql-test/suite/plugins/t/filekeys_syntax.test
mysql-test/suite/plugins/t/filekeys_syntax.test
+96
-0
mysql-test/suite/plugins/t/filekeys_unencfile.opt
mysql-test/suite/plugins/t/filekeys_unencfile.opt
+2
-0
mysql-test/suite/plugins/t/filekeys_unencfile.test
mysql-test/suite/plugins/t/filekeys_unencfile.test
+2
-0
No files found.
mysql-test/std_data/keys.txt
View file @
c91e3260
#
# this is a comment
#
1;770A8A65DA156D24EE2A093277530142
1;770A8A65DA156D24EE2A093277530142
2;4D92199549E0F2EF009B4160F3582E5528A11A45017F3EF8
2;4D92199549E0F2EF009B4160F3582E5528A11A45017F3EF8
3;B374A26A71490437AA024E4FADD5B497FDFF1A8EA6FF12F6FB65AF2720B59CCF
# another comment
4;18420B5CBA31CCDFFE9716E91EB61374D05914F3ADE23E03
33;B374A26A71490437AA024E4FADD5B497FDFF1A8EA6FF12F6FB65AF2720B59CCF
4;18420B5CBA31CCDFFE9716E91EB61374D05914F3ADE23E03 --> ignored
5;966050D7777350B6FD5CCB3E5F648DA45C63BEFB6DEDDFA13443F156B7D35C84
5;966050D7777350B6FD5CCB3E5F648DA45C63BEFB6DEDDFA13443F156B7D35C84
6;B5EA210C8C09EF20DB95EC584714A89F
6;B5EA210C8C09EF20DB95EC584714A89F # and yet another
mysql-test/suite/innodb/r/innodb-page_encryption.result
View file @
c91e3260
...
@@ -4,6 +4,8 @@ create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
...
@@ -4,6 +4,8 @@ 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 page_encryption=1 page_encryption_key=1;
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact page_encryption=1 page_encryption_key=1;
create table innodb_compressed(c1 bigint not null, b char(200)) engine=innodb row_format=compressed page_encryption=1 page_encryption_key=2;
create table innodb_compressed(c1 bigint not null, b char(200)) engine=innodb row_format=compressed page_encryption=1 page_encryption_key=2;
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic page_encryption=1 page_encryption_key=3;
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic page_encryption=1 page_encryption_key=3;
ERROR HY000: Can't create table `test`.`innodb_dynamic` (errno: 140 "Wrong create options")
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic page_encryption=1 page_encryption_key=33;
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant page_encryption=1 page_encryption_key=4;
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant page_encryption=1 page_encryption_key=4;
SET GLOBAL innodb_default_page_encryption_key = 5;
SET GLOBAL innodb_default_page_encryption_key = 5;
create table innodb_defkey(c1 bigint not null, b char(200)) engine=innodb page_encryption=1;
create table innodb_defkey(c1 bigint not null, b char(200)) engine=innodb page_encryption=1;
...
@@ -30,7 +32,7 @@ Table Create Table
...
@@ -30,7 +32,7 @@ Table Create Table
innodb_dynamic CREATE TABLE `innodb_dynamic` (
innodb_dynamic CREATE TABLE `innodb_dynamic` (
`c1` bigint(20) NOT NULL,
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC `page_encryption`=1 `page_encryption_key`=3
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC `page_encryption`=1 `page_encryption_key`=3
3
show create table innodb_redundant;
show create table innodb_redundant;
Table Create Table
Table Create Table
innodb_redundant CREATE TABLE `innodb_redundant` (
innodb_redundant CREATE TABLE `innodb_redundant` (
...
...
mysql-test/suite/innodb/r/innodb-page_encryption_log_encryption.result
View file @
c91e3260
...
@@ -6,7 +6,7 @@ SET GLOBAL innodb_file_per_table = ON;
...
@@ -6,7 +6,7 @@ SET GLOBAL innodb_file_per_table = ON;
create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
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 page_encryption=1 page_encryption_key=1;
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact page_encryption=1 page_encryption_key=1;
create table innodb_compressed(c1 bigint not null, b char(200)) engine=innodb row_format=compressed page_encryption=1 page_encryption_key=2;
create table innodb_compressed(c1 bigint not null, b char(200)) engine=innodb row_format=compressed page_encryption=1 page_encryption_key=2;
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic page_encryption=1 page_encryption_key=3;
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic page_encryption=1 page_encryption_key=3
3
;
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant page_encryption=1 page_encryption_key=4;
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant page_encryption=1 page_encryption_key=4;
show create table innodb_compact;
show create table innodb_compact;
Table Create Table
Table Create Table
...
@@ -25,7 +25,7 @@ Table Create Table
...
@@ -25,7 +25,7 @@ Table Create Table
innodb_dynamic CREATE TABLE `innodb_dynamic` (
innodb_dynamic CREATE TABLE `innodb_dynamic` (
`c1` bigint(20) NOT NULL,
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC `page_encryption`=1 `page_encryption_key`=3
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC `page_encryption`=1 `page_encryption_key`=3
3
show create table innodb_redundant;
show create table innodb_redundant;
Table Create Table
Table Create Table
innodb_redundant CREATE TABLE `innodb_redundant` (
innodb_redundant CREATE TABLE `innodb_redundant` (
...
...
mysql-test/suite/innodb/t/innodb-page_encryption.test
View file @
c91e3260
...
@@ -13,7 +13,9 @@ SET GLOBAL innodb_file_per_table = ON;
...
@@ -13,7 +13,9 @@ SET GLOBAL innodb_file_per_table = ON;
create
table
innodb_normal
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
;
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
page_encryption
=
1
page_encryption_key
=
1
;
create
table
innodb_compact
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
row_format
=
compact
page_encryption
=
1
page_encryption_key
=
1
;
create
table
innodb_compressed
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
row_format
=
compressed
page_encryption
=
1
page_encryption_key
=
2
;
create
table
innodb_compressed
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
row_format
=
compressed
page_encryption
=
1
page_encryption_key
=
2
;
--
error
ER_CANT_CREATE_TABLE
create
table
innodb_dynamic
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
row_format
=
dynamic
page_encryption
=
1
page_encryption_key
=
3
;
create
table
innodb_dynamic
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
row_format
=
dynamic
page_encryption
=
1
page_encryption_key
=
3
;
create
table
innodb_dynamic
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
row_format
=
dynamic
page_encryption
=
1
page_encryption_key
=
33
;
create
table
innodb_redundant
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
row_format
=
redundant
page_encryption
=
1
page_encryption_key
=
4
;
create
table
innodb_redundant
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
row_format
=
redundant
page_encryption
=
1
page_encryption_key
=
4
;
SET
GLOBAL
innodb_default_page_encryption_key
=
5
;
SET
GLOBAL
innodb_default_page_encryption_key
=
5
;
...
...
mysql-test/suite/innodb/t/innodb-page_encryption_log_encryption.test
View file @
c91e3260
...
@@ -16,7 +16,7 @@ SET GLOBAL innodb_file_per_table = ON;
...
@@ -16,7 +16,7 @@ SET GLOBAL innodb_file_per_table = ON;
create
table
innodb_normal
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
;
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
page_encryption
=
1
page_encryption_key
=
1
;
create
table
innodb_compact
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
row_format
=
compact
page_encryption
=
1
page_encryption_key
=
1
;
create
table
innodb_compressed
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
row_format
=
compressed
page_encryption
=
1
page_encryption_key
=
2
;
create
table
innodb_compressed
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
row_format
=
compressed
page_encryption
=
1
page_encryption_key
=
2
;
create
table
innodb_dynamic
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
row_format
=
dynamic
page_encryption
=
1
page_encryption_key
=
3
;
create
table
innodb_dynamic
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
row_format
=
dynamic
page_encryption
=
1
page_encryption_key
=
3
3
;
create
table
innodb_redundant
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
row_format
=
redundant
page_encryption
=
1
page_encryption_key
=
4
;
create
table
innodb_redundant
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
row_format
=
redundant
page_encryption
=
1
page_encryption_key
=
4
;
show
create
table
innodb_compact
;
show
create
table
innodb_compact
;
...
...
mysql-test/suite/plugins/r/filekeys_encfile.result
0 → 100644
View file @
c91e3260
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=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
insert t1 values (12345, repeat('1234567890', 20));
alter table t1 page_encryption_key=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;
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;
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;
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
drop table t1;
mysql-test/suite/plugins/r/filekeys_encfile_bad.result
0 → 100644
View file @
c91e3260
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;
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';
plugin_status
mysql-test/suite/plugins/r/filekeys_encfile_badfile.result
0 → 100644
View file @
c91e3260
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;
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';
plugin_status
mysql-test/suite/plugins/r/filekeys_encfile_file.result
0 → 100644
View file @
c91e3260
create table t1(c1 bigint not null, b char(200)) engine=innodb page_encryption=1 page_encryption_key=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
insert t1 values (12345, repeat('1234567890', 20));
alter table t1 page_encryption_key=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;
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;
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;
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
drop table t1;
mysql-test/suite/plugins/r/filekeys_encfile_no.result
0 → 100644
View file @
c91e3260
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;
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';
plugin_status
mysql-test/suite/plugins/r/filekeys_nofile.result
0 → 100644
View file @
c91e3260
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;
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';
plugin_status
mysql-test/suite/plugins/r/filekeys_syntax.result
0 → 100644
View file @
c91e3260
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;
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';
plugin_status
install soname 'file_key_management';
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;
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';
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;
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';
plugin_status
install soname 'file_key_management';
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;
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';
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;
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';
plugin_status
install soname 'file_key_management';
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;
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';
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;
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';
plugin_status
install soname 'file_key_management';
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;
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';
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;
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';
plugin_status
install soname 'file_key_management';
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;
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';
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;
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';
plugin_status
install soname 'file_key_management';
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;
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';
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;
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';
plugin_status
mysql-test/suite/plugins/r/filekeys_unencfile.result
0 → 100644
View file @
c91e3260
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;
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';
plugin_status
mysql-test/suite/plugins/t/filekeys-data.enc
0 → 100644
View file @
c91e3260
File added
mysql-test/suite/plugins/t/filekeys-data.key
0 → 100644
View file @
c91e3260
secret
\ No newline at end of file
mysql-test/suite/plugins/t/filekeys_badtest.inc
0 → 100644
View file @
c91e3260
--
source
include
/
not_embedded
.
inc
--
source
include
/
have_xtradb
.
inc
--
source
filekeys_plugin
.
inc
--
eval
call
mtr
.
add_suppression
(
"
$SEARCH_PATTERN
"
)
call
mtr
.
add_suppression
(
"Plugin 'file_key_management' init function returned error"
);
call
mtr
.
add_suppression
(
"Plugin 'file_key_management' registration.*failed"
);
--
let
SEARCH_FILE
=
$MYSQLTEST_VARDIR
/
log
/
mysqld
.
1.
err
--
let
SEARCH_RANGE
=
-
10000
--
source
include
/
search_pattern_in_file
.
inc
--
error
ER_CANT_CREATE_TABLE
create
table
t1
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
page_encryption
=
1
page_encryption_key
=
1
;
select
plugin_status
from
information_schema
.
plugins
where
plugin_name
=
'file_key_management'
;
mysql-test/suite/plugins/t/filekeys_encfile.opt
0 → 100644
View file @
c91e3260
--loose-file-key-management-filekey=secret
--loose-file-key-management-filename=$MTR_SUITE_DIR/t/filekeys-data.enc
mysql-test/suite/plugins/t/filekeys_encfile.test
0 → 100644
View file @
c91e3260
source
filekeys_goodtest
.
inc
;
mysql-test/suite/plugins/t/filekeys_encfile_bad.opt
0 → 100644
View file @
c91e3260
--loose-file-key-management-filekey=bad
--loose-file-key-management-filename=$MTR_SUITE_DIR/t/filekeys-data.enc
mysql-test/suite/plugins/t/filekeys_encfile_bad.test
0 → 100644
View file @
c91e3260
let
SEARCH_PATTERN
=
Cannot
decrypt
.*
filekeys
-
data
.
enc
.
Wrong
key
;
source
filekeys_badtest
.
inc
;
mysql-test/suite/plugins/t/filekeys_encfile_badfile.opt
0 → 100644
View file @
c91e3260
--loose-file-key-management-filekey=FILE:bad
--loose-file-key-management-filename=$MTR_SUITE_DIR/t/filekeys-data.enc
mysql-test/suite/plugins/t/filekeys_encfile_badfile.test
0 → 100644
View file @
c91e3260
let
SEARCH_PATTERN
=
File
'bad'
not
found
;
source
filekeys_badtest
.
inc
;
mysql-test/suite/plugins/t/filekeys_encfile_file.opt
0 → 100644
View file @
c91e3260
--loose-file-key-management-filekey=FILE:$MTR_SUITE_DIR/t/filekeys-data.key
--loose-file-key-management-filename=$MTR_SUITE_DIR/t/filekeys-data.enc
mysql-test/suite/plugins/t/filekeys_encfile_file.test
0 → 100644
View file @
c91e3260
source
filekeys_goodtest
.
inc
;
mysql-test/suite/plugins/t/filekeys_encfile_no.opt
0 → 100644
View file @
c91e3260
--loose-file-key-management-filename=$MTR_SUITE_DIR/t/filekeys-data.enc
mysql-test/suite/plugins/t/filekeys_encfile_no.test
0 → 100644
View file @
c91e3260
let
SEARCH_PATTERN
=
Cannot
decrypt
.*
filekeys
-
data
.
enc
.
Wrong
key
;
source
filekeys_badtest
.
inc
;
mysql-test/suite/plugins/t/filekeys_goodtest.inc
0 → 100644
View file @
c91e3260
--
source
include
/
have_xtradb
.
inc
--
source
filekeys_plugin
.
inc
create
table
t1
(
c1
bigint
not
null
,
b
char
(
200
))
engine
=
innodb
page_encryption
=
1
page_encryption_key
=
1
;
show
create
table
t1
;
insert
t1
values
(
12345
,
repeat
(
'1234567890'
,
20
));
alter
table
t1
page_encryption_key
=
2
;
show
create
table
t1
;
--
replace_regex
/
#sql-[0-9a-f_]*/#sql-temporary/
--
error
ER_CANT_CREATE_TABLE
alter
table
t1
page_encryption_key
=
3
;
show
create
table
t1
;
alter
table
t1
page_encryption_key
=
33
;
show
create
table
t1
;
alter
table
t1
page_encryption_key
=
4
;
show
create
table
t1
;
drop
table
t1
;
mysql-test/suite/plugins/t/filekeys_nofile.test
0 → 100644
View file @
c91e3260
let
SEARCH_PATTERN
=
File
''
not
found
;
source
filekeys_badtest
.
inc
;
mysql-test/suite/plugins/t/filekeys_plugin.inc
0 → 100644
View file @
c91e3260
if
(
!
$FILE_KEY_MANAGEMENT_SO
)
{
--
skip
Needs
file_key_management
}
mysql-test/suite/plugins/t/filekeys_plugin.opt
0 → 100644
View file @
c91e3260
--plugin-load-add=$FILE_KEY_MANAGEMENT_SO
--encryption-algorithm=aes_cbc
mysql-test/suite/plugins/t/filekeys_syntax.opt
0 → 100644
View file @
c91e3260
--loose-file-key-management-filename=$MYSQL_TMP_DIR/keys.txt
mysql-test/suite/plugins/t/filekeys_syntax.test
0 → 100644
View file @
c91e3260
#
# first test - missing key file
#
let
SEARCH_PATTERN
=
File
'.*keys.txt'
not
found
;
source
filekeys_badtest
.
inc
;
#
# key id= 0
#
write_file
$MYSQL_TMP_DIR
/
keys
.
txt
;
1
;
11111111111111111111111111111111
0
;
00000000000000000000000000000000
2
;
22222222222222222222222222222222
EOF
--
replace_result
$MYSQL_TMP_DIR
MYSQL_TMP_DIR
--
error
2
install
soname
'file_key_management'
;
source
filekeys_badtest
.
inc
;
let
SEARCH_PATTERN
=
Invalid
key
id
;
source
filekeys_badtest
.
inc
;
#
# id too big
#
remove_file
$MYSQL_TMP_DIR
/
keys
.
txt
;
write_file
$MYSQL_TMP_DIR
/
keys
.
txt
;
1
;
11111111111111111111111111111111
4294967299
;
00000000000000000000000000000000
2
;
22222222222222222222222222222222
EOF
--
replace_result
$MYSQL_TMP_DIR
MYSQL_TMP_DIR
--
error
2
install
soname
'file_key_management'
;
source
filekeys_badtest
.
inc
;
let
SEARCH_PATTERN
=
Invalid
key
id
;
source
filekeys_badtest
.
inc
;
#
# wrong key length (not 16, 24, 23 bytes)
#
remove_file
$MYSQL_TMP_DIR
/
keys
.
txt
;
write_file
$MYSQL_TMP_DIR
/
keys
.
txt
;
1
;
11111111111111111111111111111111
3
;
00000000000000000000000000000000111122223333
2
;
22222222222222222222222222222222
EOF
--
replace_result
$MYSQL_TMP_DIR
MYSQL_TMP_DIR
--
error
2
install
soname
'file_key_management'
;
source
filekeys_badtest
.
inc
;
let
SEARCH_PATTERN
=
Invalid
key
;
source
filekeys_badtest
.
inc
;
#
# wrong key length (not an even number of digits)
#
remove_file
$MYSQL_TMP_DIR
/
keys
.
txt
;
write_file
$MYSQL_TMP_DIR
/
keys
.
txt
;
1
;
11111111111111111111111111111111
3
;
0000000000000000000000000000000
2
;
22222222222222222222222222222222
EOF
--
replace_result
$MYSQL_TMP_DIR
MYSQL_TMP_DIR
--
error
2
install
soname
'file_key_management'
;
source
filekeys_badtest
.
inc
;
let
SEARCH_PATTERN
=
Invalid
key
;
source
filekeys_badtest
.
inc
;
#
# no semicolon
#
remove_file
$MYSQL_TMP_DIR
/
keys
.
txt
;
write_file
$MYSQL_TMP_DIR
/
keys
.
txt
;
1
;
11111111111111111111111111111111
3
:
0000000000000000000000000000000
2
;
22222222222222222222222222222222
EOF
--
replace_result
$MYSQL_TMP_DIR
MYSQL_TMP_DIR
--
error
2
install
soname
'file_key_management'
;
source
filekeys_badtest
.
inc
;
let
SEARCH_PATTERN
=
Syntax
error
;
source
filekeys_badtest
.
inc
;
#
# another syntax error
#
remove_file
$MYSQL_TMP_DIR
/
keys
.
txt
;
write_file
$MYSQL_TMP_DIR
/
keys
.
txt
;
1
;
11111111111111111111111111111111
syntax
error
2
;
22222222222222222222222222222222
EOF
--
replace_result
$MYSQL_TMP_DIR
MYSQL_TMP_DIR
--
error
2
install
soname
'file_key_management'
;
source
filekeys_badtest
.
inc
;
let
SEARCH_PATTERN
=
Syntax
error
;
source
filekeys_badtest
.
inc
;
mysql-test/suite/plugins/t/filekeys_unencfile.opt
0 → 100644
View file @
c91e3260
--loose-file-key-management-filekey=bad
--loose-file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys.txt
mysql-test/suite/plugins/t/filekeys_unencfile.test
0 → 100644
View file @
c91e3260
let
SEARCH_PATTERN
=
Cannot
decrypt
.*
keys
.
txt
.
Not
encrypted
;
source
filekeys_badtest
.
inc
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment