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 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814
|
drop table if exists t1;
create table t1 (time time, date date, timestamp timestamp,
quarter int, week int, year int, timestampadd int, timestampdiff int);
insert into t1 values ("12:22:22","97:02:03","1997-01-02",1,2,3,4,5);
select * from t1;
time date timestamp quarter week year timestampadd timestampdiff
12:22:22 1997-02-03 1997-01-02 00:00:00 1 2 3 4 5
select t1.time+0,t1.date+0,t1.timestamp+0,concat(date," ",time),
t1.quarter+t1.week, t1.year+timestampadd, timestampdiff from t1;
t1.time+0 t1.date+0 t1.timestamp+0 concat(date," ",time) t1.quarter+t1.week t1.year+timestampadd timestampdiff
122222 19970203 19970102000000 1997-02-03 12:22:22 3 7 5
drop table t1;
create table events(binlog int);
insert into events values(1);
select events.binlog from events;
binlog
1
drop table events;
create procedure p1()
begin
declare n int default 2;
authors: while n > 0 do
set n = n -1;
end while authors;
end|
create procedure p2()
begin
declare n int default 2;
contributors: while n > 0 do
set n = n -1;
end while contributors;
end|
drop procedure p1;
drop procedure p2;
create table t1 (connection int, b int);
create procedure p1()
begin
declare connection int;
select max(t1.connection) into connection from t1;
select concat("max=",connection) 'p1';
end|
insert into t1 (connection) values (1);
call p1();
p1
max=1
drop procedure p1;
drop table t1;
CREATE TABLE slow (slow INT, general INT, master_heartbeat_period INT, ignore_server_ids INT);
INSERT INTO slow(slow, general, master_heartbeat_period, ignore_server_ids) VALUES (1,2,3,4), (5,6,7,8);
INSERT INTO slow(slow, general, master_heartbeat_period) VALUES (1,2,3), (5,6,7);
INSERT INTO slow(slow, general) VALUES (1,2), (5,6);
INSERT INTO slow(slow) VALUES (1), (5);
SELECT slow, general, master_heartbeat_period, ignore_server_ids FROM slow ORDER BY slow;
slow general master_heartbeat_period ignore_server_ids
1 2 3 4
1 2 3 NULL
1 2 NULL NULL
1 NULL NULL NULL
5 6 7 8
5 6 7 NULL
5 6 NULL NULL
5 NULL NULL NULL
SELECT slow, general, master_heartbeat_period FROM slow ORDER BY slow;
slow general master_heartbeat_period
1 2 3
1 2 3
1 2 NULL
1 NULL NULL
5 6 7
5 6 7
5 6 NULL
5 NULL NULL
SELECT slow, master_heartbeat_period FROM slow ORDER BY slow;
slow master_heartbeat_period
1 3
1 3
1 NULL
1 NULL
5 7
5 7
5 NULL
5 NULL
SELECT slow FROM slow ORDER BY slow;
slow
1
1
1
1
5
5
5
5
DROP TABLE slow;
CREATE TABLE general (slow INT, general INT, master_heartbeat_period INT, ignore_server_ids INT);
INSERT INTO general(slow, general, master_heartbeat_period, ignore_server_ids) VALUES (1,2,3,4), (5,6,7,8);
INSERT INTO general(slow, general, master_heartbeat_period) VALUES (1,2,3), (5,6,7);
INSERT INTO general(slow, general) VALUES (1,2), (5,6);
INSERT INTO general(slow) VALUES (1), (5);
SELECT slow, general, master_heartbeat_period, ignore_server_ids FROM general ORDER BY slow;
slow general master_heartbeat_period ignore_server_ids
1 2 3 4
1 2 3 NULL
1 2 NULL NULL
1 NULL NULL NULL
5 6 7 8
5 6 7 NULL
5 6 NULL NULL
5 NULL NULL NULL
SELECT slow, general, master_heartbeat_period FROM general ORDER BY slow;
slow general master_heartbeat_period
1 2 3
1 2 3
1 2 NULL
1 NULL NULL
5 6 7
5 6 7
5 6 NULL
5 NULL NULL
SELECT slow, master_heartbeat_period FROM general ORDER BY slow;
slow master_heartbeat_period
1 3
1 3
1 NULL
1 NULL
5 7
5 7
5 NULL
5 NULL
SELECT slow FROM general ORDER BY slow;
slow
1
1
1
1
5
5
5
5
DROP TABLE general;
CREATE TABLE master_heartbeat_period (slow INT, general INT, master_heartbeat_period INT, ignore_server_ids INT);
INSERT INTO master_heartbeat_period(slow, general, master_heartbeat_period, ignore_server_ids) VALUES (1,2,3,4), (5,6,7,8);
INSERT INTO master_heartbeat_period(slow, general, master_heartbeat_period) VALUES (1,2,3), (5,6,7);
INSERT INTO master_heartbeat_period(slow, general) VALUES (1,2), (5,6);
INSERT INTO master_heartbeat_period(slow) VALUES (1), (5);
SELECT slow, general, master_heartbeat_period, ignore_server_ids FROM master_heartbeat_period ORDER BY slow;
slow general master_heartbeat_period ignore_server_ids
1 2 3 4
1 2 3 NULL
1 2 NULL NULL
1 NULL NULL NULL
5 6 7 8
5 6 7 NULL
5 6 NULL NULL
5 NULL NULL NULL
SELECT slow, general, master_heartbeat_period FROM master_heartbeat_period ORDER BY slow;
slow general master_heartbeat_period
1 2 3
1 2 3
1 2 NULL
1 NULL NULL
5 6 7
5 6 7
5 6 NULL
5 NULL NULL
SELECT slow, master_heartbeat_period FROM master_heartbeat_period ORDER BY slow;
slow master_heartbeat_period
1 3
1 3
1 NULL
1 NULL
5 7
5 7
5 NULL
5 NULL
SELECT slow FROM master_heartbeat_period ORDER BY slow;
slow
1
1
1
1
5
5
5
5
DROP TABLE master_heartbeat_period;
CREATE TABLE ignore_server_ids (slow INT, general INT, master_heartbeat_period INT, ignore_server_ids INT);
INSERT INTO ignore_server_ids(slow, general, master_heartbeat_period, ignore_server_ids) VALUES (1,2,3,4), (5,6,7,8);
INSERT INTO ignore_server_ids(slow, general, master_heartbeat_period) VALUES (1,2,3), (5,6,7);
INSERT INTO ignore_server_ids(slow, general) VALUES (1,2), (5,6);
INSERT INTO ignore_server_ids(slow) VALUES (1), (5);
SELECT slow, general, master_heartbeat_period, ignore_server_ids FROM ignore_server_ids ORDER BY slow;
slow general master_heartbeat_period ignore_server_ids
1 2 3 4
1 2 3 NULL
1 2 NULL NULL
1 NULL NULL NULL
5 6 7 8
5 6 7 NULL
5 6 NULL NULL
5 NULL NULL NULL
SELECT slow, general, master_heartbeat_period FROM ignore_server_ids ORDER BY slow;
slow general master_heartbeat_period
1 2 3
1 2 3
1 2 NULL
1 NULL NULL
5 6 7
5 6 7
5 6 NULL
5 NULL NULL
SELECT slow, master_heartbeat_period FROM ignore_server_ids ORDER BY slow;
slow master_heartbeat_period
1 3
1 3
1 NULL
1 NULL
5 7
5 7
5 NULL
5 NULL
SELECT slow FROM ignore_server_ids ORDER BY slow;
slow
1
1
1
1
5
5
5
5
DROP TABLE ignore_server_ids;
CREATE TABLE t1 (slow INT, general INT, ignore_server_ids INT, master_heartbeat_period INT);
INSERT INTO t1 VALUES (1,2,3,4);
CREATE PROCEDURE p1()
BEGIN
DECLARE slow INT;
DECLARE general INT;
DECLARE ignore_server_ids INT;
DECLARE master_heartbeat_period INT;
SELECT max(t1.slow) INTO slow FROM t1;
SELECT max(t1.general) INTO general FROM t1;
SELECT max(t1.ignore_server_ids) INTO ignore_server_ids FROM t1;
SELECT max(t1.master_heartbeat_period) INTO master_heartbeat_period FROM t1;
SELECT slow, general, ignore_server_ids, master_heartbeat_period;
END|
CREATE PROCEDURE p2()
BEGIN
DECLARE n INT DEFAULT 2;
general: WHILE n > 0 DO
SET n = n -1;
END WHILE general;
SET n = 2;
slow: WHILE n > 0 DO
SET n = n -1;
END WHILE slow;
SET n = 2;
ignore_server_ids: WHILE n > 0 DO
SET n = n -1;
END WHILE ignore_server_ids;
SET n = 2;
master_heartbeat_period: WHILE n > 0 DO
SET n = n -1;
END WHILE master_heartbeat_period;
END|
CALL p1();
slow general ignore_server_ids master_heartbeat_period
1 2 3 4
call p2();
DROP PROCEDURE p1;
DROP PROCEDURE p2;
DROP TABLE t1;
create table option (option int not null);
drop table option;
set option=1;
ERROR HY000: Unknown system variable 'option'
set option option=1;
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 'option=1' at line 1
#
# MDEV-9979 Keywords UNBOUNDED, PRECEDING, FOLLOWING, TIES, OTHERS should be non-reserved
#
CREATE TABLE EXCLUDE (EXCLUDE INT);
SELECT EXCLUDE FROM EXCLUDE;
EXCLUDE
SELECT EXCLUDE EXCLUDE FROM EXCLUDE;
EXCLUDE
SELECT EXCLUDE AS EXCLUDE FROM EXCLUDE;
EXCLUDE
DROP TABLE EXCLUDE;
CREATE TABLE UNBOUNDED (UNBOUNDED INT);
SELECT UNBOUNDED FROM UNBOUNDED;
UNBOUNDED
SELECT UNBOUNDED UNBOUNDEX FROM UNBOUNDED;
UNBOUNDEX
SELECT UNBOUNDED AS UNBOUNDEX FROM UNBOUNDED;
UNBOUNDEX
DROP TABLE UNBOUNDED;
CREATE TABLE PRECEDING (PRECEDING INT);
SELECT PRECEDING FROM PRECEDING;
PRECEDING
SELECT PRECEDING PRECEDING FROM PRECEDING;
PRECEDING
SELECT PRECEDING AS PRECEDING FROM PRECEDING;
PRECEDING
DROP TABLE PRECEDING;
CREATE TABLE FOLLOWING (FOLLOWING INT);
SELECT FOLLOWING FROM FOLLOWING;
FOLLOWING
SELECT FOLLOWING FOLLOWING FROM FOLLOWING;
FOLLOWING
SELECT FOLLOWING AS FOLLOWING FROM FOLLOWING;
FOLLOWING
DROP TABLE FOLLOWING;
CREATE TABLE TIES (TIES INT);
SELECT TIES FROM TIES;
TIES
SELECT TIES TIES FROM TIES;
TIES
SELECT TIES AS TIES FROM TIES;
TIES
DROP TABLE TIES;
CREATE TABLE OTHERS (OTHERS INT);
SELECT OTHERS FROM OTHERS;
OTHERS
SELECT OTHERS OTHERS FROM OTHERS;
OTHERS
SELECT OTHERS AS OTHERS FROM OTHERS;
OTHERS
DROP TABLE OTHERS;
#
# MDEV-10585 EXECUTE IMMEDIATE statement
#
CREATE TABLE immediate (immediate int);
DROP TABLE immediate;
#
# MDEV-10142 Pluggable parser
# Testing keywords that were added into lex.h for Oracle compatibility
# that are not reserved keywords in MariaDB
#
CREATE TABLE clob (clob int);
DROP TABLE clob;
CREATE TABLE elsif (elsif INT);
DROP TABLE elsif;
CREATE TABLE exception (exception INT);
DROP TABLE exception;
CREATE TABLE raw (raw int);
DROP TABLE raw;
CREATE TABLE varchar2 (varchar2 int);
DROP TABLE varchar2;
CREATE TABLE decode (decode int);
DROP TABLE decode;
CREATE TABLE rowcount (rowcount int);
DROP TABLE rowcount;
CREATE TABLE isopen (isopen int);
DROP TABLE isopen;
CREATE TABLE notfound (notfound int);
DROP TABLE notfound;
CREATE TABLE raise (raise int);
DROP TABLE raise;
CREATE TABLE reuse (reuse int);
DROP TABLE reuse;
#
# MDEV-17363 Compressed columns cannot be restored from dump
# COMPRESSED is not valid as an SP label any more
# but is still valid as an SP variable name.
#
BEGIN NOT ATOMIC
compressed:
BEGIN
SELECT 1 AS a;
END;
END
$$
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:
BEGIN
SELECT 1 AS a;
END;
END' at line 2
BEGIN NOT ATOMIC
`compressed`:
BEGIN
SELECT 1 AS a;
END;
END
$$
a
1
BEGIN NOT ATOMIC
DECLARE compressed INT DEFAULT 1;
SELECT compressed;
END
$$
compressed
1
#
# Testing various keywords in various contexts
#
CREATE PROCEDURE p1(query TEXT, var TEXT)
BEGIN
DECLARE errmsg TEXT DEFAULT '';
DECLARE CONTINUE HANDLER
FOR SQLEXCEPTION
BEGIN
GET DIAGNOSTICS CONDITION 1 errmsg = MESSAGE_TEXT;
SET errmsg= REPLACE(errmsg, 'You have an error in your SQL ', '..');
SET errmsg= REPLACE(errmsg, '; check the manual that corresponds to your MariaDB server version for the right syntax to use', '..');
END;
SET query=REPLACE(query, '$(VAR)', var);
EXECUTE IMMEDIATE query;
SELECT CONCAT(query, '; -- ', LEFT(COALESCE(errmsg,''),40)) AS `--------`;
END;
$$
CREATE PROCEDURE p2(query TEXT)
BEGIN
FOR row IN (SELECT word FROM t1 ORDER BY category, word)
DO
CALL p1(query, row.word);
END FOR;
END;
$$
CREATE TABLE t1 (word TEXT, category TEXT);
INSERT INTO t1 VALUES ('non_keyword', '00 Simple identifier');
INSERT INTO t1 VALUES ('lpad', '01 Built-in native function');
INSERT INTO t1 VALUES ('rpad', '01 Built-in native function');
INSERT INTO t1 VALUES ('adddate', '02 function_call_nonkeyword');
INSERT INTO t1 VALUES ('substr', '02 function_call_nonkeyword');
INSERT INTO t1 VALUES ('substring', '02 function_call_nonkeyword');
INSERT INTO t1 VALUES ('trim_oracle', '02 function_call_nonkeyword');
INSERT INTO t1 VALUES ('ascii', '03 function_call_conflict');
INSERT INTO t1 VALUES ('replace', '03 function_call_conflict');
INSERT INTO t1 VALUES ('weight_string', '03 function_call_conflict');
INSERT INTO t1 VALUES ('char', '04 function_call_keyword');
INSERT INTO t1 VALUES ('trim', '04 function_call_keyword');
INSERT INTO t1 VALUES ('year', '04 function_call_keyword');
INSERT INTO t1 VALUES ('create', '05 Reserved keyword');
CALL p2('SELECT @@$(VAR)');
--------
SELECT @@non_keyword; -- Unknown system variable 'non_keyword'
--------
SELECT @@lpad; -- Unknown system variable 'lpad'
--------
SELECT @@rpad; -- Unknown system variable 'rpad'
--------
SELECT @@adddate; -- Unknown system variable 'adddate'
--------
SELECT @@substr; -- Unknown system variable 'substr'
--------
SELECT @@substring; -- Unknown system variable 'substring'
--------
SELECT @@trim_oracle; -- Unknown system variable 'trim_oracle'
--------
SELECT @@ascii; -- Unknown system variable 'ascii'
--------
SELECT @@replace; -- ..syntax.. near 'replace' at line 1
--------
SELECT @@weight_string; -- Unknown system variable 'weight_string'
--------
SELECT @@char; -- ..syntax.. near 'char' at line 1
--------
SELECT @@trim; -- Unknown system variable 'trim'
--------
SELECT @@year; -- Unknown system variable 'year'
--------
SELECT @@create; -- ..syntax.. near 'create' at line 1
CALL p2('SELECT @@global.$(VAR)');
--------
SELECT @@global.non_keyword; -- Unknown system variable 'non_keyword'
--------
SELECT @@global.lpad; -- Unknown system variable 'lpad'
--------
SELECT @@global.rpad; -- Unknown system variable 'rpad'
--------
SELECT @@global.adddate; -- Unknown system variable 'adddate'
--------
SELECT @@global.substr; -- Unknown system variable 'substr'
--------
SELECT @@global.substring; -- Unknown system variable 'substring'
--------
SELECT @@global.trim_oracle; -- Unknown system variable 'trim_oracle'
--------
SELECT @@global.ascii; -- Unknown system variable 'ascii'
--------
SELECT @@global.replace; -- Unknown system variable 'replace'
--------
SELECT @@global.weight_string; -- Unknown system variable 'weight_string'
--------
SELECT @@global.char; -- Unknown system variable 'char'
--------
SELECT @@global.trim; -- Unknown system variable 'trim'
--------
SELECT @@global.year; -- Unknown system variable 'year'
--------
SELECT @@global.create; -- Unknown system variable 'create'
CALL p2('SELECT @@global.$(VAR)()');
--------
SELECT @@global.non_keyword(); -- Unknown system variable 'non_keyword'
--------
SELECT @@global.lpad(); -- Unknown system variable 'lpad'
--------
SELECT @@global.rpad(); -- Unknown system variable 'rpad'
--------
SELECT @@global.adddate(); -- Unknown system variable 'adddate'
--------
SELECT @@global.substr(); -- ..syntax.. near 'substr()' at line 1
--------
SELECT @@global.substring(); -- ..syntax.. near 'substring()' at line 1
--------
SELECT @@global.trim_oracle(); -- Unknown system variable 'trim_oracle'
--------
SELECT @@global.ascii(); -- Unknown system variable 'ascii'
--------
SELECT @@global.replace(); -- ..syntax.. near 'replace()' at line 1
--------
SELECT @@global.weight_string(); -- Unknown system variable 'weight_string'
--------
SELECT @@global.char(); -- Unknown system variable 'char'
--------
SELECT @@global.trim(); -- ..syntax.. near 'trim()' at line 1
--------
SELECT @@global.year(); -- Unknown system variable 'year'
--------
SELECT @@global.create(); -- Unknown system variable 'create'
CALL p2('SELECT $(VAR)()');
--------
SELECT non_keyword(); -- FUNCTION test.non_keyword does not exist
--------
SELECT lpad(); -- Incorrect parameter count in the call to
--------
SELECT rpad(); -- Incorrect parameter count in the call to
--------
SELECT adddate(); -- ..syntax.. near ')' at line 1
--------
SELECT substr(); -- ..syntax.. near ')' at line 1
--------
SELECT substring(); -- ..syntax.. near ')' at line 1
--------
SELECT trim_oracle(); -- ..syntax.. near ')' at line 1
--------
SELECT ascii(); -- ..syntax.. near ')' at line 1
--------
SELECT replace(); -- ..syntax.. near ')' at line 1
--------
SELECT weight_string(); -- ..syntax.. near ')' at line 1
--------
SELECT char(); -- ..syntax.. near ')' at line 1
--------
SELECT trim(); -- ..syntax.. near ')' at line 1
--------
SELECT year(); -- ..syntax.. near ')' at line 1
--------
SELECT create(); -- ..syntax.. near 'create()' at line 1
CALL p2('SELECT test.$(VAR)()');
--------
SELECT test.non_keyword(); -- FUNCTION test.non_keyword does not exist
--------
SELECT test.lpad(); -- FUNCTION test.lpad does not exist
--------
SELECT test.rpad(); -- FUNCTION test.rpad does not exist
--------
SELECT test.adddate(); -- FUNCTION test.adddate does not exist. Ch
--------
SELECT test.substr(); -- FUNCTION test.substr does not exist. Che
--------
SELECT test.substring(); -- FUNCTION test.substring does not exist.
--------
SELECT test.trim_oracle(); -- FUNCTION test.trim_oracle does not exist
--------
SELECT test.ascii(); -- FUNCTION test.ascii does not exist. Chec
--------
SELECT test.replace(); -- FUNCTION test.replace does not exist. Ch
--------
SELECT test.weight_string(); -- FUNCTION test.weight_string does not exi
--------
SELECT test.char(); -- FUNCTION test.char does not exist. Check
--------
SELECT test.trim(); -- FUNCTION test.trim does not exist. Check
--------
SELECT test.year(); -- FUNCTION test.year does not exist. Check
--------
SELECT test.create(); -- FUNCTION test.create does not exist. Che
CALL p2('SELECT $(VAR) FROM t1');
--------
SELECT non_keyword FROM t1; -- Unknown column 'non_keyword' in 'SELECT'
--------
SELECT lpad FROM t1; -- Unknown column 'lpad' in 'SELECT'
--------
SELECT rpad FROM t1; -- Unknown column 'rpad' in 'SELECT'
--------
SELECT adddate FROM t1; -- Unknown column 'adddate' in 'SELECT'
--------
SELECT substr FROM t1; -- Unknown column 'substr' in 'SELECT'
--------
SELECT substring FROM t1; -- Unknown column 'substring' in 'SELECT'
--------
SELECT trim_oracle FROM t1; -- Unknown column 'trim_oracle' in 'SELECT'
--------
SELECT ascii FROM t1; -- Unknown column 'ascii' in 'SELECT'
--------
SELECT replace FROM t1; -- ..syntax.. near 'FROM t1' at line 1
--------
SELECT weight_string FROM t1; -- Unknown column 'weight_string' in 'SELEC
--------
SELECT char FROM t1; -- ..syntax.. near 'FROM t1' at line 1
--------
SELECT trim FROM t1; -- Unknown column 'trim' in 'SELECT'
--------
SELECT year FROM t1; -- Unknown column 'year' in 'SELECT'
--------
SELECT create FROM t1; -- ..syntax.. near 'create FROM t1' at line
CALL p2('SELECT t1.$(VAR) FROM t1');
--------
SELECT t1.non_keyword FROM t1; -- Unknown column 't1.non_keyword' in 'SELE
--------
SELECT t1.lpad FROM t1; -- Unknown column 't1.lpad' in 'SELECT'
--------
SELECT t1.rpad FROM t1; -- Unknown column 't1.rpad' in 'SELECT'
--------
SELECT t1.adddate FROM t1; -- Unknown column 't1.adddate' in 'SELECT'
--------
SELECT t1.substr FROM t1; -- Unknown column 't1.substr' in 'SELECT'
--------
SELECT t1.substring FROM t1; -- Unknown column 't1.substring' in 'SELECT
--------
SELECT t1.trim_oracle FROM t1; -- Unknown column 't1.trim_oracle' in 'SELE
--------
SELECT t1.ascii FROM t1; -- Unknown column 't1.ascii' in 'SELECT'
--------
SELECT t1.replace FROM t1; -- Unknown column 't1.replace' in 'SELECT'
--------
SELECT t1.weight_string FROM t1; -- Unknown column 't1.weight_string' in 'SE
--------
SELECT t1.char FROM t1; -- Unknown column 't1.char' in 'SELECT'
--------
SELECT t1.trim FROM t1; -- Unknown column 't1.trim' in 'SELECT'
--------
SELECT t1.year FROM t1; -- Unknown column 't1.year' in 'SELECT'
--------
SELECT t1.create FROM t1; -- Unknown column 't1.create' in 'SELECT'
CALL p2('DROP TABLE $(VAR)');
--------
DROP TABLE non_keyword; -- Unknown table 'test.non_keyword'
--------
DROP TABLE lpad; -- Unknown table 'test.lpad'
--------
DROP TABLE rpad; -- Unknown table 'test.rpad'
--------
DROP TABLE adddate; -- Unknown table 'test.adddate'
--------
DROP TABLE substr; -- Unknown table 'test.substr'
--------
DROP TABLE substring; -- Unknown table 'test.substring'
--------
DROP TABLE trim_oracle; -- Unknown table 'test.trim_oracle'
--------
DROP TABLE ascii; -- Unknown table 'test.ascii'
--------
DROP TABLE replace; -- ..syntax.. near 'replace' at line 1
--------
DROP TABLE weight_string; -- Unknown table 'test.weight_string'
--------
DROP TABLE char; -- ..syntax.. near 'char' at line 1
--------
DROP TABLE trim; -- Unknown table 'test.trim'
--------
DROP TABLE year; -- Unknown table 'test.year'
--------
DROP TABLE create; -- ..syntax.. near 'create' at line 1
CALL p2('DROP TABLE test.$(VAR)');
--------
DROP TABLE test.non_keyword; -- Unknown table 'test.non_keyword'
--------
DROP TABLE test.lpad; -- Unknown table 'test.lpad'
--------
DROP TABLE test.rpad; -- Unknown table 'test.rpad'
--------
DROP TABLE test.adddate; -- Unknown table 'test.adddate'
--------
DROP TABLE test.substr; -- Unknown table 'test.substr'
--------
DROP TABLE test.substring; -- Unknown table 'test.substring'
--------
DROP TABLE test.trim_oracle; -- Unknown table 'test.trim_oracle'
--------
DROP TABLE test.ascii; -- Unknown table 'test.ascii'
--------
DROP TABLE test.replace; -- Unknown table 'test.replace'
--------
DROP TABLE test.weight_string; -- Unknown table 'test.weight_string'
--------
DROP TABLE test.char; -- Unknown table 'test.char'
--------
DROP TABLE test.trim; -- Unknown table 'test.trim'
--------
DROP TABLE test.year; -- Unknown table 'test.year'
--------
DROP TABLE test.create; -- Unknown table 'test.create'
CALL p2('CREATE FUNCTION $(VAR)() RETURNS OOPS');
--------
CREATE FUNCTION non_keyword() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION lpad() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION rpad() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION adddate() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION substr() RETURNS OOPS; -- ..syntax.. near 'substr() RETURNS OOPS'
--------
CREATE FUNCTION substring() RETURNS OOPS; -- ..syntax.. near 'substring() RETURNS OOP
--------
CREATE FUNCTION trim_oracle() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION ascii() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION replace() RETURNS OOPS; -- ..syntax.. near 'replace() RETURNS OOPS'
--------
CREATE FUNCTION weight_string() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION char() RETURNS OOPS; -- ..syntax.. near 'char() RETURNS OOPS' at
--------
CREATE FUNCTION trim() RETURNS OOPS; -- ..syntax.. near 'trim() RETURNS OOPS' at
--------
CREATE FUNCTION year() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION create() RETURNS OOPS; -- ..syntax.. near 'create() RETURNS OOPS'
CALL p2('CREATE FUNCTION test.$(VAR)() RETURNS OOPS');
--------
CREATE FUNCTION test.non_keyword() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION test.lpad() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION test.rpad() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION test.adddate() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION test.substr() RETURNS OOPS; -- ..syntax.. near 'substr() RETURNS OOPS'
--------
CREATE FUNCTION test.substring() RETURNS OOPS; -- ..syntax.. near 'substring() RETURNS OOP
--------
CREATE FUNCTION test.trim_oracle() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION test.ascii() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION test.replace() RETURNS OOPS; -- ..syntax.. near 'replace() RETURNS OOPS'
--------
CREATE FUNCTION test.weight_string() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION test.char() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION test.trim() RETURNS OOPS; -- ..syntax.. near 'trim() RETURNS OOPS' at
--------
CREATE FUNCTION test.year() RETURNS OOPS; -- Unknown data type: 'OOPS'
--------
CREATE FUNCTION test.create() RETURNS OOPS; -- Unknown data type: 'OOPS'
CALL p2('DROP FUNCTION $(VAR)');
--------
DROP FUNCTION non_keyword; -- FUNCTION test.non_keyword does not exist
--------
DROP FUNCTION lpad; -- FUNCTION test.lpad does not exist
--------
DROP FUNCTION rpad; -- FUNCTION test.rpad does not exist
--------
DROP FUNCTION adddate; -- FUNCTION test.adddate does not exist
--------
DROP FUNCTION substr; -- FUNCTION test.substr does not exist
--------
DROP FUNCTION substring; -- FUNCTION test.substring does not exist
--------
DROP FUNCTION trim_oracle; -- FUNCTION test.trim_oracle does not exist
--------
DROP FUNCTION ascii; -- FUNCTION test.ascii does not exist
--------
DROP FUNCTION replace; -- ..syntax.. near 'replace' at line 1
--------
DROP FUNCTION weight_string; -- FUNCTION test.weight_string does not exi
--------
DROP FUNCTION char; -- ..syntax.. near 'char' at line 1
--------
DROP FUNCTION trim; -- FUNCTION test.trim does not exist
--------
DROP FUNCTION year; -- FUNCTION test.year does not exist
--------
DROP FUNCTION create; -- ..syntax.. near 'create' at line 1
CALL p2('DROP FUNCTION test.$(VAR)');
--------
DROP FUNCTION test.non_keyword; -- FUNCTION test.non_keyword does not exist
--------
DROP FUNCTION test.lpad; -- FUNCTION test.lpad does not exist
--------
DROP FUNCTION test.rpad; -- FUNCTION test.rpad does not exist
--------
DROP FUNCTION test.adddate; -- FUNCTION test.adddate does not exist
--------
DROP FUNCTION test.substr; -- FUNCTION test.substr does not exist
--------
DROP FUNCTION test.substring; -- FUNCTION test.substring does not exist
--------
DROP FUNCTION test.trim_oracle; -- FUNCTION test.trim_oracle does not exist
--------
DROP FUNCTION test.ascii; -- FUNCTION test.ascii does not exist
--------
DROP FUNCTION test.replace; -- FUNCTION test.replace does not exist
--------
DROP FUNCTION test.weight_string; -- FUNCTION test.weight_string does not exi
--------
DROP FUNCTION test.char; -- FUNCTION test.char does not exist
--------
DROP FUNCTION test.trim; -- FUNCTION test.trim does not exist
--------
DROP FUNCTION test.year; -- FUNCTION test.year does not exist
--------
DROP FUNCTION test.create; -- FUNCTION test.create does not exist
DROP TABLE t1;
DROP PROCEDURE p1;
DROP PROCEDURE p2;
|