1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-03 05:41:09 +03:00

rename table attribute ENCRYPTION=ON/OFF to ENCRYPTED=YES/NO

This commit is contained in:
Sergei Golubchik
2015-04-09 17:59:34 +02:00
parent ea764f5f52
commit bc9f118e29
20 changed files with 105 additions and 105 deletions

View File

@@ -1,44 +1,44 @@
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
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 encryption='ON' encryption_key_id=1;
create table innodb_compressed(c1 bigint not null, b char(200)) engine=innodb row_format=compressed encryption='ON' encryption_key_id=2;
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic encryption='ON' encryption_key_id=3;
create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=1;
create table innodb_compressed(c1 bigint not null, b char(200)) engine=innodb row_format=compressed encrypted=yes encryption_key_id=2;
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic encrypted=yes encryption_key_id=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 encryption='ON' encryption_key_id=33;
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant encryption='ON' encryption_key_id=4;
create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic encrypted=yes encryption_key_id=33;
create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant encrypted=yes encryption_key_id=4;
set innodb_default_encryption_key_id = 5;
create table innodb_defkey(c1 bigint not null, b char(200)) engine=innodb encryption='ON';
create table innodb_defkey(c1 bigint not null, b char(200)) engine=innodb encrypted=yes;
show create table innodb_defkey;
Table Create Table
innodb_defkey CREATE TABLE `innodb_defkey` (
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encryption`='ON' `ENCRYPTION_KEY_ID`=5
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encrypted`=yes `ENCRYPTION_KEY_ID`=5
show create table innodb_compact;
Table Create Table
innodb_compact CREATE TABLE `innodb_compact` (
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT `encryption`='ON' `encryption_key_id`=1
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT `encrypted`=yes `encryption_key_id`=1
show create table innodb_compressed;
Table Create Table
innodb_compressed CREATE TABLE `innodb_compressed` (
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED `encryption`='ON' `encryption_key_id`=2
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED `encrypted`=yes `encryption_key_id`=2
show create table innodb_dynamic;
Table Create Table
innodb_dynamic CREATE TABLE `innodb_dynamic` (
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC `encryption`='ON' `encryption_key_id`=33
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC `encrypted`=yes `encryption_key_id`=33
show create table innodb_redundant;
Table Create Table
innodb_redundant CREATE TABLE `innodb_redundant` (
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT `encryption`='ON' `encryption_key_id`=4
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=REDUNDANT `encrypted`=yes `encryption_key_id`=4
create procedure innodb_insert_proc (repeat_count int)
begin
declare current_num int;
@@ -154,28 +154,28 @@ variable_value >= 0
SELECT variable_value >= 0 FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_num_pages_decrypted';
variable_value >= 0
1
alter table innodb_compact engine=innodb encryption=DEFAULT encryption_key_id=DEFAULT;
alter table innodb_compact engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
show create table innodb_compact;
Table Create Table
innodb_compact CREATE TABLE `innodb_compact` (
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT
alter table innodb_compressed engine=innodb encryption=DEFAULT encryption_key_id=DEFAULT;
alter table innodb_compressed engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
show create table innodb_compressed;
Table Create Table
innodb_compressed CREATE TABLE `innodb_compressed` (
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
alter table innodb_dynamic engine=innodb encryption=DEFAULT encryption_key_id=DEFAULT;
alter table innodb_dynamic engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
show create table innodb_dynamic;
Table Create Table
innodb_dynamic CREATE TABLE `innodb_dynamic` (
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
alter table innodb_redundant engine=innodb encryption=DEFAULT encryption_key_id=DEFAULT;
alter table innodb_redundant engine=innodb encrypted=DEFAULT encryption_key_id=DEFAULT;
show create table innodb_redundant;
Table Create Table
innodb_redundant CREATE TABLE `innodb_redundant` (
@@ -213,7 +213,7 @@ Table Create Table
innodb_defkey CREATE TABLE `innodb_defkey` (
`c1` bigint(20) NOT NULL,
`b` char(200) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encryption`='ON' `ENCRYPTION_KEY_ID`=5
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `encrypted`=yes `ENCRYPTION_KEY_ID`=5
update innodb_normal set c1 = c1 +1;
update innodb_compact set c1 = c1 + 1;
update innodb_compressed set c1 = c1 + 1;