summaryrefslogtreecommitdiff
path: root/mysql-test/suite/encryption/r/innodb_lotoftables.result
blob: cf5724b527a5cf1fe5f1cbb9fd748c7461b0e8ae (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
SET GLOBAL innodb_fast_shutdown=0;
SHOW VARIABLES LIKE 'innodb_encrypt%';
Variable_name	Value
innodb_encrypt_log	OFF
innodb_encrypt_tables	OFF
innodb_encryption_rotate_key_age	1
innodb_encryption_rotation_iops	100
innodb_encryption_threads	0
create database innodb_encrypted_1;
use innodb_encrypted_1;
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	3
set autocommit=0;
set autocommit=1;
commit work;
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	3
# should be 100
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE NAME LIKE 'innodb_encrypted%';
COUNT(*)
100
create database innodb_encrypted_2;
use innodb_encrypted_2;
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	3
set autocommit=0;
commit work;
set autocommit=1;
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	3
# should be 100
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%';
COUNT(*)
100
# should be 100
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%';
COUNT(*)
100
create database innodb_encrypted_3;
use innodb_encrypted_3;
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	3
set autocommit=0;
commit work;
set autocommit=1;
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	3
# should be 100
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%';
COUNT(*)
100
# should be 200
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%';
COUNT(*)
200
use test;
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	3
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%';
COUNT(*)
100
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%';
COUNT(*)
200
SET GLOBAL innodb_encrypt_tables = on;
SET GLOBAL innodb_encryption_threads=4;
# Wait until all encrypted tables have been encrypted
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%';
COUNT(*)
200
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%';
COUNT(*)
100
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	3
# Success!
# Restart mysqld --innodb_encrypt_tables=0 --innodb_encryption_threads=0
# Restart Success!
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	303
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	303
use test;
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	303
use innodb_encrypted_1;
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	303
use innodb_encrypted_2;
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	303
use innodb_encrypted_3;
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	303
use innodb_encrypted_1;
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	303
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	303
use innodb_encrypted_2;
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	303
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	303
use innodb_encrypted_3;
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	303
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	303
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%';
COUNT(*)
100
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%';
COUNT(*)
200
SET GLOBAL innodb_encrypt_tables = off;
SET GLOBAL innodb_encryption_threads=4;
# Wait until all default encrypted tables have been decrypted
# should be 100
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 AND NAME LIKE 'innodb_encrypted%';
COUNT(*)
100
# should be 200
SELECT COUNT(*) FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND NAME LIKE 'innodb_encrypted%';
COUNT(*)
200
show status like 'innodb_pages0_read%';
Variable_name	Value
Innodb_pages0_read	303
use test;
drop database innodb_encrypted_1;
drop database innodb_encrypted_2;
drop database innodb_encrypted_3;