summaryrefslogtreecommitdiff
path: root/mysql-test/suite/encryption/r/innodb_encryption.result
blob: 283c78e33d3a0716899fa7a60e4593464f23c341 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
SET @start_global_value = @@global.innodb_encryption_threads;
SHOW VARIABLES LIKE 'innodb_encrypt%';
Variable_name	Value
innodb_encrypt_log	ON
innodb_encrypt_tables	ON
innodb_encryption_rotate_key_age	15
innodb_encryption_rotation_iops	100
innodb_encryption_threads	4
DESCRIBE INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION;
Field	Type	Null	Key	Default	Extra
SPACE	int(11) unsigned	NO		0	
NAME	varchar(655)	YES		NULL	
ENCRYPTION_SCHEME	int(11) unsigned	NO		0	
KEYSERVER_REQUESTS	int(11) unsigned	NO		0	
MIN_KEY_VERSION	int(11) unsigned	NO		0	
CURRENT_KEY_VERSION	int(11) unsigned	NO		0	
KEY_ROTATION_PAGE_NUMBER	bigint(21) unsigned	YES		NULL	
KEY_ROTATION_MAX_PAGE_NUMBER	bigint(21) unsigned	YES		NULL	
# Wait max 5 min for key encryption threads to encrypt one space
# Success!
# Wait max 10 min for key encryption threads to encrypt all space
# Success!
# Now turn off encryption and wait for threads to decrypt everything
SET GLOBAL innodb_encrypt_tables = off;
# Wait max 10 min for key encryption threads to decrypt all space
# Success!
# Shutdown innodb_encryption_threads
SET GLOBAL innodb_encryption_threads=0;
# Turn on encryption
# since threads are off tables should remain unencrypted
SET GLOBAL innodb_encrypt_tables = on;
# Wait 15s to check that nothing gets encrypted
# Success!
# Startup innodb_encryption_threads
SET GLOBAL innodb_encryption_threads=@start_global_value;
# Wait 1 min to check that it start encrypting again
# Success!
#
# Check that restart with encryption turned off works
# even if spaces are encrypted
#
# First wait max 10 min for key encryption threads to encrypt all spaces
# Success!
# Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0
SHOW VARIABLES LIKE 'innodb_encrypt%';
Variable_name	Value
innodb_encrypt_log	ON
innodb_encrypt_tables	OFF
innodb_encryption_rotate_key_age	15
innodb_encryption_rotation_iops	100
innodb_encryption_threads	0
SELECT COUNT(*) > 0 as should_be_1
FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION
WHERE MIN_KEY_VERSION <> 0;
should_be_1
1
# Restart mysqld again...with default options