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 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548
|
# See that SQL NULL is handled properly
SELECT JSON_SCHEMA_VALID(NULL, NULL);
JSON_SCHEMA_VALID(NULL, NULL)
NULL
SELECT JSON_SCHEMA_VALID('{}', NULL);
JSON_SCHEMA_VALID('{}', NULL)
NULL
SELECT JSON_SCHEMA_VALID(NULL, '{}');
JSON_SCHEMA_VALID(NULL, '{}')
NULL
# Check some basic scenarios to verify that everything is working as
# expected. Note that the rapidjson library contains a bunch of tests to
# verify the correctness of the JSON Schema validation, so we don't do
# any extensive testing of the validation process itself here.
SELECT JSON_SCHEMA_VALID('{
"type": "object",
"properties": {
"latitude": {
"type": "number",
"minimum": 63
},
"longitude": {
"type": "number"
}
},
"required": ["latitude", "longitude"]
}','{
"latitude": 63.444697,
"longitude": 10.445118
}') AS should_be_valid;
should_be_valid
1
SELECT JSON_SCHEMA_VALID('{
"type": "object",
"properties": {
"latitude": {
"type": "number",
"minimum": 63
},
"longitude": {
"type": "number"
}
},
"required": ["latitude", "longitude"]
}','{
"longitude": 10.445118
}') AS should_be_invalid;
should_be_invalid
0
SELECT JSON_SCHEMA_VALID('{
"type": "object",
"properties": {
"latitude": {
"type": "number",
"minimum": 63
},
"longitude": {
"type": "number"
}
},
"required": ["latitude", "longitude"]
}','{
"latitude": 62,
"longitude": 10.445118
}') AS should_be_invalid;
should_be_invalid
0
SELECT JSON_SCHEMA_VALID('{
"type": "object",
"properties": {
"a_string": {
"type": "string",
"pattern": "[5-9]"
}
}
}','{
"a_string": "8"
}') AS should_be_valid;
should_be_valid
1
SELECT JSON_SCHEMA_VALID('{
"type": "object",
"properties": {
"a_string": {
"type": "string",
"pattern": "[5-9]"
}
}
}','{
"a_string": "4"
}') AS should_be_invalid;
should_be_invalid
0
SELECT JSON_SCHEMA_VALID('{
"type": "object",
"properties": { "$ref": "http://example.com" }
}','
{
"latitude": 63.444697
}') AS invalid;
ERROR 42000: This version of MySQL doesn't yet support 'references in JSON Schema'
SELECT JSON_SCHEMA_VALID(repeat('[', 100000), json_object());
ERROR 22032: The JSON document exceeds the maximum depth.
SELECT JSON_SCHEMA_VALID(json_object(), repeat('[', 100000));
ERROR 22032: The JSON document exceeds the maximum depth.
# Check that we can use JSON_SCHEMA_VALID as a CHECK constraint.
CREATE TABLE t1 (
geometry JSON,
CHECK(JSON_SCHEMA_VALID('{
"type": "object",
"properties": {
"latitude": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"longitude": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": ["latitude", "longitude"]
}', geometry)
)
);
INSERT INTO t1 VALUES ('{"latitude": 0, "longitude": 0}');
INSERT INTO t1 VALUES ('{"latitude": -90, "longitude": -180}');
INSERT INTO t1 VALUES ('{"latitude": 90, "longitude": 180}');
SELECT geometry FROM t1;
geometry
{"latitude": 0, "longitude": 0}
{"latitude": -90, "longitude": -180}
{"latitude": 90, "longitude": 180}
INSERT INTO t1 VALUES ('{"latitude": 0}');
ERROR HY000: Check constraint 't1_chk_1' is violated.
INSERT INTO t1 VALUES ('{"latitude": 181, "longitude": 0}');
ERROR HY000: Check constraint 't1_chk_1' is violated.
DROP TABLE t1;
# Negative test for wrong number of arguments
SELECT JSON_SCHEMA_VALID();
ERROR 42000: Incorrect parameter count in the call to native function 'JSON_SCHEMA_VALID'
SELECT JSON_SCHEMA_VALID(NULL);
ERROR 42000: Incorrect parameter count in the call to native function 'JSON_SCHEMA_VALID'
SELECT JSON_SCHEMA_VALID(NULL, NULL, NULL);
ERROR 42000: Incorrect parameter count in the call to native function 'JSON_SCHEMA_VALID'
# Invalid JSON document in either argument
SET @invalid_json = '{"foo": "bar"';
SET @valid_json = '{}';
SELECT JSON_SCHEMA_VALID(@valid_json, @valid_json) AS should_be_true;
should_be_true
1
SELECT JSON_SCHEMA_VALID(@invalid_json, @valid_json);
ERROR 22032: Invalid JSON text in argument 1 to function json_schema_valid: "Missing a comma or '}' after an object member." at position 13.
SELECT JSON_SCHEMA_VALID(@valid_json, @invalid_json);
ERROR 22032: Invalid JSON text in argument 2 to function json_schema_valid: "Missing a comma or '}' after an object member." at position 13.
SELECT JSON_SCHEMA_VALID(@invalid_json, @invalid_json);
ERROR 22032: Invalid JSON text in argument 1 to function json_schema_valid: "Missing a comma or '}' after an object member." at position 13.
# Invalid regex patterns. rapidjson ignores invalid regex patterns, so
# they are removed from the validation process.
SELECT JSON_SCHEMA_VALID('{"type":"string","pattern":"("}', '"abc"') AS should_be_true;
should_be_true
1
SELECT JSON_SCHEMA_VALID('{"type":"string","pattern":"[asdf@123"}', '"abc"') AS should_be_true;
should_be_true
1
# Positive and negative tests for anchored regex patterns
SELECT JSON_SCHEMA_VALID('{
"type": "object",
"properties": {
"a_string": {
"type": "string",
"pattern": "[5-9]"
}
}
}','{
"a_string": "a8"
}') AS should_be_valid;
should_be_valid
1
SELECT JSON_SCHEMA_VALID('{
"type": "object",
"properties": {
"a_string": {
"type": "string",
"pattern": "^[5-9]"
}
}
}','{
"a_string": "a8"
}') AS should_be_invalid;
should_be_invalid
0
SELECT JSON_SCHEMA_VALID('{
"type": "object",
"properties": {
"a_string": {
"type": "string",
"pattern": "[5-9]"
}
}
}','{
"a_string": "8a"
}') AS should_be_valid;
should_be_valid
1
SELECT JSON_SCHEMA_VALID('{
"type": "object",
"properties": {
"a_string": {
"type": "string",
"pattern": "[5-9]$"
}
}
}','{
"a_string": "8a"
}') AS should_be_invalid;
should_be_invalid
0
SELECT JSON_SCHEMA_VALID('{
"type": "object",
"properties": {
"a_string": {
"type": "string",
"pattern": "^[5-9]$"
}
}
}','{
"a_string": "8"
}') AS should_be_valid;
should_be_valid
1
SELECT JSON_SCHEMA_VALID('{
"type": "object",
"properties": {
"a_string": {
"type": "string",
"pattern": "^[5-9]$"
}
}
}','{
"a_string": "a8"
}') AS should_be_invalid;
should_be_invalid
0
SELECT JSON_SCHEMA_VALID('{
"type": "object",
"properties": {
"a_string": {
"type": "string",
"pattern": "^[5-9]$"
}
}
}','{
"a_string": "8a"
}') AS should_be_invalid;
should_be_invalid
0
# The JSON Schema must be an object, so see that we don't accept any
# other type as the first argument.
SELECT JSON_SCHEMA_VALID('[]', '{}');
ERROR 22032: Invalid JSON type in argument 1 to function json_schema_valid; an object is required.
SELECT JSON_SCHEMA_VALID(CAST('test' AS JSON), '{}');
ERROR 22032: Invalid JSON text in argument 1 to function cast_as_json: "Invalid value." at position 1.
SELECT JSON_SCHEMA_VALID('{"type":"object"}', '{');
ERROR 22032: Invalid JSON text in argument 2 to function json_schema_valid: "Missing a name for object member." at position 1.
# Test some various scenarios with cached JSON schema (first argument is const)
CREATE TABLE t1 (col1 JSON);
INSERT INTO t1 VALUES ('{"latitude": 0, "longitude": 0}');
INSERT INTO t1 VALUES ('{"latitude": -90, "longitude": -180}');
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES ('[]');
INSERT INTO t1 VALUES ('{"latitude": 90, "longitude": 180}');
# All rows should return SQL NULL
SELECT JSON_SCHEMA_VALID(NULL, col1) FROM t1;
JSON_SCHEMA_VALID(NULL, col1)
NULL
NULL
NULL
NULL
NULL
# We should get true, true, null, false, true
SELECT JSON_SCHEMA_VALID('{"type":"object"}', col1) AS valid FROM t1;
valid
1
1
NULL
0
1
# Both arguments should be JSON
SELECT JSON_SCHEMA_VALID(JSON_DEPTH(col1), col1) FROM t1;
ERROR 22032: Invalid data type for JSON data in argument 1 to function json_schema_valid; a JSON string or JSON type is required.
SELECT JSON_SCHEMA_VALID('{"type":"object"}', JSON_DEPTH(col1)) FROM t1;
ERROR 22032: Invalid data type for JSON data in argument 2 to function json_schema_valid; a JSON string or JSON type is required.
SELECT JSON_SCHEMA_VALID(123, col1) FROM t1;
ERROR 22032: Invalid data type for JSON data in argument 1 to function json_schema_valid; a JSON string or JSON type is required.
DROP TABLE t1;
# Test some scenarios with non-cached JSON schema (first argument is not const)
CREATE TABLE t1 (col1 JSON);
INSERT INTO t1 VALUES ('{"type":"object"}');
INSERT INTO t1 VALUES ('{"type":"array"}');
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES ('{"type":"string"}');
# All rows should return SQL NULL
SELECT JSON_SCHEMA_VALID(col1, NULL) FROM t1;
JSON_SCHEMA_VALID(col1, NULL)
NULL
NULL
NULL
NULL
# We should get false, true, null, false
SELECT JSON_SCHEMA_VALID(col1, '[]') AS valid FROM t1;
valid
0
1
NULL
0
DROP TABLE t1;
CREATE TABLE t1(s VARCHAR(100), d VARCHAR(100));
# Invalid JSON document, non-const schema
INSERT INTO t1 VALUES('{"type":"object"}', '{');
SELECT JSON_SCHEMA_VALID(s, d) FROM t1;
ERROR 22032: Invalid JSON text in argument 2 to function json_schema_valid: "Missing a name for object member." at position 1.
# Invalid, non-const schema
UPDATE t1 SET s = '{', d = '{}';
SELECT JSON_SCHEMA_VALID(s, d) FROM t1;
ERROR 22032: Invalid JSON text in argument 1 to function json_schema_valid: "Missing a name for object member." at position 1.
DROP TABLE t1;
# Ensure that our item tree transformation doesn't get stuck forever when
# using prepared statements.
PREPARE stmt FROM 'SELECT JSON_SCHEMA_VALID(?, ''{}'') FROM DUAL';
SET @json_schema = '{"type":"object"}';
SET @null = NULL;
EXECUTE stmt USING @json_schema;
JSON_SCHEMA_VALID(?, '{}')
1
EXECUTE stmt USING @null;
JSON_SCHEMA_VALID(?, '{}')
NULL
EXECUTE stmt USING @json_schema;
JSON_SCHEMA_VALID(?, '{}')
1
#
# Bug#29366780 WL#11999: SIG6 IN SETUP_FIELDS() AT SQL/SQL_BASE.CC
#
SELECT JSON_SCHEMA_VALID(CAST('NULL' AS JSON), CAST('NULL' AS JSON));
ERROR 22032: Invalid JSON text in argument 1 to function cast_as_json: "Invalid value." at position 0.
# See that we don't accept non-JSON types like geometry, bool, ints etc.
SELECT JSON_SCHEMA_VALID(JSON_OBJECT(), 123);
ERROR 22032: Invalid data type for JSON data in argument 2 to function json_schema_valid; a JSON string or JSON type is required.
SELECT JSON_SCHEMA_VALID(JSON_OBJECT(), POINT(1, 1));
ERROR 22032: Invalid data type for JSON data in argument 2 to function json_schema_valid; a JSON string or JSON type is required.
SELECT JSON_SCHEMA_VALID(JSON_OBJECT(), true);
ERROR 22032: Invalid data type for JSON data in argument 2 to function json_schema_valid; a JSON string or JSON type is required.
SELECT JSON_SCHEMA_VALID(123, JSON_OBJECT());
ERROR 22032: Invalid data type for JSON data in argument 1 to function json_schema_valid; a JSON string or JSON type is required.
SELECT JSON_SCHEMA_VALID(POINT(1, 1), JSON_OBJECT());
ERROR 22032: Invalid data type for JSON data in argument 1 to function json_schema_valid; a JSON string or JSON type is required.
SELECT JSON_SCHEMA_VALID(true, JSON_OBJECT());
ERROR 22032: Invalid data type for JSON data in argument 1 to function json_schema_valid; a JSON string or JSON type is required.
#
# Bug#29524331: WL#11999: ASSERTION FAILURE: `!ARGS[0]->CONST_ITEM()'
# Bug#29528888: WL#11999: SIG6 IN ITEM_FUNC_JSON_SCHEMA_VALID::VAL_BOOL()
# AT ITEM_JSON_FUNC.CC
#
CREATE TABLE t1 (pk INT PRIMARY KEY, j JSON);
INSERT INTO t1 VALUES (1, '{"key": "foobar"}' );
SELECT JSON_SCHEMA_VALID(j, j) FROM t1 WHERE pk = 1;
JSON_SCHEMA_VALID(j, j)
1
SELECT JSON_SCHEMA_VALID(t2.j, t2.j)
FROM t1, (SELECT * FROM t1 WHERE pk = 1) t2;
JSON_SCHEMA_VALID(t2.j, t2.j)
1
DROP TABLE t1;
#
# WL#13195 - TABLE WITH JSON SCHEMA VALIDATION CONSTRAINT SHOULD
# RETURN ERROR FOR CONCRETE ROW
#
CREATE TABLE t1 (id INT,
geometry JSON,
CHECK(JSON_SCHEMA_VALID('{
"type": "object",
"properties": {
"latitude": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"longitude": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": ["latitude", "longitude"]
}', geometry)
)
);
# With WL changes, on CHECK constraint violation detailed information
# about the failed JSON schema validation is pushed to diagnostics area.
# SHOW WARNINGS and GET DIAGNOSTICS lists detailed information about the
# failed schema validation.
# CHECK constraint evaluation fails as required property "longitude" is
# missing.
INSERT INTO t1 VALUES (1, '{"latitude": 0}');
ERROR HY000: Check constraint 't1_chk_1' is violated.
SHOW WARNINGS;
Level Code Message
Error 3934 The JSON document location '#' failed requirement 'required' at JSON Schema location '#'.
Error 3819 Check constraint 't1_chk_1' is violated.
GET DIAGNOSTICS CONDITION 1 @p1 = MYSQL_ERRNO, @p2 = MESSAGE_TEXT;
SELECT @p1, @p2;
@p1 @p2
3934 The JSON document location '#' failed requirement 'required' at JSON Schema location '#'.
# CHECK constraint evaluation fails as latitude is out of range.
INSERT INTO t1 VALUES (1, '{"latitude": 181, "longitude": 0}');
ERROR HY000: Check constraint 't1_chk_1' is violated.
SHOW WARNINGS;
Level Code Message
Error 3934 The JSON document location '#/latitude' failed requirement 'maximum' at JSON Schema location '#/properties/latitude'.
Error 3819 Check constraint 't1_chk_1' is violated.
GET DIAGNOSTICS CONDITION 1 @p1 = MYSQL_ERRNO, @p2 = MESSAGE_TEXT;
SELECT @p1, @p2;
@p1 @p2
3934 The JSON document location '#/latitude' failed requirement 'maximum' at JSON Schema location '#/properties/latitude'.
# CHECK constraint evaluation fails for 3rd row as latitude is out of
# range.
INSERT INTO t1 VALUES (1, '{"latitude": 0, "longitude": 0}'),
(2, '{"latitude": -90, "longitude": -180}'),
(3, '{"latitude": 181, "longitude": 0}'),
(4, '{"latitude": 90, "longitude": 180}');
ERROR HY000: Check constraint 't1_chk_1' is violated.
SHOW WARNINGS;
Level Code Message
Error 3934 The JSON document location '#/latitude' failed requirement 'maximum' at JSON Schema location '#/properties/latitude'.
Error 3819 Check constraint 't1_chk_1' is violated.
GET DIAGNOSTICS CONDITION 1 @p1 = MYSQL_ERRNO, @p2 = MESSAGE_TEXT;
SELECT @p1, @p2;
@p1 @p2
3934 The JSON document location '#/latitude' failed requirement 'maximum' at JSON Schema location '#/properties/latitude'.
INSERT INTO t1 VALUES (1, '{"latitude": 0, "longitude": 0}'),
(2, '{"latitude": -90, "longitude": -180}'),
(3, '{"latitude": 90, "longitude": 180}');
# CHECK constraint evaluation fails as required property "longitude"
# is missing.
UPDATE t1 SET geometry = '{"latitude": 90}';
ERROR HY000: Check constraint 't1_chk_1' is violated.
SHOW WARNINGS;
Level Code Message
Error 3934 The JSON document location '#' failed requirement 'required' at JSON Schema location '#'.
Error 3819 Check constraint 't1_chk_1' is violated.
GET DIAGNOSTICS CONDITION 1 @p1 = MYSQL_ERRNO, @p2 = MESSAGE_TEXT;
SELECT @p1, @p2;
@p1 @p2
3934 The JSON document location '#' failed requirement 'required' at JSON Schema location '#'.
# CHECK constraint evaluation fails as latitude is out of range.
UPDATE t1 SET geometry = '{"latitude": 181, "longitude": 0}';
ERROR HY000: Check constraint 't1_chk_1' is violated.
SHOW WARNINGS;
Level Code Message
Error 3934 The JSON document location '#/latitude' failed requirement 'maximum' at JSON Schema location '#/properties/latitude'.
Error 3819 Check constraint 't1_chk_1' is violated.
GET DIAGNOSTICS CONDITION 1 @p1 = MYSQL_ERRNO, @p2 = MESSAGE_TEXT;
SELECT @p1, @p2;
@p1 @p2
3934 The JSON document location '#/latitude' failed requirement 'maximum' at JSON Schema location '#/properties/latitude'.
# CHECK constraint evaluation fails for 3rd row as latitude is out of
# range.
UPDATE t1 SET geometry = IF (id = 3, '{"latitude": 181, "longitude": 0}',
'{"latitude": 90, "longitude": 0}');
ERROR HY000: Check constraint 't1_chk_1' is violated.
SHOW WARNINGS;
Level Code Message
Error 3934 The JSON document location '#/latitude' failed requirement 'maximum' at JSON Schema location '#/properties/latitude'.
Error 3819 Check constraint 't1_chk_1' is violated.
GET DIAGNOSTICS CONDITION 1 @p1 = MYSQL_ERRNO, @p2 = MESSAGE_TEXT;
SELECT @p1, @p2;
@p1 @p2
3934 The JSON document location '#/latitude' failed requirement 'maximum' at JSON Schema location '#/properties/latitude'.
DROP TABLE t1;
# With ALTER TABLE and INSERT statements verify constraint evaluation
# with NULL value.
CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1 VALUES (1), (2);
ALTER TABLE t1 ADD COLUMN jcol1 JSON,
ADD COLUMN jcol2 JSON,
ADD CONSTRAINT CHECK (json_schema_valid('{
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"price": {
"type": "number",
"minimum": 0,
"exclusiveMinimum": true
}
},
"required": ["id","name","price"]}',`jcol1`)),
ADD CONSTRAINT CHECK (json_schema_valid('{
"type": "object",
"properties": {
"latitude": {
"type": "number",
"minimum": -90,
"maximum": 90
},
"longitude": {
"type": "number",
"minimum": -180,
"maximum": 180
}
},
"required": ["latitude", "longitude"]}',`jcol2`));
INSERT INTO t1 ( jcol1 ) VALUES ('{"id": 2, "name": "shiva", "price": 1 }');
# With ALTER TABLE and INSERT statements verify constraint evaluation
# with reference in JSON schema.
ALTER TABLE t1 ADD COLUMN jcol3 JSON,
ADD CONSTRAINT CHECK(json_schema_valid('{
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"$ref": "http://example.com"
},
"required": ["id","$ref"]}',`jcol3`));
INSERT INTO t1 ( jcol3 ) VALUES ('{"id": 3, "$ref": "http://example.com"}');
ERROR HY000: Check constraint 't1_chk_3' is violated.
SHOW WARNINGS;
Level Code Message
Error 1235 This version of MySQL doesn't yet support 'references in JSON Schema'
Error 3819 Check constraint 't1_chk_3' is violated.
DROP TABLE t1;
#
# Bug#30622327: JSON SCHEMA FUNCTIONS SHOULD CHECK ARGUMENT TYPES
# AT RESOLVE TIME
#
CREATE TABLE t(j JSON, g GEOMETRY);
PREPARE ps FROM 'SELECT * FROM t WHERE JSON_SCHEMA_VALID(j, g)';
ERROR 22032: Invalid data type for JSON data in argument 2 to function json_schema_valid; a JSON string or JSON type is required.
PREPARE ps FROM 'SELECT * FROM t WHERE JSON_SCHEMA_VALID(g, j)';
ERROR 22032: Invalid data type for JSON data in argument 1 to function json_schema_valid; a JSON string or JSON type is required.
DROP TABLE t;
|