| 1 |
-- source include/have_innodb.inc |
| 2 |
-- source include/have_partition.inc |
| 3 |
-- source include/have_example_key_management_plugin.inc |
| 4 |
|
| 5 |
select @@innodb_encrypt_tables; |
| 6 |
|
| 7 |
create table t1 (a int) engine=innodb encrypted=yes; |
| 8 |
create table t2 (a int) engine=innodb encrypted=default; |
| 9 |
--error ER_CANT_CREATE_TABLE |
| 10 |
create table t3 (a int) engine=innodb encrypted=no; |
| 11 |
|
| 12 |
create table t4 (a int) engine=innodb encrypted=yes partition by hash(a) partitions 2; |
| 13 |
--error ER_CANT_CREATE_TABLE |
| 14 |
create table t5 (a int) engine=innodb encrypted=no partition by hash(a) partitions 2; |
| 15 |
|
| 16 |
set global innodb_encrypt_tables='ON'; |
| 17 |
create table t3 (a int) engine=innodb encrypted=no; |
| 18 |
set global innodb_encrypt_tables='FORCE'; |
| 19 |
|
| 20 |
show create table t1; |
| 21 |
show create table t2; |
| 22 |
show create table t3; |
| 23 |
show create table t4; |
| 24 |
|
| 25 |
--error ER_ILLEGAL_HA_CREATE_OPTION |
| 26 |
alter table t1 encrypted=no; |
| 27 |
alter table t2 encrypted=yes; |
| 28 |
alter table t3 encrypted=default; |
| 29 |
--error ER_ILLEGAL_HA_CREATE_OPTION |
| 30 |
alter table t4 encrypted=no; |
| 31 |
|
| 32 |
show create table t1; |
| 33 |
show create table t2; |
| 34 |
show create table t3; |
| 35 |
|
| 36 |
drop table t1; |
| 37 |
drop table t2; |
| 38 |
drop table t3; |
| 39 |
drop table t4; |