Debian Codegraph @

mysql-test/suite/encryption/r/innodb-remove-encryption.result

raw
1 set global innodb_file_per_table=OFF;
2 Warnings:
3 Warning 1287 '@@innodb_file_per_table' is deprecated and will be removed in a future release
4 call mtr.add_suppression("(mysqld|mariadbd).*: file-key-management-filename is not set");
5 call mtr.add_suppression("Plugin 'file_key_management' init function returned error.");
6 call mtr.add_suppression("Plugin 'file_key_management' registration as a ENCRYPTION failed.");
7 flush tables;
8 create table t1(a int not null primary key, b char(200)) engine=innodb;
9
10 # Restart server with encryption
11 # restart: --plugin-load-add=file_key_management --loose-file-key-management --loose-file-key-management-filename=MYSQL_TEST_DIR/std_data/keys.txt --file-key-management-encryption-algorithm=aes_cbc --innodb-encrypt-tables=ON --innodb-encryption-threads=4 --innodb-tablespaces-encryption --innodb-encryption-rotate-key-age=15
12 # Wait until encryption threads have encrypted all tablespaces
13 SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
14 NAME
15 SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
16 NAME
17 innodb_system
18 mysql/innodb_index_stats
19 mysql/innodb_table_stats
20 mysql/transaction_registry
21 # Success!
22 SELECT * from t1;
23 a b
24 # Now turn off encryption and wait for threads to decrypt all tablespaces
25 SET GLOBAL innodb_encrypt_tables = off;
26 SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
27 NAME
28 innodb_system
29 mysql/innodb_index_stats
30 mysql/innodb_table_stats
31 mysql/transaction_registry
32 SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
33 NAME
34 # Success!
35
36 # Restart server with no encryption setup, there should be no crashes
37 # restart: --skip-file-key-management --innodb-encrypt-tables=OFF --innodb-encryption-threads=0 --innodb-tablespaces-encryption
38 SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
39 NAME
40 innodb_system
41 mysql/innodb_index_stats
42 mysql/innodb_table_stats
43 mysql/transaction_registry
44 SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
45 NAME
46 SELECT * from t1;
47 a b
48 DROP TABLE t1;