Debian Codegraph @

mysql-test/suite/component_keyring_file/r/table_encrypt_1.result

raw
1 # ----------------------------------------------------------------------
2 # Setup
3 # Creating local configuration file for keyring component: component_keyring_file
4 # Creating manifest file for current MySQL server instance
5 # Re-starting mysql server with manifest file
6 # ----------------------------------------------------------------------
7 SET GLOBAL innodb_file_per_table = 0;
8 SELECT @@innodb_file_per_table;
9 @@innodb_file_per_table
10 0
11 CREATE TABLE t1(c1 INT, c2 char(20)) ENCRYPTION="Y" ENGINE = InnoDB;
12 ERROR HY000: Request to create 'encrypted' table while using an 'unencrypted' tablespace.
13 SHOW WARNINGS;
14 Level Code Message
15 Error 3825 Request to create 'encrypted' table while using an 'unencrypted' tablespace.
16 SET GLOBAL innodb_file_per_table = 1;
17 SELECT @@innodb_file_per_table;
18 @@innodb_file_per_table
19 1
20 CREATE TABLE t1(c int) ENCRYPTION="Y" tablespace innodb_system;
21 ERROR HY000: Request to create 'encrypted' table while using an 'unencrypted' tablespace.
22 SHOW WARNINGS;
23 Level Code Message
24 Error 3825 Request to create 'encrypted' table while using an 'unencrypted' tablespace.
25 CREATE TABLE t1(c int) ENCRYPTION="N" tablespace innodb_system;
26 DROP TABLE t1;
27 CREATE TEMPORARY TABLE t1(c int) ENCRYPTION="Y";
28 ERROR HY000: ENCRYPTION clause is not valid for temporary tablespace.
29 SHOW WARNINGS;
30 Level Code Message
31 Error 3833 ENCRYPTION clause is not valid for temporary tablespace.
32 CREATE TEMPORARY TABLE t1(c int) ENCRYPTION="N";
33 ERROR HY000: ENCRYPTION clause is not valid for temporary tablespace.
34 SHOW WARNINGS;
35 Level Code Message
36 Error 3833 ENCRYPTION clause is not valid for temporary tablespace.
37 CREATE TABLE t1(c int) ENCRYPTION="R" ENGINE = InnoDB;
38 ERROR HY000: Invalid encryption option.
39 CREATE TABLE t1(c1 INT, c2 char(20)) ENCRYPTION="Y" ENGINE = InnoDB;
40 INSERT INTO t1 VALUES(0, "aaaaa");
41 INSERT INTO t1 VALUES(1, "bbbbb");
42 INSERT INTO t1 VALUES(2, "ccccc");
43 INSERT INTO t1 VALUES(3, "ddddd");
44 INSERT INTO t1 VALUES(4, "eeeee");
45 INSERT INTO t1 VALUES(5, "fffff");
46 INSERT INTO t1 VALUES(6, "ggggg");
47 INSERT INTO t1 VALUES(7, "hhhhh");
48 INSERT INTO t1 VALUES(8, "iiiii");
49 INSERT INTO t1 VALUES(9, "jjjjj");
50 # Kill the server
51 SELECT * FROM t1 ORDER BY c1 LIMIT 10;
52 c1 c2
53 0 aaaaa
54 1 bbbbb
55 2 ccccc
56 3 ddddd
57 4 eeeee
58 5 fffff
59 6 ggggg
60 7 hhhhh
61 8 iiiii
62 9 jjjjj
63 ALTER TABLE t1 ENCRYPTION="N", algorithm=inplace;
64 ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot alter encryption attribute by inplace algorithm.. Try ALGORITHM=COPY.
65 ALTER TABLE t1 TABLESPACE=`innodb_system`;
66 ERROR HY000: Request to create 'encrypted' table while using an 'unencrypted' tablespace.
67 ALTER TABLE t1 ENCRYPTION="N", algorithm=copy;
68 SELECT * FROM t1 ORDER BY c1 LIMIT 10;
69 c1 c2
70 0 aaaaa
71 1 bbbbb
72 2 ccccc
73 3 ddddd
74 4 eeeee
75 5 fffff
76 6 ggggg
77 7 hhhhh
78 8 iiiii
79 9 jjjjj
80 DROP TABLE t1;
81 CREATE TABLE t1 (c1 int) ENCRYPTION='N';
82 ALTER TABLE t1 ENCRYPTION='P',algorithm=copy;
83 ERROR HY000: Invalid encryption option.
84 ALTER TABLE t1 ADD KEY k1 (c1) ,algorithm=inplace;
85 ALTER TABLE t1 ENCRYPTION='Y',algorithm=inplace;
86 ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot alter encryption attribute by inplace algorithm.. Try ALGORITHM=COPY.
87 drop table t1;
88 CREATE TABLE t1(c1 INT PRIMARY KEY) COMPRESSION = "ZLIB" ENCRYPTION = "Y" ENGINE = InnoDB;
89 INSERT INTO t1 VALUES(0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
90 SHOW CREATE TABLE t1;
91 Table Create Table
92 t1 CREATE TABLE `t1` (
93 `c1` int NOT NULL,
94 PRIMARY KEY (`c1`)
95 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMPRESSION='ZLIB' ENCRYPTION='Y'
96 FLUSH TABLES t1 WITH READ LOCK;
97 UNLOCK TABLES;
98 SELECT * FROM t1 ORDER BY c1 LIMIT 10;
99 c1
100 0
101 1
102 2
103 3
104 4
105 5
106 6
107 7
108 8
109 9
110 SELECT * FROM t1 ORDER BY c1;
111 c1
112 0
113 1
114 2
115 3
116 4
117 5
118 6
119 7
120 8
121 9
122 DROP TABLE t1;
123 CREATE TABLE t1(c1 int null) ENCRYPTION='Y' ROW_FORMAT=compressed;
124 INSERT INTO t1 VALUES(0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
125 SHOW CREATE TABLE t1;
126 Table Create Table
127 t1 CREATE TABLE `t1` (
128 `c1` int DEFAULT NULL
129 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPRESSED ENCRYPTION='Y'
130 FLUSH TABLES t1 WITH READ LOCK;
131 UNLOCK TABLES;
132 SELECT * FROM t1 ORDER BY c1 LIMIT 10;
133 c1
134 0
135 1
136 2
137 3
138 4
139 5
140 6
141 7
142 8
143 9
144 SELECT * FROM t1 ORDER BY c1;
145 c1
146 0
147 1
148 2
149 3
150 4
151 5
152 6
153 7
154 8
155 9
156 DROP TABLE t1;
157 CREATE TABLE t1(c1 INT PRIMARY KEY, g geometry not null, spatial index(g)) ENCRYPTION = "Y" ENGINE = InnoDB;
158 INSERT INTO t1 VALUES(0, POINT(0, 0));
159 INSERT INTO t1 VALUES(1, POINT(1, 1));
160 INSERT INTO t1 VALUES(2, POINT(2, 2));
161 INSERT INTO t1 VALUES(3, POINT(3, 3));
162 INSERT INTO t1 VALUES(4, POINT(4, 4));
163 INSERT INTO t1 VALUES(5, POINT(5, 5));
164 INSERT INTO t1 VALUES(6, POINT(6, 6));
165 INSERT INTO t1 VALUES(7, POINT(7, 7));
166 INSERT INTO t1 VALUES(8, POINT(8, 8));
167 INSERT INTO t1 VALUES(9, POINT(9, 9));
168 SHOW CREATE TABLE t1;
169 Table Create Table
170 t1 CREATE TABLE `t1` (
171 `c1` int NOT NULL,
172 `g` geometry NOT NULL,
173 PRIMARY KEY (`c1`),
174 SPATIAL KEY `g` (`g`)
175 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ENCRYPTION='Y'
176 FLUSH TABLES t1 WITH READ LOCK;
177 UNLOCK TABLES;
178 SELECT c1, ST_AsText(g) FROM t1 ORDER BY c1 LIMIT 10;
179 c1 ST_AsText(g)
180 0 POINT(0 0)
181 1 POINT(1 1)
182 2 POINT(2 2)
183 3 POINT(3 3)
184 4 POINT(4 4)
185 5 POINT(5 5)
186 6 POINT(6 6)
187 7 POINT(7 7)
188 8 POINT(8 8)
189 9 POINT(9 9)
190 SELECT c1, ST_AsText(g) FROM t1 ORDER BY c1 LIMIT 10;
191 c1 ST_AsText(g)
192 0 POINT(0 0)
193 1 POINT(1 1)
194 2 POINT(2 2)
195 3 POINT(3 3)
196 4 POINT(4 4)
197 5 POINT(5 5)
198 6 POINT(6 6)
199 7 POINT(7 7)
200 8 POINT(8 8)
201 9 POINT(9 9)
202 DROP TABLE t1;
203 SET GLOBAL innodb_file_per_table=OFF;
204 CREATE TABLE t1 (c1 int);
205 ALTER TABLE t1 COMPRESSION='zlib';
206 ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'COMPRESSION'
207 SHOW WARNINGS;
208 Level Code Message
209 Warning 138 InnoDB: Page Compression is not supported for the system tablespace
210 Error 1478 Table storage engine 'InnoDB' does not support the create option 'COMPRESSION'
211 ALTER TABLE t1 ENCRYPTION='Y',ALGORITHM=COPY;
212 ERROR HY000: Request to create 'encrypted' table while using an 'unencrypted' tablespace.
213 SET GLOBAL innodb_file_per_table=1;
214 DROP TABLE t1;
215 # ----------------------------------------------------------------------
216 # Teardown
217 # Removing manifest file for current MySQL server instance
218 # Removing local keyring file for keyring component: component_keyring_file
219 # Removing local configuration file for keyring component: component_keyring_file
220 # Restarting server without the manifest file
221 # ----------------------------------------------------------------------