Debian Codegraph @

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

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