Debian Codegraph @

mysql-test/suite/compat/oracle/r/column_compression.result

raw
1 ALTER DATABASE test CHARACTER SET latin1 COLLATE latin1_swedish_ci;
2 SET sql_mode=ORACLE;
3 SET column_compression_zlib_wrap=true;
4 CREATE TABLE t1 (a BLOB COMPRESSED);
5 INSERT INTO t1 VALUES (REPEAT('a',10000));
6 SELECT DATA_LENGTH<100 AS c FROM INFORMATION_SCHEMA.TABLES
7 WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test';
8 c
9 1
10 DROP TABLE t1;
11 #
12 # MDEV-17363 - Compressed columns cannot be restored from dump
13 #
14 CREATE TABLE t1(a INT NOT NULL COMPRESSED);
15 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
16 SHOW WARNINGS;
17 Level Code Message
18 Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
19 CREATE TABLE t1(
20 a JSON COMPRESSED,
21 b VARCHAR(1000) COMPRESSED BINARY,
22 c NVARCHAR(1000) COMPRESSED BINARY,
23 d TINYTEXT COMPRESSED BINARY
24 );
25 SHOW CREATE TABLE t1;
26 Table Create Table
27 t1 CREATE TABLE "t1" (
28 "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid("a")),
29 "b" varchar(1000) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
30 "c" varchar(1000) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_bin DEFAULT NULL,
31 "d" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
32 )
33 DROP TABLE t1;
34 #
35 # VARCHAR and TEXT variants
36 #
37 #
38 # The following statements run without warnings.
39 # The `compressed opt_binary` grammar sequence is covered.
40 #
41 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED);
42 SHOW CREATE TABLE t1;
43 Table Create Table
44 t1 CREATE TABLE "t1" (
45 "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL
46 )
47 DROP TABLE t1;
48 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY);
49 SHOW CREATE TABLE t1;
50 Table Create Table
51 t1 CREATE TABLE "t1" (
52 "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
53 )
54 DROP TABLE t1;
55 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY ASCII);
56 SHOW CREATE TABLE t1;
57 Table Create Table
58 t1 CREATE TABLE "t1" (
59 "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
60 )
61 DROP TABLE t1;
62 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BYTE);
63 SHOW CREATE TABLE t1;
64 Table Create Table
65 t1 CREATE TABLE "t1" (
66 "a" varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT NULL
67 )
68 DROP TABLE t1;
69 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED ASCII);
70 SHOW CREATE TABLE t1;
71 Table Create Table
72 t1 CREATE TABLE "t1" (
73 "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL
74 )
75 DROP TABLE t1;
76 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED UNICODE);
77 SHOW CREATE TABLE t1;
78 Table Create Table
79 t1 CREATE TABLE "t1" (
80 "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_uca1400_ai_ci DEFAULT NULL
81 )
82 DROP TABLE t1;
83 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8);
84 SHOW CREATE TABLE t1;
85 Table Create Table
86 t1 CREATE TABLE "t1" (
87 "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci DEFAULT NULL
88 )
89 DROP TABLE t1;
90 #
91 # The following statements run without warnings.
92 # They have extra column attributes (or GENERATED) after COMPRESSED.
93 #
94 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BYTE DEFAULT '');
95 SHOW CREATE TABLE t1;
96 Table Create Table
97 t1 CREATE TABLE "t1" (
98 "a" varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT ''
99 )
100 DROP TABLE t1;
101 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY DEFAULT '');
102 SHOW CREATE TABLE t1;
103 Table Create Table
104 t1 CREATE TABLE "t1" (
105 "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT ''
106 )
107 DROP TABLE t1;
108 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED ASCII DEFAULT '');
109 SHOW CREATE TABLE t1;
110 Table Create Table
111 t1 CREATE TABLE "t1" (
112 "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT ''
113 )
114 DROP TABLE t1;
115 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8 DEFAULT '');
116 SHOW CREATE TABLE t1;
117 Table Create Table
118 t1 CREATE TABLE "t1" (
119 "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci DEFAULT ''
120 )
121 DROP TABLE t1;
122 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100)));
123 SHOW CREATE TABLE t1;
124 Table Create Table
125 t1 CREATE TABLE "t1" (
126 "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL
127 )
128 DROP TABLE t1;
129 #
130 # The following statements fail by the grammar since 11.5
131 #
132 CREATE TABLE t1 (a VARCHAR(10) BINARY COMPRESSED);
133 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
134 CREATE TABLE t1 (a VARCHAR(10) ASCII COMPRESSED);
135 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
136 CREATE TABLE t1 (a VARCHAR(10) BYTE COMPRESSED);
137 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
138 #
139 # The following statements fail by the grammar,
140 # because COMPRESSED immediately follows 'field_type'.
141 #
142 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BYTE COMPRESSED);
143 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
144 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY COMPRESSED);
145 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
146 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED ASCII COMPRESSED);
147 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
148 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8 COMPRESSED);
149 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
150 #
151 # The following statements are not prohibited by the *.yy grammar,
152 # because the sequence `field_type attribute COMPRESSED` is allowed
153 # (notice there is at least one attribute after `field_type`).
154 # The first COMPRESSED is parsed inside `field_type`.
155 # The second COMPRESSED passes through the parser but then is caught
156 # inside Column_definition::set_compressed_deprecated_with_type_check()
157 # and a syntax error is raised.
158 #
159 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BYTE DEFAULT '' COMPRESSED);
160 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
161 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY DEFAULT '' COMPRESSED);
162 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
163 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED ASCII DEFAULT '' COMPRESSED);
164 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
165 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8 DEFAULT '' COMPRESSED);
166 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
167 #
168 # The following statements run without warnings.
169 # The `compressed opt_binary` grammar sequence is covered.
170 #
171 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED);
172 SHOW CREATE TABLE t1;
173 Table Create Table
174 t1 CREATE TABLE "t1" (
175 "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL
176 )
177 DROP TABLE t1;
178 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BINARY);
179 SHOW CREATE TABLE t1;
180 Table Create Table
181 t1 CREATE TABLE "t1" (
182 "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
183 )
184 DROP TABLE t1;
185 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BINARY ASCII);
186 SHOW CREATE TABLE t1;
187 Table Create Table
188 t1 CREATE TABLE "t1" (
189 "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
190 )
191 DROP TABLE t1;
192 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BYTE);
193 SHOW CREATE TABLE t1;
194 Table Create Table
195 t1 CREATE TABLE "t1" (
196 "a" varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT NULL
197 )
198 DROP TABLE t1;
199 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED ASCII);
200 SHOW CREATE TABLE t1;
201 Table Create Table
202 t1 CREATE TABLE "t1" (
203 "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL
204 )
205 DROP TABLE t1;
206 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED UNICODE);
207 SHOW CREATE TABLE t1;
208 Table Create Table
209 t1 CREATE TABLE "t1" (
210 "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_uca1400_ai_ci DEFAULT NULL
211 )
212 DROP TABLE t1;
213 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED CHARACTER SET utf8);
214 SHOW CREATE TABLE t1;
215 Table Create Table
216 t1 CREATE TABLE "t1" (
217 "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci DEFAULT NULL
218 )
219 DROP TABLE t1;
220 #
221 # The following statements run without warnings.
222 # They have extra column attributes (or GENERATED) after COMPRESSED.
223 #
224 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BYTE DEFAULT '');
225 SHOW CREATE TABLE t1;
226 Table Create Table
227 t1 CREATE TABLE "t1" (
228 "a" varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT ''
229 )
230 DROP TABLE t1;
231 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BINARY DEFAULT '');
232 SHOW CREATE TABLE t1;
233 Table Create Table
234 t1 CREATE TABLE "t1" (
235 "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT ''
236 )
237 DROP TABLE t1;
238 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED ASCII DEFAULT '');
239 SHOW CREATE TABLE t1;
240 Table Create Table
241 t1 CREATE TABLE "t1" (
242 "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT ''
243 )
244 DROP TABLE t1;
245 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED CHARACTER SET utf8 DEFAULT '');
246 SHOW CREATE TABLE t1;
247 Table Create Table
248 t1 CREATE TABLE "t1" (
249 "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci DEFAULT ''
250 )
251 DROP TABLE t1;
252 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100)));
253 SHOW CREATE TABLE t1;
254 Table Create Table
255 t1 CREATE TABLE "t1" (
256 "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL
257 )
258 DROP TABLE t1;
259 #
260 # The following statements fail by the grammar since 11.5
261 #
262 CREATE TABLE t1 (a VARCHAR2(10) BINARY COMPRESSED);
263 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
264 CREATE TABLE t1 (a VARCHAR2(10) ASCII COMPRESSED);
265 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
266 CREATE TABLE t1 (a VARCHAR2(10) BYTE COMPRESSED);
267 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
268 #
269 # The following statements fail by the grammar,
270 # because COMPRESSED immediately follows 'field_type'.
271 #
272 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BYTE COMPRESSED);
273 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
274 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BINARY COMPRESSED);
275 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
276 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED ASCII COMPRESSED);
277 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
278 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED CHARACTER SET utf8 COMPRESSED);
279 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
280 #
281 # The following statements are not prohibited by the *.yy grammar,
282 # because the sequence `field_type attribute COMPRESSED` is allowed
283 # (notice there is at least one attribute after `field_type`).
284 # The first COMPRESSED is parsed inside `field_type`.
285 # The second COMPRESSED passes through the parser but then is caught
286 # inside Column_definition::set_compressed_deprecated_with_type_check()
287 # and a syntax error is raised.
288 #
289 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BYTE DEFAULT '' COMPRESSED);
290 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
291 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BINARY DEFAULT '' COMPRESSED);
292 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
293 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED ASCII DEFAULT '' COMPRESSED);
294 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
295 CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED CHARACTER SET utf8 DEFAULT '' COMPRESSED);
296 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
297 #
298 # The following statements run without warnings.
299 # The `compressed opt_binary` grammar sequence is covered.
300 #
301 CREATE TABLE t1 (a TINYTEXT COMPRESSED);
302 SHOW CREATE TABLE t1;
303 Table Create Table
304 t1 CREATE TABLE "t1" (
305 "a" tinytext /*M!100301 COMPRESSED*/ DEFAULT NULL
306 )
307 DROP TABLE t1;
308 CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY);
309 SHOW CREATE TABLE t1;
310 Table Create Table
311 t1 CREATE TABLE "t1" (
312 "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
313 )
314 DROP TABLE t1;
315 CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY ASCII);
316 SHOW CREATE TABLE t1;
317 Table Create Table
318 t1 CREATE TABLE "t1" (
319 "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
320 )
321 DROP TABLE t1;
322 CREATE TABLE t1 (a TINYTEXT COMPRESSED BYTE);
323 SHOW CREATE TABLE t1;
324 Table Create Table
325 t1 CREATE TABLE "t1" (
326 "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL
327 )
328 DROP TABLE t1;
329 CREATE TABLE t1 (a TINYTEXT COMPRESSED ASCII);
330 SHOW CREATE TABLE t1;
331 Table Create Table
332 t1 CREATE TABLE "t1" (
333 "a" tinytext /*M!100301 COMPRESSED*/ DEFAULT NULL
334 )
335 DROP TABLE t1;
336 CREATE TABLE t1 (a TINYTEXT COMPRESSED UNICODE);
337 SHOW CREATE TABLE t1;
338 Table Create Table
339 t1 CREATE TABLE "t1" (
340 "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_uca1400_ai_ci DEFAULT NULL
341 )
342 DROP TABLE t1;
343 CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8);
344 SHOW CREATE TABLE t1;
345 Table Create Table
346 t1 CREATE TABLE "t1" (
347 "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci DEFAULT NULL
348 )
349 DROP TABLE t1;
350 #
351 # The following statements run without warnings.
352 # They have extra column attributes (or GENERATED) after COMPRESSED.
353 #
354 CREATE TABLE t1 (a TINYTEXT COMPRESSED BYTE DEFAULT '');
355 SHOW CREATE TABLE t1;
356 Table Create Table
357 t1 CREATE TABLE "t1" (
358 "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT ''
359 )
360 DROP TABLE t1;
361 CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY DEFAULT '');
362 SHOW CREATE TABLE t1;
363 Table Create Table
364 t1 CREATE TABLE "t1" (
365 "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT ''
366 )
367 DROP TABLE t1;
368 CREATE TABLE t1 (a TINYTEXT COMPRESSED ASCII DEFAULT '');
369 SHOW CREATE TABLE t1;
370 Table Create Table
371 t1 CREATE TABLE "t1" (
372 "a" tinytext /*M!100301 COMPRESSED*/ DEFAULT ''
373 )
374 DROP TABLE t1;
375 CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8 DEFAULT '');
376 SHOW CREATE TABLE t1;
377 Table Create Table
378 t1 CREATE TABLE "t1" (
379 "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci DEFAULT ''
380 )
381 DROP TABLE t1;
382 CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100)));
383 SHOW CREATE TABLE t1;
384 Table Create Table
385 t1 CREATE TABLE "t1" (
386 "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL
387 )
388 DROP TABLE t1;
389 #
390 # The following statements fail by the grammar since 11.5
391 #
392 CREATE TABLE t1 (a TINYTEXT BINARY COMPRESSED);
393 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
394 CREATE TABLE t1 (a TINYTEXT ASCII COMPRESSED);
395 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
396 CREATE TABLE t1 (a TINYTEXT BYTE COMPRESSED);
397 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
398 #
399 # The following statements fail by the grammar,
400 # because COMPRESSED immediately follows 'field_type'.
401 #
402 CREATE TABLE t1 (a TINYTEXT COMPRESSED BYTE COMPRESSED);
403 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
404 CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY COMPRESSED);
405 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
406 CREATE TABLE t1 (a TINYTEXT COMPRESSED ASCII COMPRESSED);
407 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
408 CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8 COMPRESSED);
409 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
410 #
411 # The following statements are not prohibited by the *.yy grammar,
412 # because the sequence `field_type attribute COMPRESSED` is allowed
413 # (notice there is at least one attribute after `field_type`).
414 # The first COMPRESSED is parsed inside `field_type`.
415 # The second COMPRESSED passes through the parser but then is caught
416 # inside Column_definition::set_compressed_deprecated_with_type_check()
417 # and a syntax error is raised.
418 #
419 CREATE TABLE t1 (a TINYTEXT COMPRESSED BYTE DEFAULT '' COMPRESSED);
420 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
421 CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY DEFAULT '' COMPRESSED);
422 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
423 CREATE TABLE t1 (a TINYTEXT COMPRESSED ASCII DEFAULT '' COMPRESSED);
424 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
425 CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8 DEFAULT '' COMPRESSED);
426 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
427 #
428 # The following statements run without warnings.
429 # The `compressed opt_binary` grammar sequence is covered.
430 #
431 CREATE TABLE t1 (a TEXT COMPRESSED);
432 SHOW CREATE TABLE t1;
433 Table Create Table
434 t1 CREATE TABLE "t1" (
435 "a" text /*M!100301 COMPRESSED*/ DEFAULT NULL
436 )
437 DROP TABLE t1;
438 CREATE TABLE t1 (a TEXT COMPRESSED BINARY);
439 SHOW CREATE TABLE t1;
440 Table Create Table
441 t1 CREATE TABLE "t1" (
442 "a" text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
443 )
444 DROP TABLE t1;
445 CREATE TABLE t1 (a TEXT COMPRESSED BINARY ASCII);
446 SHOW CREATE TABLE t1;
447 Table Create Table
448 t1 CREATE TABLE "t1" (
449 "a" text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
450 )
451 DROP TABLE t1;
452 CREATE TABLE t1 (a TEXT COMPRESSED BYTE);
453 SHOW CREATE TABLE t1;
454 Table Create Table
455 t1 CREATE TABLE "t1" (
456 "a" blob(65535) /*M!100301 COMPRESSED*/ DEFAULT NULL
457 )
458 DROP TABLE t1;
459 CREATE TABLE t1 (a TEXT COMPRESSED ASCII);
460 SHOW CREATE TABLE t1;
461 Table Create Table
462 t1 CREATE TABLE "t1" (
463 "a" text /*M!100301 COMPRESSED*/ DEFAULT NULL
464 )
465 DROP TABLE t1;
466 CREATE TABLE t1 (a TEXT COMPRESSED UNICODE);
467 SHOW CREATE TABLE t1;
468 Table Create Table
469 t1 CREATE TABLE "t1" (
470 "a" text /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_uca1400_ai_ci DEFAULT NULL
471 )
472 DROP TABLE t1;
473 CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8);
474 SHOW CREATE TABLE t1;
475 Table Create Table
476 t1 CREATE TABLE "t1" (
477 "a" text /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci DEFAULT NULL
478 )
479 DROP TABLE t1;
480 #
481 # The following statements run without warnings.
482 # They have extra column attributes (or GENERATED) after COMPRESSED.
483 #
484 CREATE TABLE t1 (a TEXT COMPRESSED BYTE DEFAULT '');
485 SHOW CREATE TABLE t1;
486 Table Create Table
487 t1 CREATE TABLE "t1" (
488 "a" blob(65535) /*M!100301 COMPRESSED*/ DEFAULT ''
489 )
490 DROP TABLE t1;
491 CREATE TABLE t1 (a TEXT COMPRESSED BINARY DEFAULT '');
492 SHOW CREATE TABLE t1;
493 Table Create Table
494 t1 CREATE TABLE "t1" (
495 "a" text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT ''
496 )
497 DROP TABLE t1;
498 CREATE TABLE t1 (a TEXT COMPRESSED ASCII DEFAULT '');
499 SHOW CREATE TABLE t1;
500 Table Create Table
501 t1 CREATE TABLE "t1" (
502 "a" text /*M!100301 COMPRESSED*/ DEFAULT ''
503 )
504 DROP TABLE t1;
505 CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8 DEFAULT '');
506 SHOW CREATE TABLE t1;
507 Table Create Table
508 t1 CREATE TABLE "t1" (
509 "a" text /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci DEFAULT ''
510 )
511 DROP TABLE t1;
512 CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100)));
513 SHOW CREATE TABLE t1;
514 Table Create Table
515 t1 CREATE TABLE "t1" (
516 "a" text /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL
517 )
518 DROP TABLE t1;
519 #
520 # The following statements fail by the grammar since 11.5
521 #
522 CREATE TABLE t1 (a TEXT BINARY COMPRESSED);
523 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
524 CREATE TABLE t1 (a TEXT ASCII COMPRESSED);
525 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
526 CREATE TABLE t1 (a TEXT BYTE COMPRESSED);
527 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
528 #
529 # The following statements fail by the grammar,
530 # because COMPRESSED immediately follows 'field_type'.
531 #
532 CREATE TABLE t1 (a TEXT COMPRESSED BYTE COMPRESSED);
533 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
534 CREATE TABLE t1 (a TEXT COMPRESSED BINARY COMPRESSED);
535 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
536 CREATE TABLE t1 (a TEXT COMPRESSED ASCII COMPRESSED);
537 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
538 CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8 COMPRESSED);
539 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
540 #
541 # The following statements are not prohibited by the *.yy grammar,
542 # because the sequence `field_type attribute COMPRESSED` is allowed
543 # (notice there is at least one attribute after `field_type`).
544 # The first COMPRESSED is parsed inside `field_type`.
545 # The second COMPRESSED passes through the parser but then is caught
546 # inside Column_definition::set_compressed_deprecated_with_type_check()
547 # and a syntax error is raised.
548 #
549 CREATE TABLE t1 (a TEXT COMPRESSED BYTE DEFAULT '' COMPRESSED);
550 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
551 CREATE TABLE t1 (a TEXT COMPRESSED BINARY DEFAULT '' COMPRESSED);
552 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
553 CREATE TABLE t1 (a TEXT COMPRESSED ASCII DEFAULT '' COMPRESSED);
554 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
555 CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8 DEFAULT '' COMPRESSED);
556 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
557 #
558 # The following statements run without warnings.
559 # The `compressed opt_binary` grammar sequence is covered.
560 #
561 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED);
562 SHOW CREATE TABLE t1;
563 Table Create Table
564 t1 CREATE TABLE "t1" (
565 "a" mediumtext /*M!100301 COMPRESSED*/ DEFAULT NULL
566 )
567 DROP TABLE t1;
568 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY);
569 SHOW CREATE TABLE t1;
570 Table Create Table
571 t1 CREATE TABLE "t1" (
572 "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
573 )
574 DROP TABLE t1;
575 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY ASCII);
576 SHOW CREATE TABLE t1;
577 Table Create Table
578 t1 CREATE TABLE "t1" (
579 "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
580 )
581 DROP TABLE t1;
582 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BYTE);
583 SHOW CREATE TABLE t1;
584 Table Create Table
585 t1 CREATE TABLE "t1" (
586 "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL
587 )
588 DROP TABLE t1;
589 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED ASCII);
590 SHOW CREATE TABLE t1;
591 Table Create Table
592 t1 CREATE TABLE "t1" (
593 "a" mediumtext /*M!100301 COMPRESSED*/ DEFAULT NULL
594 )
595 DROP TABLE t1;
596 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED UNICODE);
597 SHOW CREATE TABLE t1;
598 Table Create Table
599 t1 CREATE TABLE "t1" (
600 "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_uca1400_ai_ci DEFAULT NULL
601 )
602 DROP TABLE t1;
603 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8);
604 SHOW CREATE TABLE t1;
605 Table Create Table
606 t1 CREATE TABLE "t1" (
607 "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci DEFAULT NULL
608 )
609 DROP TABLE t1;
610 #
611 # The following statements run without warnings.
612 # They have extra column attributes (or GENERATED) after COMPRESSED.
613 #
614 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BYTE DEFAULT '');
615 SHOW CREATE TABLE t1;
616 Table Create Table
617 t1 CREATE TABLE "t1" (
618 "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT ''
619 )
620 DROP TABLE t1;
621 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY DEFAULT '');
622 SHOW CREATE TABLE t1;
623 Table Create Table
624 t1 CREATE TABLE "t1" (
625 "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT ''
626 )
627 DROP TABLE t1;
628 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED ASCII DEFAULT '');
629 SHOW CREATE TABLE t1;
630 Table Create Table
631 t1 CREATE TABLE "t1" (
632 "a" mediumtext /*M!100301 COMPRESSED*/ DEFAULT ''
633 )
634 DROP TABLE t1;
635 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8 DEFAULT '');
636 SHOW CREATE TABLE t1;
637 Table Create Table
638 t1 CREATE TABLE "t1" (
639 "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci DEFAULT ''
640 )
641 DROP TABLE t1;
642 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100)));
643 SHOW CREATE TABLE t1;
644 Table Create Table
645 t1 CREATE TABLE "t1" (
646 "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL
647 )
648 DROP TABLE t1;
649 #
650 # The following statements fail by the grammar since 11.5
651 #
652 CREATE TABLE t1 (a MEDIUMTEXT BINARY COMPRESSED);
653 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
654 CREATE TABLE t1 (a MEDIUMTEXT ASCII COMPRESSED);
655 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
656 CREATE TABLE t1 (a MEDIUMTEXT BYTE COMPRESSED);
657 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
658 #
659 # The following statements fail by the grammar,
660 # because COMPRESSED immediately follows 'field_type'.
661 #
662 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BYTE COMPRESSED);
663 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
664 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY COMPRESSED);
665 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
666 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED ASCII COMPRESSED);
667 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
668 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8 COMPRESSED);
669 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
670 #
671 # The following statements are not prohibited by the *.yy grammar,
672 # because the sequence `field_type attribute COMPRESSED` is allowed
673 # (notice there is at least one attribute after `field_type`).
674 # The first COMPRESSED is parsed inside `field_type`.
675 # The second COMPRESSED passes through the parser but then is caught
676 # inside Column_definition::set_compressed_deprecated_with_type_check()
677 # and a syntax error is raised.
678 #
679 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BYTE DEFAULT '' COMPRESSED);
680 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
681 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY DEFAULT '' COMPRESSED);
682 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
683 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED ASCII DEFAULT '' COMPRESSED);
684 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
685 CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8 DEFAULT '' COMPRESSED);
686 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
687 #
688 # The following statements run without warnings.
689 # The `compressed opt_binary` grammar sequence is covered.
690 #
691 CREATE TABLE t1 (a LONGTEXT COMPRESSED);
692 SHOW CREATE TABLE t1;
693 Table Create Table
694 t1 CREATE TABLE "t1" (
695 "a" longtext /*M!100301 COMPRESSED*/ DEFAULT NULL
696 )
697 DROP TABLE t1;
698 CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY);
699 SHOW CREATE TABLE t1;
700 Table Create Table
701 t1 CREATE TABLE "t1" (
702 "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
703 )
704 DROP TABLE t1;
705 CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY ASCII);
706 SHOW CREATE TABLE t1;
707 Table Create Table
708 t1 CREATE TABLE "t1" (
709 "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
710 )
711 DROP TABLE t1;
712 CREATE TABLE t1 (a LONGTEXT COMPRESSED BYTE);
713 SHOW CREATE TABLE t1;
714 Table Create Table
715 t1 CREATE TABLE "t1" (
716 "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL
717 )
718 DROP TABLE t1;
719 CREATE TABLE t1 (a LONGTEXT COMPRESSED ASCII);
720 SHOW CREATE TABLE t1;
721 Table Create Table
722 t1 CREATE TABLE "t1" (
723 "a" longtext /*M!100301 COMPRESSED*/ DEFAULT NULL
724 )
725 DROP TABLE t1;
726 CREATE TABLE t1 (a LONGTEXT COMPRESSED UNICODE);
727 SHOW CREATE TABLE t1;
728 Table Create Table
729 t1 CREATE TABLE "t1" (
730 "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_uca1400_ai_ci DEFAULT NULL
731 )
732 DROP TABLE t1;
733 CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8);
734 SHOW CREATE TABLE t1;
735 Table Create Table
736 t1 CREATE TABLE "t1" (
737 "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci DEFAULT NULL
738 )
739 DROP TABLE t1;
740 #
741 # The following statements run without warnings.
742 # They have extra column attributes (or GENERATED) after COMPRESSED.
743 #
744 CREATE TABLE t1 (a LONGTEXT COMPRESSED BYTE DEFAULT '');
745 SHOW CREATE TABLE t1;
746 Table Create Table
747 t1 CREATE TABLE "t1" (
748 "a" longblob /*M!100301 COMPRESSED*/ DEFAULT ''
749 )
750 DROP TABLE t1;
751 CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY DEFAULT '');
752 SHOW CREATE TABLE t1;
753 Table Create Table
754 t1 CREATE TABLE "t1" (
755 "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT ''
756 )
757 DROP TABLE t1;
758 CREATE TABLE t1 (a LONGTEXT COMPRESSED ASCII DEFAULT '');
759 SHOW CREATE TABLE t1;
760 Table Create Table
761 t1 CREATE TABLE "t1" (
762 "a" longtext /*M!100301 COMPRESSED*/ DEFAULT ''
763 )
764 DROP TABLE t1;
765 CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8 DEFAULT '');
766 SHOW CREATE TABLE t1;
767 Table Create Table
768 t1 CREATE TABLE "t1" (
769 "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci DEFAULT ''
770 )
771 DROP TABLE t1;
772 CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100)));
773 SHOW CREATE TABLE t1;
774 Table Create Table
775 t1 CREATE TABLE "t1" (
776 "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL
777 )
778 DROP TABLE t1;
779 #
780 # The following statements fail by the grammar since 11.5
781 #
782 CREATE TABLE t1 (a LONGTEXT BINARY COMPRESSED);
783 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
784 CREATE TABLE t1 (a LONGTEXT ASCII COMPRESSED);
785 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
786 CREATE TABLE t1 (a LONGTEXT BYTE COMPRESSED);
787 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
788 #
789 # The following statements fail by the grammar,
790 # because COMPRESSED immediately follows 'field_type'.
791 #
792 CREATE TABLE t1 (a LONGTEXT COMPRESSED BYTE COMPRESSED);
793 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
794 CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY COMPRESSED);
795 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
796 CREATE TABLE t1 (a LONGTEXT COMPRESSED ASCII COMPRESSED);
797 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
798 CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8 COMPRESSED);
799 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
800 #
801 # The following statements are not prohibited by the *.yy grammar,
802 # because the sequence `field_type attribute COMPRESSED` is allowed
803 # (notice there is at least one attribute after `field_type`).
804 # The first COMPRESSED is parsed inside `field_type`.
805 # The second COMPRESSED passes through the parser but then is caught
806 # inside Column_definition::set_compressed_deprecated_with_type_check()
807 # and a syntax error is raised.
808 #
809 CREATE TABLE t1 (a LONGTEXT COMPRESSED BYTE DEFAULT '' COMPRESSED);
810 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
811 CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY DEFAULT '' COMPRESSED);
812 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
813 CREATE TABLE t1 (a LONGTEXT COMPRESSED ASCII DEFAULT '' COMPRESSED);
814 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
815 CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8 DEFAULT '' COMPRESSED);
816 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
817 #
818 # VARBINARY and BLOB variables
819 #
820 #
821 # The following statements run without warnings.
822 #
823 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED);
824 SHOW CREATE TABLE t1;
825 Table Create Table
826 t1 CREATE TABLE "t1" (
827 "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL
828 )
829 DROP TABLE t1;
830 #
831 # The following statements run without warnings.
832 # They have extra column attributes (or GENERATED) after COMPRESSED.
833 #
834 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED DEFAULT '');
835 SHOW CREATE TABLE t1;
836 Table Create Table
837 t1 CREATE TABLE "t1" (
838 "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT ''
839 )
840 DROP TABLE t1;
841 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED NULL);
842 SHOW CREATE TABLE t1;
843 Table Create Table
844 t1 CREATE TABLE "t1" (
845 "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL
846 )
847 DROP TABLE t1;
848 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10)));
849 SHOW CREATE TABLE t1;
850 Table Create Table
851 t1 CREATE TABLE "t1" (
852 "a" varchar(10) /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL
853 )
854 DROP TABLE t1;
855 #
856 # The following statements fail by the grammar since 11.5
857 #
858 CREATE TABLE t1 (a VARCHAR(10) DEFAULT '' COMPRESSED);
859 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
860 CREATE TABLE t1 (a VARCHAR(10) NULL COMPRESSED);
861 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
862 #
863 # The following statements fail by the grammar,
864 # because COMPRESSED immediately follows 'field_type'.
865 #
866 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED COMPRESSED);
867 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
868 #
869 # The following statements are not prohibited by the *.yy grammar,
870 # because the sequence `field_type attribute COMPRESSED` is allowed
871 # (notice there is at least one attribute after `field_type`).
872 # The first COMPRESSED is parsed inside `field_type`.
873 # The second COMPRESSED passes through the parser but then is caught
874 # inside Column_definition::set_compressed_deprecated_with_type_check()
875 # and a syntax error is raised.
876 #
877 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED DEFAULT '' COMPRESSED);
878 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
879 CREATE TABLE t1 (a VARCHAR(10) COMPRESSED NULL COMPRESSED);
880 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
881 #
882 # The following statements run without warnings.
883 #
884 CREATE TABLE t1 (a TINYBLOB COMPRESSED);
885 SHOW CREATE TABLE t1;
886 Table Create Table
887 t1 CREATE TABLE "t1" (
888 "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL
889 )
890 DROP TABLE t1;
891 #
892 # The following statements run without warnings.
893 # They have extra column attributes (or GENERATED) after COMPRESSED.
894 #
895 CREATE TABLE t1 (a TINYBLOB COMPRESSED DEFAULT '');
896 SHOW CREATE TABLE t1;
897 Table Create Table
898 t1 CREATE TABLE "t1" (
899 "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT ''
900 )
901 DROP TABLE t1;
902 CREATE TABLE t1 (a TINYBLOB COMPRESSED NULL);
903 SHOW CREATE TABLE t1;
904 Table Create Table
905 t1 CREATE TABLE "t1" (
906 "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL
907 )
908 DROP TABLE t1;
909 CREATE TABLE t1 (a TINYBLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10)));
910 SHOW CREATE TABLE t1;
911 Table Create Table
912 t1 CREATE TABLE "t1" (
913 "a" tinyblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL
914 )
915 DROP TABLE t1;
916 #
917 # The following statements fail by the grammar since 11.5
918 #
919 CREATE TABLE t1 (a TINYBLOB DEFAULT '' COMPRESSED);
920 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
921 CREATE TABLE t1 (a TINYBLOB NULL COMPRESSED);
922 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
923 #
924 # The following statements fail by the grammar,
925 # because COMPRESSED immediately follows 'field_type'.
926 #
927 CREATE TABLE t1 (a TINYBLOB COMPRESSED COMPRESSED);
928 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
929 #
930 # The following statements are not prohibited by the *.yy grammar,
931 # because the sequence `field_type attribute COMPRESSED` is allowed
932 # (notice there is at least one attribute after `field_type`).
933 # The first COMPRESSED is parsed inside `field_type`.
934 # The second COMPRESSED passes through the parser but then is caught
935 # inside Column_definition::set_compressed_deprecated_with_type_check()
936 # and a syntax error is raised.
937 #
938 CREATE TABLE t1 (a TINYBLOB COMPRESSED DEFAULT '' COMPRESSED);
939 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
940 CREATE TABLE t1 (a TINYBLOB COMPRESSED NULL COMPRESSED);
941 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
942 #
943 # The following statements run without warnings.
944 #
945 CREATE TABLE t1 (a BLOB COMPRESSED);
946 SHOW CREATE TABLE t1;
947 Table Create Table
948 t1 CREATE TABLE "t1" (
949 "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL
950 )
951 DROP TABLE t1;
952 #
953 # The following statements run without warnings.
954 # They have extra column attributes (or GENERATED) after COMPRESSED.
955 #
956 CREATE TABLE t1 (a BLOB COMPRESSED DEFAULT '');
957 SHOW CREATE TABLE t1;
958 Table Create Table
959 t1 CREATE TABLE "t1" (
960 "a" longblob /*M!100301 COMPRESSED*/ DEFAULT ''
961 )
962 DROP TABLE t1;
963 CREATE TABLE t1 (a BLOB COMPRESSED NULL);
964 SHOW CREATE TABLE t1;
965 Table Create Table
966 t1 CREATE TABLE "t1" (
967 "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL
968 )
969 DROP TABLE t1;
970 CREATE TABLE t1 (a BLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10)));
971 SHOW CREATE TABLE t1;
972 Table Create Table
973 t1 CREATE TABLE "t1" (
974 "a" longblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL
975 )
976 DROP TABLE t1;
977 #
978 # The following statements fail by the grammar since 11.5
979 #
980 CREATE TABLE t1 (a BLOB DEFAULT '' COMPRESSED);
981 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
982 CREATE TABLE t1 (a BLOB NULL COMPRESSED);
983 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
984 #
985 # The following statements fail by the grammar,
986 # because COMPRESSED immediately follows 'field_type'.
987 #
988 CREATE TABLE t1 (a BLOB COMPRESSED COMPRESSED);
989 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
990 #
991 # The following statements are not prohibited by the *.yy grammar,
992 # because the sequence `field_type attribute COMPRESSED` is allowed
993 # (notice there is at least one attribute after `field_type`).
994 # The first COMPRESSED is parsed inside `field_type`.
995 # The second COMPRESSED passes through the parser but then is caught
996 # inside Column_definition::set_compressed_deprecated_with_type_check()
997 # and a syntax error is raised.
998 #
999 CREATE TABLE t1 (a BLOB COMPRESSED DEFAULT '' COMPRESSED);
1000 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
1001 CREATE TABLE t1 (a BLOB COMPRESSED NULL COMPRESSED);
1002 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
1003 #
1004 # The following statements run without warnings.
1005 #
1006 CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED);
1007 SHOW CREATE TABLE t1;
1008 Table Create Table
1009 t1 CREATE TABLE "t1" (
1010 "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL
1011 )
1012 DROP TABLE t1;
1013 #
1014 # The following statements run without warnings.
1015 # They have extra column attributes (or GENERATED) after COMPRESSED.
1016 #
1017 CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED DEFAULT '');
1018 SHOW CREATE TABLE t1;
1019 Table Create Table
1020 t1 CREATE TABLE "t1" (
1021 "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT ''
1022 )
1023 DROP TABLE t1;
1024 CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED NULL);
1025 SHOW CREATE TABLE t1;
1026 Table Create Table
1027 t1 CREATE TABLE "t1" (
1028 "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL
1029 )
1030 DROP TABLE t1;
1031 CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10)));
1032 SHOW CREATE TABLE t1;
1033 Table Create Table
1034 t1 CREATE TABLE "t1" (
1035 "a" mediumblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL
1036 )
1037 DROP TABLE t1;
1038 #
1039 # The following statements fail by the grammar since 11.5
1040 #
1041 CREATE TABLE t1 (a MEDIUMBLOB DEFAULT '' COMPRESSED);
1042 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
1043 CREATE TABLE t1 (a MEDIUMBLOB NULL COMPRESSED);
1044 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
1045 #
1046 # The following statements fail by the grammar,
1047 # because COMPRESSED immediately follows 'field_type'.
1048 #
1049 CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED COMPRESSED);
1050 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
1051 #
1052 # The following statements are not prohibited by the *.yy grammar,
1053 # because the sequence `field_type attribute COMPRESSED` is allowed
1054 # (notice there is at least one attribute after `field_type`).
1055 # The first COMPRESSED is parsed inside `field_type`.
1056 # The second COMPRESSED passes through the parser but then is caught
1057 # inside Column_definition::set_compressed_deprecated_with_type_check()
1058 # and a syntax error is raised.
1059 #
1060 CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED DEFAULT '' COMPRESSED);
1061 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
1062 CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED NULL COMPRESSED);
1063 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
1064 #
1065 # The following statements run without warnings.
1066 #
1067 CREATE TABLE t1 (a LONGBLOB COMPRESSED);
1068 SHOW CREATE TABLE t1;
1069 Table Create Table
1070 t1 CREATE TABLE "t1" (
1071 "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL
1072 )
1073 DROP TABLE t1;
1074 #
1075 # The following statements run without warnings.
1076 # They have extra column attributes (or GENERATED) after COMPRESSED.
1077 #
1078 CREATE TABLE t1 (a LONGBLOB COMPRESSED DEFAULT '');
1079 SHOW CREATE TABLE t1;
1080 Table Create Table
1081 t1 CREATE TABLE "t1" (
1082 "a" longblob /*M!100301 COMPRESSED*/ DEFAULT ''
1083 )
1084 DROP TABLE t1;
1085 CREATE TABLE t1 (a LONGBLOB COMPRESSED NULL);
1086 SHOW CREATE TABLE t1;
1087 Table Create Table
1088 t1 CREATE TABLE "t1" (
1089 "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL
1090 )
1091 DROP TABLE t1;
1092 CREATE TABLE t1 (a LONGBLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10)));
1093 SHOW CREATE TABLE t1;
1094 Table Create Table
1095 t1 CREATE TABLE "t1" (
1096 "a" longblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL
1097 )
1098 DROP TABLE t1;
1099 #
1100 # The following statements fail by the grammar since 11.5
1101 #
1102 CREATE TABLE t1 (a LONGBLOB DEFAULT '' COMPRESSED);
1103 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
1104 CREATE TABLE t1 (a LONGBLOB NULL COMPRESSED);
1105 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
1106 #
1107 # The following statements fail by the grammar,
1108 # because COMPRESSED immediately follows 'field_type'.
1109 #
1110 CREATE TABLE t1 (a LONGBLOB COMPRESSED COMPRESSED);
1111 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
1112 #
1113 # The following statements are not prohibited by the *.yy grammar,
1114 # because the sequence `field_type attribute COMPRESSED` is allowed
1115 # (notice there is at least one attribute after `field_type`).
1116 # The first COMPRESSED is parsed inside `field_type`.
1117 # The second COMPRESSED passes through the parser but then is caught
1118 # inside Column_definition::set_compressed_deprecated_with_type_check()
1119 # and a syntax error is raised.
1120 #
1121 CREATE TABLE t1 (a LONGBLOB COMPRESSED DEFAULT '' COMPRESSED);
1122 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
1123 CREATE TABLE t1 (a LONGBLOB COMPRESSED NULL COMPRESSED);
1124 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
1125 #
1126 # NVARCHAR
1127 #
1128 CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED);
1129 SHOW CREATE TABLE t1;
1130 Table Create Table
1131 t1 CREATE TABLE "t1" (
1132 "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb3 COLLATE utf8mb3_uca1400_ai_ci DEFAULT NULL
1133 )
1134 DROP TABLE t1;
1135 CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED BINARY COMPRESSED);
1136 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
1137 CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED DEFAULT '' COMPRESSED);
1138 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COMPRESSED)' at line 1
1139 ALTER DATABASE test CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci;