Debian Codegraph @

mysql-test/suite/encryption/r/innodb_page_encryption_key_change.result

raw
1 # restart: --loose-file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt
2 create table innodb_normal(c1 bigint not null, b char(200)) engine=innodb;
3 show warnings;
4 Level Code Message
5 create table innodb_compact(c1 bigint not null, b char(200)) engine=innodb row_format=compact encrypted=yes encryption_key_id=2;
6 show warnings;
7 Level Code Message
8 create table innodb_compressed(c1 bigint not null, b char(200)) engine=innodb row_format=compressed encrypted=yes encryption_key_id=3;
9 show warnings;
10 Level Code Message
11 create table innodb_dynamic(c1 bigint not null, b char(200)) engine=innodb row_format=dynamic encrypted=yes encryption_key_id=4;
12 show warnings;
13 Level Code Message
14 create table innodb_redundant(c1 bigint not null, b char(200)) engine=innodb row_format=redundant encrypted=yes encryption_key_id=5;
15 show warnings;
16 Level Code Message
17 insert into innodb_normal values (1,'test1'),(2,'foo'),(3,'bar'),(4,'mariadb');
18 insert into innodb_compact select * from innodb_normal;
19 insert into innodb_compressed select * from innodb_normal;
20 insert into innodb_dynamic select * from innodb_normal;
21 insert into innodb_redundant select * from innodb_normal;
22 SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
23 variable_value >= 0
24 1
25 SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
26 variable_value >= 0
27 1
28 alter table innodb_compact engine=innodb encryption_key_id = 6;
29 alter table innodb_compressed engine=innodb encryption_key_id = 6;
30 alter table innodb_dynamic engine=innodb encryption_key_id = 6;
31 alter table innodb_redundant engine=innodb encryption_key_id = 6;
32 select * from innodb_normal;
33 c1 b
34 1 test1
35 2 foo
36 3 bar
37 4 mariadb
38 select * from innodb_compact;
39 c1 b
40 1 test1
41 2 foo
42 3 bar
43 4 mariadb
44 select * from innodb_compressed;
45 c1 b
46 1 test1
47 2 foo
48 3 bar
49 4 mariadb
50 select * from innodb_dynamic;
51 c1 b
52 1 test1
53 2 foo
54 3 bar
55 4 mariadb
56 select * from innodb_redundant;
57 c1 b
58 1 test1
59 2 foo
60 3 bar
61 4 mariadb
62 SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
63 variable_value >= 0
64 1
65 SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
66 variable_value >= 0
67 1
68 # restart: --loose-file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt
69 select * from innodb_normal;
70 c1 b
71 1 test1
72 2 foo
73 3 bar
74 4 mariadb
75 select * from innodb_compact;
76 c1 b
77 1 test1
78 2 foo
79 3 bar
80 4 mariadb
81 select * from innodb_compressed;
82 c1 b
83 1 test1
84 2 foo
85 3 bar
86 4 mariadb
87 select * from innodb_dynamic;
88 c1 b
89 1 test1
90 2 foo
91 3 bar
92 4 mariadb
93 select * from innodb_redundant;
94 c1 b
95 1 test1
96 2 foo
97 3 bar
98 4 mariadb
99 SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
100 variable_value >= 0
101 1
102 SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
103 variable_value >= 0
104 1
105 alter table innodb_compact engine=innodb encryption_key_id = 2;
106 alter table innodb_compressed engine=innodb encryption_key_id = 3;
107 alter table innodb_dynamic engine=innodb encryption_key_id = 4;
108 alter table innodb_redundant engine=innodb encryption_key_id = 5;
109 select * from innodb_normal;
110 c1 b
111 1 test1
112 2 foo
113 3 bar
114 4 mariadb
115 select * from innodb_compact;
116 c1 b
117 1 test1
118 2 foo
119 3 bar
120 4 mariadb
121 select * from innodb_compressed;
122 c1 b
123 1 test1
124 2 foo
125 3 bar
126 4 mariadb
127 select * from innodb_dynamic;
128 c1 b
129 1 test1
130 2 foo
131 3 bar
132 4 mariadb
133 select * from innodb_redundant;
134 c1 b
135 1 test1
136 2 foo
137 3 bar
138 4 mariadb
139 SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted';
140 variable_value >= 0
141 1
142 SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted';
143 variable_value >= 0
144 1
145 drop table innodb_normal;
146 drop table innodb_compact;
147 drop table innodb_compressed;
148 drop table innodb_dynamic;
149 drop table innodb_redundant;