| 1 |
create table t1(f1 int not null)engine=innodb; |
| 2 |
create table t2(f1 int not null)engine=innodb; |
| 3 |
insert into t1 select * from seq_1_to_100; |
| 4 |
insert into t2 select * from seq_1_to_100; |
| 5 |
# restart: --innodb_encrypt_tables=0 --innodb_encryption_threads=1 --innodb_encryption_rotate_key_age=9 |
| 6 |
# Enable encryption |
| 7 |
set global innodb_encrypt_tables=ON; |
| 8 |
# Create a new table and it is added to rotation list |
| 9 |
create table t3(f1 int not null)engine=innodb; |
| 10 |
insert into t3 select * from seq_1_to_100; |
| 11 |
# Increase the version and it should set rotation |
| 12 |
# variable for the encryption plugin |
| 13 |
set global debug_key_management_version=10; |
| 14 |
select @@debug_key_management_version; |
| 15 |
@@debug_key_management_version |
| 16 |
10 |
| 17 |
# Decrease the key version and Disable the encryption |
| 18 |
set global debug_key_management_version=1; |
| 19 |
set global innodb_encrypt_tables=off; |
| 20 |
DROP TABLE t1, t2, t3; |