github.com/team-ide/go-dialect@v1.9.20/vitess/sqlparser/testdata/select_cases.txt (about) 1 INPUT 2 select round(5.5),round(-5.5); 3 END 4 OUTPUT 5 select round(5.5), round(-5.5) from dual 6 END 7 INPUT 8 select concat(a, if(b>10, _utf8 0xC3A6, _utf8 0xC3AF)) from t1; 9 END 10 OUTPUT 11 select concat(a, if(b > 10, _utf8 0xC3A6, _utf8 0xC3AF)) from t1 12 END 13 INPUT 14 select a as 'x', t1.*, b as 'x' from t1; 15 END 16 OUTPUT 17 select a as x, t1.*, b as x from t1 18 END 19 INPUT 20 select t1.name, t2.name, t2.id from t1 left join t2 on (t1.id = t2.owner); 21 END 22 OUTPUT 23 select t1.`name`, t2.`name`, t2.id from t1 left join t2 on t1.id = t2.owner 24 END 25 INPUT 26 select from ((t1 natural join t2), (t3 natural join t4)) natural join t5; 27 END 28 ERROR 29 syntax error at position 12 near 'from' 30 END 31 INPUT 32 select ref_mag from t1 where match ref_mag against ('+test' in boolean mode); 33 END 34 ERROR 35 syntax error at position 43 near 'ref_mag' 36 END 37 INPUT 38 select week(20010101,0) as '0', week(20010101,1) as '1', week(20010101,2) as '2', week(20010101,3) as '3', week(20010101,4) as '4', week(20010101,5) as '5', week(20010101,6) as '6', week(20010101,7) as '7'; 39 END 40 OUTPUT 41 select week(20010101, 0) as `0`, week(20010101, 1) as `1`, week(20010101, 2) as `2`, week(20010101, 3) as `3`, week(20010101, 4) as `4`, week(20010101, 5) as `5`, week(20010101, 6) as `6`, week(20010101, 7) as `7` from dual 42 END 43 INPUT 44 select a1,a2,b, max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b; 45 END 46 OUTPUT 47 select a1, a2, b, max(c) from t1 where c < 'a0' or c > 'b1' group by a1, a2, b 48 END 49 INPUT 50 select from t1 left join t2 on venue_id = entity_id where match(name) against('aberdeen' in boolean mode) and dt = '2003-05-23 19:30:00'; 51 END 52 ERROR 53 syntax error at position 12 near 'from' 54 END 55 INPUT 56 select t1.name, t2.name, t2.id from t1 left join t2 on (t1.id = t2.owner) where t2.id is null; 57 END 58 OUTPUT 59 select t1.`name`, t2.`name`, t2.id from t1 left join t2 on t1.id = t2.owner where t2.id is null 60 END 61 INPUT 62 select to_days("0000-00-00"),to_days(d),to_days(dt),to_days(t),to_days(c) from t1; 63 END 64 OUTPUT 65 select to_days('0000-00-00'), to_days(d), to_days(dt), to_days(t), to_days(c) from t1 66 END 67 INPUT 68 select week(19981231),week(19971231),week(19981231,1),week(19971231,1); 69 END 70 OUTPUT 71 select week(19981231), week(19971231), week(19981231, 1), week(19971231, 1) from dual 72 END 73 INPUT 74 select substring_index('www.tcx.se','tcx',1),substring_index('www.tcx.se','tcx',-1); 75 END 76 OUTPUT 77 select substring_index('www.tcx.se', 'tcx', 1), substring_index('www.tcx.se', 'tcx', -1) from dual 78 END 79 INPUT 80 select 0,256,00000000000000065536,2147483647,-2147483648,2147483648,+4294967296; 81 END 82 OUTPUT 83 select 0, 256, 00000000000000065536, 2147483647, -2147483648, 2147483648, 4294967296 from dual 84 END 85 INPUT 86 select a1, max(c) from t2 where a1 >= 'c' or a1 < 'b' group by a1,a2,b; 87 END 88 OUTPUT 89 select a1, max(c) from t2 where a1 >= 'c' or a1 < 'b' group by a1, a2, b 90 END 91 INPUT 92 select from t1 order by b; 93 END 94 ERROR 95 syntax error at position 12 near 'from' 96 END 97 INPUT 98 select lpad('hello', 4294967296, '1'); 99 END 100 OUTPUT 101 select lpad('hello', 4294967296, '1') from dual 102 END 103 INPUT 104 select from v3 order by a; 105 END 106 ERROR 107 syntax error at position 12 near 'from' 108 END 109 INPUT 110 select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES WHERE ROUTINE_SCHEMA='test' ORDER BY ROUTINE_NAME; 111 END 112 OUTPUT 113 select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES where ROUTINE_SCHEMA = 'test' order by ROUTINE_NAME asc 114 END 115 INPUT 116 select get_lock("test_lock1", 20); 117 END 118 OUTPUT 119 select get_lock('test_lock1', 20) from dual 120 END 121 INPUT 122 select sum(col1) from t1 group by col_t1 having col_t1 in (select sum(t2.col1) from t2 group by t2.col2, t2.col1 having t2.col1 = t1.col1); 123 END 124 OUTPUT 125 select sum(col1) from t1 group by col_t1 having col_t1 in (select sum(t2.col1) from t2 group by t2.col2, t2.col1 having t2.col1 = t1.col1) 126 END 127 INPUT 128 select t,count(*) from t1 group by t order by t limit 10; 129 END 130 OUTPUT 131 select t, count(*) from t1 group by t order by t asc limit 10 132 END 133 INPUT 134 select 'andre%' like 'andreñ%' escape 'ñ'; 135 END 136 OUTPUT 137 select 'andre%' like 'andreñ%' escape 'ñ' from dual 138 END 139 INPUT 140 select inet_aton(""); 141 END 142 OUTPUT 143 select inet_aton('') from dual 144 END 145 INPUT 146 select from t1 where word like 'AE'; 147 END 148 ERROR 149 syntax error at position 12 near 'from' 150 END 151 INPUT 152 select yearweek('1987-01-01',1),yearweek('1987-01-01'); 153 END 154 OUTPUT 155 select yearweek('1987-01-01', 1), yearweek('1987-01-01') from dual 156 END 157 INPUT 158 select date_sub("0069-01-01 00:00:01",INTERVAL 2 SECOND); 159 END 160 OUTPUT 161 select date_sub('0069-01-01 00:00:01', interval 2 SECOND) from dual 162 END 163 INPUT 164 select count(distinct a) from t1 group by b; 165 END 166 OUTPUT 167 select count(distinct a) from t1 group by b 168 END 169 INPUT 170 select insert('hello', 1, 18446744073709551616, 'hi'); 171 END 172 ERROR 173 syntax error at position 14 near 'insert' 174 END 175 INPUT 176 select @sum; 177 END 178 OUTPUT 179 select @sum from dual 180 END 181 INPUT 182 select s1 from t1 group by 1 having 1 = 0; 183 END 184 OUTPUT 185 select s1 from t1 group by 1 having 1 = 0 186 END 187 INPUT 188 select from performance_schema.session_status where variable_name like 'COMPRESSION%' order by 1; 189 END 190 ERROR 191 syntax error at position 12 near 'from' 192 END 193 INPUT 194 select (min(a4)+max(a4))/2 from t1; 195 END 196 OUTPUT 197 select (min(a4) + max(a4)) / 2 from t1 198 END 199 INPUT 200 select from mysqltest1.t11; 201 END 202 ERROR 203 syntax error at position 12 near 'from' 204 END 205 INPUT 206 select c1 from t1 where c2='ZZZZ'; 207 END 208 OUTPUT 209 select c1 from t1 where c2 = 'ZZZZ' 210 END 211 INPUT 212 select from t1 natural join (t3 cross join t4); 213 END 214 ERROR 215 syntax error at position 12 near 'from' 216 END 217 INPUT 218 select from t3 natural right join t2 natural right join t1; 219 END 220 ERROR 221 syntax error at position 12 near 'from' 222 END 223 INPUT 224 select "hep"; 225 END 226 OUTPUT 227 select 'hep' from dual 228 END 229 INPUT 230 select from t1 where match a against ("+aaa* +bbb1*" in boolean mode); 231 END 232 ERROR 233 syntax error at position 12 near 'from' 234 END 235 INPUT 236 select locate('lo','hello',18446744073709551615); 237 END 238 OUTPUT 239 select locate('lo', 'hello', 18446744073709551615) from dual 240 END 241 INPUT 242 select 'andre%' like 'andre�%' escape '�'; 243 END 244 OUTPUT 245 select 'andre%' like 'andre�%' escape '�' from dual 246 END 247 INPUT 248 select week("2000-01-06",0) as '2000', week("2001-01-06",0) as '2001', week("2002-01-06",0) as '2002',week("2003-01-06",0) as '2003', week("2004-01-06",0) as '2004', week("2005-01-06",0) as '2005', week("2006-01-06",0) as '2006'; 249 END 250 OUTPUT 251 select week('2000-01-06', 0) as `2000`, week('2001-01-06', 0) as `2001`, week('2002-01-06', 0) as `2002`, week('2003-01-06', 0) as `2003`, week('2004-01-06', 0) as `2004`, week('2005-01-06', 0) as `2005`, week('2006-01-06', 0) as `2006` from dual 252 END 253 INPUT 254 select @topic3_id:= 10103; 255 END 256 ERROR 257 syntax error at position 19 near ':' 258 END 259 INPUT 260 select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a); 261 END 262 OUTPUT 263 select t1.*, t2.*, t3.a from t1 left join t2 on t3.a = t2.a left join t1 as t3 on t1.a = t3.a 264 END 265 INPUT 266 select from v2 where renamed=1 group by renamed; 267 END 268 ERROR 269 syntax error at position 12 near 'from' 270 END 271 INPUT 272 select get_format(TIMESTAMP, 'eur') as a; 273 END 274 OUTPUT 275 select get_format(`TIMESTAMP`, 'eur') as a from dual 276 END 277 INPUT 278 select mbrwithin(ST_GeomFromText("point(2 4)"), ST_GeomFromText("point(2 4)")); 279 END 280 OUTPUT 281 select mbrwithin(ST_GeomFromText('point(2 4)'), ST_GeomFromText('point(2 4)')) from dual 282 END 283 INPUT 284 select concat(@a, table_name), @a, table_name from information_schema.tables where table_schema = 'test' order by table_name; 285 END 286 OUTPUT 287 select concat(@a, table_name), @a, table_name from information_schema.`tables` where table_schema = 'test' order by table_name asc 288 END 289 INPUT 290 select "a" as col1, "c" as col2; 291 END 292 OUTPUT 293 select 'a' as col1, 'c' as col2 from dual 294 END 295 INPUT 296 select if(1>2,a,avg(a)) from t1; 297 END 298 OUTPUT 299 select if(1 > 2, a, avg(a)) from t1 300 END 301 INPUT 302 select substring_index('aaaaaaaaa1','aaa',3); 303 END 304 OUTPUT 305 select substring_index('aaaaaaaaa1', 'aaa', 3) from dual 306 END 307 INPUT 308 select log2(8),log2(15),log2(-2),log2(0),log2(NULL); 309 END 310 OUTPUT 311 select log2(8), log2(15), log2(-2), log2(0), log2(null) from dual 312 END 313 INPUT 314 select field(NULL,"a",NULL),field(NULL,0,NULL)+0,field(NULL,0.0,NULL)+0.0,field(NULL,0.0e1,NULL)+0.0e1; 315 END 316 OUTPUT 317 select field(null, 'a', null), field(null, 0, null) + 0, field(null, 0.0, null) + 0.0, field(null, 0.0e1, null) + 0.0e1 from dual 318 END 319 INPUT 320 select from t2 order by id; 321 END 322 ERROR 323 syntax error at position 12 near 'from' 324 END 325 INPUT 326 select "strawberry","blueberry","potato"; 327 END 328 OUTPUT 329 select 'strawberry', 'blueberry', 'potato' from dual 330 END 331 INPUT 332 select 1+2; 333 END 334 OUTPUT 335 select 1 + 2 from dual 336 END 337 INPUT 338 select 3 into @v1; 339 END 340 ERROR 341 syntax error at position 18 near 'v1' 342 END 343 INPUT 344 select /lib64/ user, host, db, info from information_schema.processlist where state = 'User lock' and info = 'select get_lock('ee_16407_5', 60)'; 345 END 346 ERROR 347 syntax error at position 9 348 END 349 INPUT 350 select from t1 where a like '%ESKA%'; 351 END 352 ERROR 353 syntax error at position 12 near 'from' 354 END 355 INPUT 356 select 1; 357 END 358 OUTPUT 359 select 1 from dual 360 END 361 INPUT 362 select date,format,concat('',str_to_date(date, format)) as con from t1; 363 END 364 OUTPUT 365 select `date`, `format`, concat('', str_to_date(`date`, `format`)) as con from t1 366 END 367 INPUT 368 select 'A' like 'a' collate utf8_bin; 369 END 370 OUTPUT 371 select 'A' like 'a' collate utf8_bin from dual 372 END 373 INPUT 374 select timestampdiff(SQL_TSI_SECOND, '2001-02-01 12:59:59', '2001-05-01 12:58:58') as a; 375 END 376 OUTPUT 377 select timestampdiff(SQL_TSI_SECOND, '2001-02-01 12:59:59', '2001-05-01 12:58:58') as a from dual 378 END 379 INPUT 380 select concat(f1, 2) a from t1 union select 'x' a from t1; 381 END 382 OUTPUT 383 select concat(f1, 2) as a from t1 union select 'x' as a from t1 384 END 385 INPUT 386 select t2.* as 'with_alias' from t2; 387 END 388 ERROR 389 syntax error at position 15 near 'as' 390 END 391 INPUT 392 select last_insert_id(); 393 END 394 OUTPUT 395 select last_insert_id() from dual 396 END 397 INPUT 398 select a from t1 group by b order by 1; 399 END 400 OUTPUT 401 select a from t1 group by b order by 1 asc 402 END 403 INPUT 404 select locate(_utf8 0xD091, _utf8 0xD0B0D0B1D0B2 collate utf8_bin); 405 END 406 OUTPUT 407 select locate(_utf8 0xD091, _utf8 0xD0B0D0B1D0B2 collate utf8_bin) from dual 408 END 409 INPUT 410 select hex('a'), hex('a '); 411 END 412 OUTPUT 413 select hex('a'), hex('a ') from dual 414 END 415 INPUT 416 select insert("aa",100,1,"b"),insert("aa",1,3,"b"); 417 END 418 ERROR 419 syntax error at position 14 near 'insert' 420 END 421 INPUT 422 select from t1 where MATCH a,b AGAINST ('+(support collections) +foobar*' IN BOOLEAN MODE); 423 END 424 ERROR 425 syntax error at position 12 near 'from' 426 END 427 INPUT 428 select sum(if(num is null,0.00,num)) from t1; 429 END 430 OUTPUT 431 select sum(if(num is null, 0.00, num)) from t1 432 END 433 INPUT 434 select locate('lo','hello',18446744073709551617); 435 END 436 OUTPUT 437 select locate('lo', 'hello', 18446744073709551617) from dual 438 END 439 INPUT 440 select ST_Crosses(ST_GeomFromText('MULTIPOINT(1 0,15 0,10 10)'),ST_GeomFromText('MULTILINESTRING((15 0,20 0,20 20),(10 10,20 20,15 0))')) as result; 441 END 442 OUTPUT 443 select ST_Crosses(ST_GeomFromText('MULTIPOINT(1 0,15 0,10 10)'), ST_GeomFromText('MULTILINESTRING((15 0,20 0,20 20),(10 10,20 20,15 0))')) as result from dual 444 END 445 INPUT 446 select std(s1/s2) from bug22555 where i=1 group by i; 447 END 448 OUTPUT 449 select std(s1 / s2) from bug22555 where i = 1 group by i 450 END 451 INPUT 452 select from INFORMATION_SCHEMA.TABLE_PRIVILEGES WHERE table_schema NOT IN ('sys','mysql'); 453 END 454 ERROR 455 syntax error at position 12 near 'from' 456 END 457 INPUT 458 select count(*) from t1 group by s1 having s1 is null; 459 END 460 OUTPUT 461 select count(*) from t1 group by s1 having s1 is null 462 END 463 INPUT 464 select concat(c1,'�'), concat('�',c1) from t1; 465 END 466 OUTPUT 467 select concat(c1, '�'), concat('�', c1) from t1 468 END 469 INPUT 470 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_slovak_ci; 471 END 472 OUTPUT 473 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_slovak_ci 474 END 475 INPUT 476 select from t1 where match(s) against('par*' in boolean mode); 477 END 478 ERROR 479 syntax error at position 12 near 'from' 480 END 481 INPUT 482 select from t1 where a = 'b' and a != 'b'; 483 END 484 ERROR 485 syntax error at position 12 near 'from' 486 END 487 INPUT 488 select left('aaa','1'); 489 END 490 OUTPUT 491 select left('aaa', '1') from dual 492 END 493 INPUT 494 select from v_bug5719; 495 END 496 ERROR 497 syntax error at position 12 near 'from' 498 END 499 INPUT 500 select -9223372036854775808 -1 as result; 501 END 502 OUTPUT 503 select -9223372036854775808 - 1 as result from dual 504 END 505 INPUT 506 select 'a' union select concat('a', -4); 507 END 508 OUTPUT 509 select 'a' from dual union select concat('a', -4) from dual 510 END 511 INPUT 512 select t1.* as 'with_alias', a as 'x' from t1; 513 END 514 ERROR 515 syntax error at position 15 near 'as' 516 END 517 INPUT 518 select date_add("1997-12-31",INTERVAL "10.09" SECOND_MICROSECOND) as a; 519 END 520 OUTPUT 521 select date_add('1997-12-31', interval '10.09' SECOND_MICROSECOND) as a from dual 522 END 523 INPUT 524 select substring('hello', 18446744073709551616, 1); 525 END 526 OUTPUT 527 select substr('hello', 18446744073709551616, 1) from dual 528 END 529 INPUT 530 select str_to_date( 1, IF(1=1,NULL,NULL) ); 531 END 532 OUTPUT 533 select str_to_date(1, if(1 = 1, null, null)) from dual 534 END 535 INPUT 536 select substring('hello', 1, 4294967296); 537 END 538 OUTPUT 539 select substr('hello', 1, 4294967296) from dual 540 END 541 INPUT 542 select count(not_existing_database.t1.a) from t1; 543 END 544 OUTPUT 545 select count(not_existing_database.t1.a) from t1 546 END 547 INPUT 548 select load_file("lkjlkj"); 549 END 550 OUTPUT 551 select load_file('lkjlkj') from dual 552 END 553 INPUT 554 select substring_index('the king of thethethe.the hill','the',-1); 555 END 556 OUTPUT 557 select substring_index('the king of thethethe.the hill', 'the', -1) from dual 558 END 559 INPUT 560 select from (t1 natural join t2) join (t3 natural join t4) on a = y; 561 END 562 ERROR 563 syntax error at position 12 near 'from' 564 END 565 INPUT 566 select strcmp(_koi8r'a', _latin1'A'); 567 END 568 OUTPUT 569 select strcmp(_koi8r 'a', _latin1 'A') from dual 570 END 571 INPUT 572 select SUBSTRING_INDEX(_latin1'abcdabcdabcd' COLLATE latin1_general_ci,_latin1'd' COLLATE latin1_bin,2); 573 END 574 OUTPUT 575 select SUBSTRING_INDEX(_latin1 'abcdabcdabcd' collate latin1_general_ci, _latin1 'd' collate latin1_bin, 2) from dual 576 END 577 INPUT 578 select inet_aton("122.256"); 579 END 580 OUTPUT 581 select inet_aton('122.256') from dual 582 END 583 INPUT 584 select fld3 from t2 order by fld3 desc limit 5; 585 END 586 OUTPUT 587 select fld3 from t2 order by fld3 desc limit 5 588 END 589 INPUT 590 select substring(concat(t1.str, t2.str), 1, 15) "name" from t1, t2 where t2.id=t1.id order by name; 591 END 592 OUTPUT 593 select substr(concat(t1.str, t2.str), 1, 15) as `name` from t1, t2 where t2.id = t1.id order by `name` asc 594 END 595 INPUT 596 select count(*) from t2 where id2 > 5; 597 END 598 OUTPUT 599 select count(*) from t2 where id2 > 5 600 END 601 INPUT 602 select hex(convert(_ujis 0xA5FE41 using ucs2)); 603 END 604 OUTPUT 605 select hex(convert(_ujis 0xA5FE41 using ucs2)) from dual 606 END 607 INPUT 608 select 0x6a8473fc1c64ce4f2684c05a400c5e7ca4a01a like '%emailin%'; 609 END 610 OUTPUT 611 select 0x6a8473fc1c64ce4f2684c05a400c5e7ca4a01a like '%emailin%' from dual 612 END 613 INPUT 614 select col1 from test limit 1 into tmp; 615 END 616 ERROR 617 syntax error at position 39 near 'tmp' 618 END 619 INPUT 620 select substring_index(null,null,null); 621 END 622 OUTPUT 623 select substring_index(null, null, null) from dual 624 END 625 INPUT 626 select hex(soundex(_utf32 0x000000BF000000C0)); 627 END 628 OUTPUT 629 select hex(soundex(_utf32 0x000000BF000000C0)) from dual 630 END 631 INPUT 632 select from t1 where 'cH' = s1 and s1 <> 'ch'; 633 END 634 ERROR 635 syntax error at position 12 near 'from' 636 END 637 INPUT 638 select from ((t1 natural join t2) natural join t3) natural join t4; 639 END 640 ERROR 641 syntax error at position 12 near 'from' 642 END 643 INPUT 644 select hex(substr(_utf16 0x00e400e5D800DC00,3)); 645 END 646 OUTPUT 647 select hex(substr(_utf16 0x00e400e5D800DC00, 3)) from dual 648 END 649 INPUT 650 select 1+1; 651 END 652 OUTPUT 653 select 1 + 1 from dual 654 END 655 INPUT 656 select verbose_comment, user_host, argument from mysql.general_log join join_test on (mysql.general_log.command_type = join_test.command_type); 657 END 658 OUTPUT 659 select verbose_comment, user_host, argument from mysql.general_log join join_test on mysql.general_log.command_type = join_test.command_type 660 END 661 INPUT 662 select hex(substr(_ucs2 0x00e400e50068,2)); 663 END 664 OUTPUT 665 select hex(substr(_ucs2 0x00e400e50068, 2)) from dual 666 END 667 INPUT 668 select insert('txs',null,null,'hi'),insert(null,null,null,null); 669 END 670 ERROR 671 syntax error at position 14 near 'insert' 672 END 673 INPUT 674 select 'is still running; 675 END 676 ERROR 677 syntax error at position 26 near 'is still running;' 678 END 679 INPUT 680 select count(*) from t1 group by col2 having col2 = 'hello'; 681 END 682 OUTPUT 683 select count(*) from t1 group by col2 having col2 = 'hello' 684 END 685 INPUT 686 select j from v2 where j = 1 into k; 687 END 688 ERROR 689 syntax error at position 36 near 'k' 690 END 691 INPUT 692 select substring('hello', -18446744073709551615, -18446744073709551615); 693 END 694 OUTPUT 695 select substr('hello', -18446744073709551615, -18446744073709551615) from dual 696 END 697 INPUT 698 select concat(':',trim(' m '),':',trim(BOTH FROM ' y '),':',trim('*' FROM '*s*'),':'); 699 END 700 ERROR 701 syntax error at position 49 near 'FROM' 702 END 703 INPUT 704 select ceiling(cast(-2 as unsigned)), ceiling(18446744073709551614), ceiling(-2); 705 END 706 OUTPUT 707 select ceiling(convert(-2, unsigned)), ceiling(18446744073709551614), ceiling(-2) from dual 708 END 709 INPUT 710 select substr(null,null,null),mid(null,null,null); 711 END 712 OUTPUT 713 select substr(null, null, null), mid(null, null, null) from dual 714 END 715 INPUT 716 select from t1 where a=if(b<10,_ucs2 0x00C0,_ucs2 0x0062); 717 END 718 ERROR 719 syntax error at position 12 near 'from' 720 END 721 INPUT 722 select substring('hello', 1, -4294967295); 723 END 724 OUTPUT 725 select substr('hello', 1, -4294967295) from dual 726 END 727 INPUT 728 select if (query_time >= '00:00:01', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log where sql_text = 'select get_lock('bug27638', 2)'; 729 END 730 ERROR 731 syntax error at position 132 near 'bug27638' 732 END 733 INPUT 734 select _latin1'B' in (_latin1'a' collate latin1_bin,_latin1'b'); 735 END 736 OUTPUT 737 select _latin1 'B' in (_latin1 'a' collate latin1_bin, _latin1 'b') from dual 738 END 739 INPUT 740 select date_add(date,INTERVAL "1 1" YEAR_MONTH) from t1; 741 END 742 OUTPUT 743 select date_add(`date`, interval '1 1' YEAR_MONTH) from t1 744 END 745 INPUT 746 select a1, a2, b, min(c), max(c) from t1 group by a1,a2,b; 747 END 748 OUTPUT 749 select a1, a2, b, min(c), max(c) from t1 group by a1, a2, b 750 END 751 INPUT 752 select t1.*, (select t2.* from t2) from t1; 753 END 754 OUTPUT 755 select t1.*, (select t2.* from t2) from t1 756 END 757 INPUT 758 select 6; 759 END 760 OUTPUT 761 select 6 from dual 762 END 763 INPUT 764 select _latin1'B' COLLATE latin1_general_ci in (_latin1'a' COLLATE latin1_bin,_latin1'b'); 765 END 766 OUTPUT 767 select _latin1 'B' collate latin1_general_ci in (_latin1 'a' collate latin1_bin, _latin1 'b') from dual 768 END 769 INPUT 770 select _latin2'1'=1; 771 END 772 OUTPUT 773 select _latin2 '1' = 1 from dual 774 END 775 INPUT 776 select from t1 where word= 0xe4 or word=CAST(0xe4 as CHAR); 777 END 778 ERROR 779 syntax error at position 12 near 'from' 780 END 781 INPUT 782 select from t1 left join t2 on t1.a=t2.a having not (t2.a <=> t1.a); 783 END 784 ERROR 785 syntax error at position 12 near 'from' 786 END 787 INPUT 788 select format(pi(), NULL); 789 END 790 OUTPUT 791 select format(pi(), null) from dual 792 END 793 INPUT 794 select date_add("1997-12-31 23:59:59",INTERVAL "1:1" MINUTE_SECOND); 795 END 796 OUTPUT 797 select date_add('1997-12-31 23:59:59', interval '1:1' MINUTE_SECOND) from dual 798 END 799 INPUT 800 select st_contains(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 801 END 802 OUTPUT 803 select st_contains(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 804 END 805 INPUT 806 select space(-18446744073709551617); 807 END 808 OUTPUT 809 select space(-18446744073709551617) from dual 810 END 811 INPUT 812 select extract(HOUR_MINUTE FROM "10:11:12"); 813 END 814 OUTPUT 815 select extract(hour_minute from '10:11:12') from dual 816 END 817 INPUT 818 select hex(soundex('a')); 819 END 820 OUTPUT 821 select hex(soundex('a')) from dual 822 END 823 INPUT 824 select field(0,NULL,1,0), field("",NULL,"bar",""), field(0.0,NULL,1.0,0.0); 825 END 826 OUTPUT 827 select field(0, null, 1, 0), field('', null, 'bar', ''), field(0.0, null, 1.0, 0.0) from dual 828 END 829 INPUT 830 select from information_schema.table_privileges where table_schema NOT IN ('sys','mysql'); 831 END 832 ERROR 833 syntax error at position 12 near 'from' 834 END 835 INPUT 836 select t1.a, t1.b,t2.a, t2.b from t1 left join t2 on t1.a=t2.a where t1.b=1 and t2.b=1 or t2.a is NULL; 837 END 838 OUTPUT 839 select t1.a, t1.b, t2.a, t2.b from t1 left join t2 on t1.a = t2.a where t1.b = 1 and t2.b = 1 or t2.a is null 840 END 841 INPUT 842 select from tm; 843 END 844 ERROR 845 syntax error at position 12 near 'from' 846 END 847 INPUT 848 select fld3 FROM t2 where (fld3 like "C%" and fld3 = "Chantilly"); 849 END 850 OUTPUT 851 select fld3 from t2 where fld3 like 'C%' and fld3 = 'Chantilly' 852 END 853 INPUT 854 select makedate(100,1); 855 END 856 OUTPUT 857 select makedate(100, 1) from dual 858 END 859 INPUT 860 select ST_astext(ST_intersection(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 1 1, 0 2, 0 0))'))); 861 END 862 OUTPUT 863 select ST_astext(ST_intersection(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 1 1, 0 2, 0 0))'))) from dual 864 END 865 INPUT 866 select from t1 left join t2 on m_id = id where match(d, e, f) against ('+aword +bword' in boolean mode); 867 END 868 ERROR 869 syntax error at position 12 near 'from' 870 END 871 INPUT 872 select a2 from ((t1 natural join t2) join t3 on b=c1) natural join t4; 873 END 874 OUTPUT 875 select a2 from ((t1 natural join t2) join t3 on b = c1) natural join t4 876 END 877 INPUT 878 select "put something into general_log"; 879 END 880 OUTPUT 881 select 'put something into general_log' from dual 882 END 883 INPUT 884 select subdate("1997-12-31 23:59:59.000001", 10); 885 END 886 OUTPUT 887 select subdate('1997-12-31 23:59:59.000001', 10) from dual 888 END 889 INPUT 890 select col1 as count_col1 from t1 as tmp1 group by col1 having col1 = 10; 891 END 892 OUTPUT 893 select col1 as count_col1 from t1 as tmp1 group by col1 having col1 = 10 894 END 895 INPUT 896 select date_add(date,INTERVAL "1" WEEK) from t1; 897 END 898 OUTPUT 899 select date_add(`date`, interval '1' WEEK) from t1 900 END 901 INPUT 902 select timestampdiff(month,'2004-09-11','2004-09-11'); 903 END 904 OUTPUT 905 select timestampdiff(month, '2004-09-11', '2004-09-11') from dual 906 END 907 INPUT 908 select from t3 join (t2 outr2 join t2 outr join t1) on (outr.pk = t3.pk) and (t1.col_int_key = t3.pk) and isnull(t1.col_date_key) and (outr2.pk <> t3.pk); 909 END 910 ERROR 911 syntax error at position 12 near 'from' 912 END 913 INPUT 914 select a.CONSTRAINT_SCHEMA, b.TABLE_NAME, CONSTRAINT_TYPE, b.CONSTRAINT_NAME, UNIQUE_CONSTRAINT_SCHEMA, UNIQUE_CONSTRAINT_NAME, MATCH_OPTION, UPDATE_RULE, DELETE_RULE, b.REFERENCED_TABLE_NAME from information_schema.TABLE_CONSTRAINTS a, information_schema.REFERENTIAL_CONSTRAINTS b where a.CONSTRAINT_SCHEMA COLLATE UTF8_GENERAL_CI = 'test' and a.CONSTRAINT_SCHEMA COLLATE UTF8_GENERAL_CI = b.CONSTRAINT_SCHEMA and a.CONSTRAINT_NAME = b.CONSTRAINT_NAME; 915 END 916 OUTPUT 917 select a.CONSTRAINT_SCHEMA, b.TABLE_NAME, CONSTRAINT_TYPE, b.CONSTRAINT_NAME, UNIQUE_CONSTRAINT_SCHEMA, UNIQUE_CONSTRAINT_NAME, MATCH_OPTION, UPDATE_RULE, DELETE_RULE, b.REFERENCED_TABLE_NAME from information_schema.TABLE_CONSTRAINTS as a, information_schema.REFERENTIAL_CONSTRAINTS as b where a.CONSTRAINT_SCHEMA collate UTF8_GENERAL_CI = 'test' and a.CONSTRAINT_SCHEMA collate UTF8_GENERAL_CI = b.CONSTRAINT_SCHEMA and a.CONSTRAINT_NAME = b.CONSTRAINT_NAME 918 END 919 INPUT 920 select from t2 order by a,b; 921 END 922 ERROR 923 syntax error at position 12 near 'from' 924 END 925 INPUT 926 select _latin1'B' between _latin1'a' and _latin1'c' collate latin1_bin; 927 END 928 OUTPUT 929 select _latin1 'B' between _latin1 'a' and _latin1 'c' collate latin1_bin from dual 930 END 931 INPUT 932 select min(a1) from t1 where a1 > 'KKK'; 933 END 934 OUTPUT 935 select min(a1) from t1 where a1 > 'KKK' 936 END 937 INPUT 938 select ST_astext(fn3()); 939 END 940 OUTPUT 941 select ST_astext(fn3()) from dual 942 END 943 INPUT 944 select 1 | -1, 1 ^ -1, 1 & -1; 945 END 946 OUTPUT 947 select 1 | -1, 1 ^ -1, 1 & -1 from dual 948 END 949 INPUT 950 select hex(s2) from t1; 951 END 952 OUTPUT 953 select hex(s2) from t1 954 END 955 INPUT 956 select 0 | -1, 0 ^ -1, 0 & -1; 957 END 958 OUTPUT 959 select 0 | -1, 0 ^ -1, 0 & -1 from dual 960 END 961 INPUT 962 select from words; 963 END 964 ERROR 965 syntax error at position 12 near 'from' 966 END 967 INPUT 968 select from t1, t2 where t1.value64=17156792991891826145 and t2.value64=t1.value64; 969 END 970 ERROR 971 syntax error at position 12 near 'from' 972 END 973 INPUT 974 select cast(s1 as decimal(7,2)) from t1; 975 END 976 OUTPUT 977 select convert(s1, decimal(7, 2)) from t1 978 END 979 INPUT 980 select 3 from (select 1) as qn, (select 2) as QN; 981 END 982 OUTPUT 983 select 3 from (select 1 from dual) as qn, (select 2 from dual) as QN 984 END 985 INPUT 986 select count(*) from t1 where match a against ('aaaxxx'); 987 END 988 ERROR 989 syntax error at position 38 near 'a' 990 END 991 INPUT 992 select benchmark(100, NULL); 993 END 994 OUTPUT 995 select benchmark(100, null) from dual 996 END 997 INPUT 998 select cast("1:2:3" as TIME); 999 END 1000 OUTPUT 1001 select convert('1:2:3', TIME) from dual 1002 END 1003 INPUT 1004 select soundex(_utf8 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB); 1005 END 1006 OUTPUT 1007 select soundex(_utf8 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB) from dual 1008 END 1009 INPUT 1010 select t1.a, (case t1.a when 0 then 0 else t1.b end) d from t1 join t2 on t1.a=t2.c where b=11120436154190595086 order by d; 1011 END 1012 OUTPUT 1013 select t1.a, case t1.a when 0 then 0 else t1.b end as d from t1 join t2 on t1.a = t2.c where b = 11120436154190595086 order by d asc 1014 END 1015 INPUT 1016 select date_sub("90-01-01 00:00:01",INTERVAL 2 SECOND); 1017 END 1018 OUTPUT 1019 select date_sub('90-01-01 00:00:01', interval 2 SECOND) from dual 1020 END 1021 INPUT 1022 select grp,group_concat(distinct c order by c) from t1 group by grp; 1023 END 1024 OUTPUT 1025 select grp, group_concat(distinct c order by c asc) from t1 group by grp 1026 END 1027 INPUT 1028 select from t1 where xxx regexp('is a test of some long text to '); 1029 END 1030 ERROR 1031 syntax error at position 12 near 'from' 1032 END 1033 INPUT 1034 select repeat('hello', 18446744073709551615); 1035 END 1036 OUTPUT 1037 select repeat('hello', 18446744073709551615) from dual 1038 END 1039 INPUT 1040 select t1.a, group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a) desc) as grp from t1 group by 1; 1041 END 1042 OUTPUT 1043 select t1.a, group_concat(c order by (select mid(group_concat(c order by a asc), 1, 5) from t2 where t2.a = t1.a) desc) as grp from t1 group by 1 1044 END 1045 INPUT 1046 select a as like_lll from t1 where a like 'lll%'; 1047 END 1048 OUTPUT 1049 select a as like_lll from t1 where a like 'lll%' 1050 END 1051 INPUT 1052 select from t1 where upper(b)='BBB'; 1053 END 1054 ERROR 1055 syntax error at position 12 near 'from' 1056 END 1057 INPUT 1058 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name like 't%' order by table_name; 1059 END 1060 OUTPUT 1061 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name like 't%' order by table_name asc 1062 END 1063 INPUT 1064 select t1.col1 from t1 where t1.col2 in (select t2.col2 from t2 group by t2.col1, t2.col2 having col_t1 <= 10) group by col_t1 having col_t1 <= 20; 1065 END 1066 OUTPUT 1067 select t1.col1 from t1 where t1.col2 in (select t2.col2 from t2 group by t2.col1, t2.col2 having col_t1 <= 10) group by col_t1 having col_t1 <= 20 1068 END 1069 INPUT 1070 select right('hello',null),right(null,1),right(null,null); 1071 END 1072 OUTPUT 1073 select right('hello', null), right(null, 1), right(null, null) from dual 1074 END 1075 INPUT 1076 select from `information_schema`.`REFERENTIAL_CONSTRAINTS` where `CONSTRAINT_SCHEMA` = NULL; 1077 END 1078 ERROR 1079 syntax error at position 12 near 'from' 1080 END 1081 INPUT 1082 select truncate(52.64,1),truncate(52.64,2),truncate(52.64,-1),truncate(52.64,-2), truncate(-52.64,1),truncate(-52.64,-1); 1083 END 1084 OUTPUT 1085 select truncate(52.64, 1), truncate(52.64, 2), truncate(52.64, -1), truncate(52.64, -2), truncate(-52.64, 1), truncate(-52.64, -1) from dual 1086 END 1087 INPUT 1088 select substring('hello', 4294967295, 1); 1089 END 1090 OUTPUT 1091 select substr('hello', 4294967295, 1) from dual 1092 END 1093 INPUT 1094 select cast(@v1 as decimal(22, 2)); 1095 END 1096 OUTPUT 1097 select convert(@v1, decimal(22, 2)) from dual 1098 END 1099 INPUT 1100 select count(a) from t1 where a >= 10; 1101 END 1102 OUTPUT 1103 select count(a) from t1 where a >= 10 1104 END 1105 INPUT 1106 select from information_schema.USER_PRIVILEGES where grantee like '%mysqltest_1%'; 1107 END 1108 ERROR 1109 syntax error at position 12 near 'from' 1110 END 1111 INPUT 1112 select text1, length(text1) from t1 where text1='teststring' or text1 >= 'teststring '; 1113 END 1114 OUTPUT 1115 select text1, length(text1) from t1 where text1 = 'teststring' or text1 >= 'teststring\t' 1116 END 1117 INPUT 1118 select 141427 + datediff(curdate(),'1970-01-01') into @my_uuid_synthetic; 1119 END 1120 ERROR 1121 syntax error at position 73 near 'my_uuid_synthetic' 1122 END 1123 INPUT 1124 select makedate(1997,0); 1125 END 1126 OUTPUT 1127 select makedate(1997, 0) from dual 1128 END 1129 INPUT 1130 select from mysqltest.mysqltest; 1131 END 1132 ERROR 1133 syntax error at position 12 near 'from' 1134 END 1135 INPUT 1136 select c, substring_index(lcase(c), @q:=',', -1) as res from t1; 1137 END 1138 ERROR 1139 syntax error at position 40 near ':' 1140 END 1141 INPUT 1142 select concat(a, if(b>10, _utf8mb4'æ', _utf8mb4'ß')) from t1; 1143 END 1144 OUTPUT 1145 select concat(a, if(b > 10, _utf8mb4 'æ', _utf8mb4 'ß')) from t1 1146 END 1147 INPUT 1148 select a, group_concat(b order by b) from t1 group by a with rollup; 1149 END 1150 ERROR 1151 syntax error at position 61 near 'with' 1152 END 1153 INPUT 1154 select t1.a, t2.a, t2.b, bit_count(t2.b) from t1 left join t2 on t1.a=t2.a; 1155 END 1156 OUTPUT 1157 select t1.a, t2.a, t2.b, bit_count(t2.b) from t1 left join t2 on t1.a = t2.a 1158 END 1159 INPUT 1160 select substring_index(c1,'����',2) from t1; 1161 END 1162 OUTPUT 1163 select substring_index(c1, '����', 2) from t1 1164 END 1165 INPUT 1166 select a from t1 where mid(a+0,6,3) in ( mid(20040106123400,6,3) ); 1167 END 1168 OUTPUT 1169 select a from t1 where mid(a + 0, 6, 3) in (mid(20040106123400, 6, 3)) 1170 END 1171 INPUT 1172 select word, word=binary 0xdf as t from t1 having t > 0; 1173 END 1174 OUTPUT 1175 select word, word = binary 0xdf as t from t1 having t > 0 1176 END 1177 INPUT 1178 select ST_astext(st_difference(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); 1179 END 1180 OUTPUT 1181 select ST_astext(st_difference(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual 1182 END 1183 INPUT 1184 select a as like_l from t1 where a like 'l%'; 1185 END 1186 OUTPUT 1187 select a as like_l from t1 where a like 'l%' 1188 END 1189 INPUT 1190 select concat(a, if(b>10, _utf8mb4 0x78, _utf8mb4 0x79)) from t1; 1191 END 1192 OUTPUT 1193 select concat(a, if(b > 10, _utf8mb4 0x78, _utf8mb4 0x79)) from t1 1194 END 1195 INPUT 1196 select from t1 where match a against ("+aaa* +bbb*" in boolean mode); 1197 END 1198 ERROR 1199 syntax error at position 12 near 'from' 1200 END 1201 INPUT 1202 select @keyword3_id:= 10203; 1203 END 1204 ERROR 1205 syntax error at position 21 near ':' 1206 END 1207 INPUT 1208 select from t3 where x = 1 and y < 5 order by y desc; 1209 END 1210 ERROR 1211 syntax error at position 12 near 'from' 1212 END 1213 INPUT 1214 select a1, max(a2) from t1 group by a1; 1215 END 1216 OUTPUT 1217 select a1, max(a2) from t1 group by a1 1218 END 1219 INPUT 1220 select SUBPARTITION_METHOD FROM information_schema.partitions WHERE table_schema="test" AND table_name="t1"; 1221 END 1222 OUTPUT 1223 select SUBPARTITION_METHOD from information_schema.`partitions` where table_schema = 'test' and table_name = 't1' 1224 END 1225 INPUT 1226 select grp,group_concat(a,null) from t1 group by grp; 1227 END 1228 OUTPUT 1229 select grp, group_concat(a, null) from t1 group by grp 1230 END 1231 INPUT 1232 select (@unpaked_keys_size > @paked_keys_size); 1233 END 1234 OUTPUT 1235 select @unpaked_keys_size > @paked_keys_size from dual 1236 END 1237 INPUT 1238 select st_crosses(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 1239 END 1240 OUTPUT 1241 select st_crosses(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 1242 END 1243 INPUT 1244 select ST_astext(st_intersection(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); 1245 END 1246 OUTPUT 1247 select ST_astext(st_intersection(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual 1248 END 1249 INPUT 1250 select distinct t1.a from t1,t2 order by t2.a; 1251 END 1252 OUTPUT 1253 select distinct t1.a from t1, t2 order by t2.a asc 1254 END 1255 INPUT 1256 select from t1 where not(not(not(a > 10))); 1257 END 1258 ERROR 1259 syntax error at position 12 near 'from' 1260 END 1261 INPUT 1262 select 'Glazgo' sounds like 'Liverpool'; 1263 END 1264 ERROR 1265 syntax error at position 28 near 'like' 1266 END 1267 INPUT 1268 select 12 mod null as 'NULL'; 1269 END 1270 OUTPUT 1271 select 12 % null as `NULL` from dual 1272 END 1273 INPUT 1274 select TABLE_NAME from information_schema.views where table_schema='test' order by TABLE_NAME; 1275 END 1276 OUTPUT 1277 select TABLE_NAME from information_schema.views where table_schema = 'test' order by TABLE_NAME asc 1278 END 1279 INPUT 1280 select c from t2 where a = 2 and b = 'val-2' group by c; 1281 END 1282 OUTPUT 1283 select c from t2 where a = 2 and b = 'val-2' group by c 1284 END 1285 INPUT 1286 select maketime(25,11,12); 1287 END 1288 OUTPUT 1289 select maketime(25, 11, 12) from dual 1290 END 1291 INPUT 1292 select t1.a,t4.y from t1,(select t2.a as y from t2,(select t3.b from t3 where t3.a>3) as t5 where t2.b=t5.b) as t4 where t1.a = t4.y; 1293 END 1294 OUTPUT 1295 select t1.a, t4.y from t1, (select t2.a as y from t2, (select t3.b from t3 where t3.a > 3) as t5 where t2.b = t5.b) as t4 where t1.a = t4.y 1296 END 1297 INPUT 1298 select timediff("2005-01-11 15:48:49.999999", "2005-01-11 15:48:50"); 1299 END 1300 OUTPUT 1301 select timediff('2005-01-11 15:48:49.999999', '2005-01-11 15:48:50') from dual 1302 END 1303 INPUT 1304 select hex(_utf32 0x103344); 1305 END 1306 OUTPUT 1307 select hex(_utf32 0x103344) from dual 1308 END 1309 INPUT 1310 select value,description,COUNT(bug_id) from t2 left join t1 on t2.program=t1.product and t2.value=t1.component where program="AAAAA" group by value having COUNT(bug_id) IN (0,2); 1311 END 1312 OUTPUT 1313 select value, description, COUNT(bug_id) from t2 left join t1 on t2.program = t1.product and t2.value = t1.component where program = 'AAAAA' group by value having COUNT(bug_id) in (0, 2) 1314 END 1315 INPUT 1316 select from t1 where s1 < 'K' and s1 = 'Y'; 1317 END 1318 ERROR 1319 syntax error at position 12 near 'from' 1320 END 1321 INPUT 1322 select DATE_ADD(20071108, INTERVAL 1 DAY); 1323 END 1324 OUTPUT 1325 select DATE_ADD(20071108, interval 1 DAY) from dual 1326 END 1327 INPUT 1328 select distinct concat(c1, repeat('xx', 250)) as cc from t2 order by 1; 1329 END 1330 OUTPUT 1331 select distinct concat(c1, repeat('xx', 250)) as cc from t2 order by 1 asc 1332 END 1333 INPUT 1334 select trim(c1 from '�'),trim('�' from c1) from t1; 1335 END 1336 ERROR 1337 syntax error at position 20 near 'from' 1338 END 1339 INPUT 1340 select extract(DAY_MICROSECOND FROM "1999-01-02 10:11:12.000123"); 1341 END 1342 OUTPUT 1343 select extract(day_microsecond from '1999-01-02 10:11:12.000123') from dual 1344 END 1345 INPUT 1346 select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin2 0xa3, 2); 1347 END 1348 OUTPUT 1349 select SUBSTRING_INDEX(_latin1 'abcdabcdabcd', _latin2 0xa3, 2) from dual 1350 END 1351 INPUT 1352 select (ST_aswkb(cast(st_union(multipoint( point(8,6), point(1,-17679), point(-9,-9)), linestring(point(91,12), point(-77,49), point(53,-81)))as char(18)))) in ('1','2'); 1353 END 1354 OUTPUT 1355 select ST_aswkb(convert(st_union(multipoint(point(8, 6), point(1, -17679), point(-9, -9)), linestring(point(91, 12), point(-77, 49), point(53, -81))), char(18))) in ('1', '2') from dual 1356 END 1357 INPUT 1358 select 12%0 as 'NULL'; 1359 END 1360 OUTPUT 1361 select 12 % 0 as `NULL` from dual 1362 END 1363 INPUT 1364 select a1,a2,b, max(c) from t2 where (c < 'k321') group by a1,a2,b; 1365 END 1366 OUTPUT 1367 select a1, a2, b, max(c) from t2 where c < 'k321' group by a1, a2, b 1368 END 1369 INPUT 1370 select bit_and(col), bit_or(col) from t1; 1371 END 1372 OUTPUT 1373 select bit_and(col), bit_or(col) from t1 1374 END 1375 INPUT 1376 select from sakila.film_text where match(title,description) against("SCISSORHANDS"); 1377 END 1378 ERROR 1379 syntax error at position 12 near 'from' 1380 END 1381 INPUT 1382 select time_format(19980131131415,'%H|%I|%k|%l|%i|%p|%r|%S|%T'); 1383 END 1384 OUTPUT 1385 select time_format(19980131131415, '%H|%I|%k|%l|%i|%p|%r|%S|%T') from dual 1386 END 1387 INPUT 1388 select "Det här är svenska" regexp "h[[:alpha:]]+r", "aba" regexp "^(a|b)*$"; 1389 END 1390 OUTPUT 1391 select 'Det här är svenska' regexp 'h[[:alpha:]]+r', 'aba' regexp '^(a|b)*$' from dual 1392 END 1393 INPUT 1394 select std(s1/s2) from bug22555 where i=3 group by i; 1395 END 1396 OUTPUT 1397 select std(s1 / s2) from bug22555 where i = 3 group by i 1398 END 1399 INPUT 1400 select null mod 0 as 'NULL'; 1401 END 1402 OUTPUT 1403 select null % 0 as `NULL` from dual 1404 END 1405 INPUT 1406 select cast("2001-1-1" as DATE), cast("2001-1-1" as DATETIME); 1407 END 1408 OUTPUT 1409 select convert('2001-1-1', DATE), convert('2001-1-1', DATETIME) from dual 1410 END 1411 INPUT 1412 select case when s1 = 0xfffd then 1 else 0 end from t1; 1413 END 1414 OUTPUT 1415 select case when s1 = 0xfffd then 1 else 0 end from t1 1416 END 1417 INPUT 1418 select a from t1 where left(a+0,6) = ( left(20040106,6) ); 1419 END 1420 OUTPUT 1421 select a from t1 where left(a + 0, 6) = left(20040106, 6) 1422 END 1423 INPUT 1424 select from t1 where a like concat("abc","%"); 1425 END 1426 ERROR 1427 syntax error at position 12 near 'from' 1428 END 1429 INPUT 1430 select a1,a2,b,min(c),max(c) from t2 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b; 1431 END 1432 OUTPUT 1433 select a1, a2, b, min(c), max(c) from t2 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and a2 > 'a' group by a1, a2, b 1434 END 1435 INPUT 1436 select locate('lo','hello',-18446744073709551615); 1437 END 1438 OUTPUT 1439 select locate('lo', 'hello', -18446744073709551615) from dual 1440 END 1441 INPUT 1442 select f1 from t1 where date(f1) between cast("2006-1-1" as date) and cast("2006.1.1" as date); 1443 END 1444 OUTPUT 1445 select f1 from t1 where date(f1) between convert('2006-1-1', date) and convert('2006.1.1', date) 1446 END 1447 INPUT 1448 select ST_astext(ST_MPointFromWKB(ST_AsWKB(MultiPoint(Point('0', '-0'),Point('-0', '0'), Point('0', '0'))))) as result; 1449 END 1450 OUTPUT 1451 select ST_astext(ST_MPointFromWKB(ST_AsWKB(MultiPoint(Point('0', '-0'), Point('-0', '0'), Point('0', '0'))))) as result from dual 1452 END 1453 INPUT 1454 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name = 'tm' order by table_name; 1455 END 1456 OUTPUT 1457 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name = 'tm' order by table_name asc 1458 END 1459 INPUT 1460 select strcmp(_koi8r'a', _koi8r'A'); 1461 END 1462 OUTPUT 1463 select strcmp(_koi8r 'a', _koi8r 'A') from dual 1464 END 1465 INPUT 1466 select t1.* from t1; 1467 END 1468 OUTPUT 1469 select t1.* from t1 1470 END 1471 INPUT 1472 select count(*) from t1 where match a against ('aaazzz' in boolean mode); 1473 END 1474 ERROR 1475 syntax error at position 38 near 'a' 1476 END 1477 INPUT 1478 select find_in_set("d","a,b,c"),find_in_set("dd","a,bbb,d"),find_in_set("bb","a,bbb,dd"); 1479 END 1480 OUTPUT 1481 select find_in_set('d', 'a,b,c'), find_in_set('dd', 'a,bbb,d'), find_in_set('bb', 'a,bbb,dd') from dual 1482 END 1483 INPUT 1484 select data_type, character_octet_length, character_maximum_length from information_schema.columns where table_name='t1'; 1485 END 1486 OUTPUT 1487 select data_type, character_octet_length, character_maximum_length from information_schema.`columns` where table_name = 't1' 1488 END 1489 INPUT 1490 select ST_asbinary(g) from t1; 1491 END 1492 OUTPUT 1493 select ST_asbinary(g) from t1 1494 END 1495 INPUT 1496 select from t1 join t2 using(`t1_id`) where match (t1.name, t2.name) against('xxfoo' in boolean mode); 1497 END 1498 ERROR 1499 syntax error at position 12 near 'from' 1500 END 1501 INPUT 1502 select sql_big_result distinct t1.a from t1,t2; 1503 END 1504 ERROR 1505 syntax error at position 31 near 'distinct' 1506 END 1507 INPUT 1508 select from t1 where a = 'b' and a = 'b'; 1509 END 1510 ERROR 1511 syntax error at position 12 near 'from' 1512 END 1513 INPUT 1514 select (select d from t2 where d > a), t1.* from t1; 1515 END 1516 OUTPUT 1517 select (select d from t2 where d > a), t1.* from t1 1518 END 1519 INPUT 1520 select floor(5.5),floor(-5.5); 1521 END 1522 OUTPUT 1523 select floor(5.5), floor(-5.5) from dual 1524 END 1525 INPUT 1526 select timestampdiff(YEAR, '2002-05-01', '2001-01-01') as a; 1527 END 1528 OUTPUT 1529 select timestampdiff(YEAR, '2002-05-01', '2001-01-01') as a from dual 1530 END 1531 INPUT 1532 select ST_AsText(Polygon(LineString(Point(0, 0), Point(1, 0), Point(1,1), Point(0, 1), Point(0, 0)))); 1533 END 1534 OUTPUT 1535 select ST_AsText(Polygon(LineString(Point(0, 0), Point(1, 0), Point(1, 1), Point(0, 1), Point(0, 0)))) from dual 1536 END 1537 INPUT 1538 select get_lock('ee_16407_5', 60); 1539 END 1540 OUTPUT 1541 select get_lock('ee_16407_5', 60) from dual 1542 END 1543 INPUT 1544 select 1=_latin1'1'; 1545 END 1546 OUTPUT 1547 select 1 = _latin1 '1' from dual 1548 END 1549 INPUT 1550 select coercibility(weight_string('test')); 1551 END 1552 OUTPUT 1553 select coercibility(weight_string('test')) from dual 1554 END 1555 INPUT 1556 select from (t1 natural join t2) natural join (t3 natural join t4); 1557 END 1558 ERROR 1559 syntax error at position 12 near 'from' 1560 END 1561 INPUT 1562 select from t2 where MATCH inhalt AGAINST (t2.inhalt); 1563 END 1564 ERROR 1565 syntax error at position 12 near 'from' 1566 END 1567 INPUT 1568 select a from t1 order by rand(10); 1569 END 1570 OUTPUT 1571 select a from t1 order by rand(10) 1572 END 1573 INPUT 1574 select from t1 where MATCH(a,b) AGAINST("+search +(support vector)" IN BOOLEAN MODE); 1575 END 1576 ERROR 1577 syntax error at position 12 near 'from' 1578 END 1579 INPUT 1580 select cast(NULL as decimal(6)) as t1; 1581 END 1582 OUTPUT 1583 select convert(null, decimal(6)) as t1 from dual 1584 END 1585 INPUT 1586 select count(*) from t1 where t like 'a%'; 1587 END 1588 OUTPUT 1589 select count(*) from t1 where t like 'a%' 1590 END 1591 INPUT 1592 select t1.id FROM t2 as ttxt,t1,t1 as ticket2 WHERE ticket2.id = ttxt.ticket AND t1.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar'); 1593 END 1594 OUTPUT 1595 select t1.id from t2 as ttxt, t1, t1 as ticket2 where ticket2.id = ttxt.ticket and t1.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar') 1596 END 1597 INPUT 1598 select t1.b from v1a; 1599 END 1600 OUTPUT 1601 select t1.b from v1a 1602 END 1603 INPUT 1604 select table_schema, table_name, table_comment from information_schema.tables where table_schema like 'mysqltest_%' and table_name like 't_bug44738_%' order by table_name; 1605 END 1606 OUTPUT 1607 select table_schema, table_name, table_comment from information_schema.`tables` where table_schema like 'mysqltest_%' and table_name like 't_bug44738_%' order by table_name asc 1608 END 1609 INPUT 1610 select 12 mod 0 as 'NULL'; 1611 END 1612 OUTPUT 1613 select 12 % 0 as `NULL` from dual 1614 END 1615 INPUT 1616 select right('hello', -18446744073709551616); 1617 END 1618 OUTPUT 1619 select right('hello', -18446744073709551616) from dual 1620 END 1621 INPUT 1622 select st_touches(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))')); 1623 END 1624 OUTPUT 1625 select st_touches(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))')) from dual 1626 END 1627 INPUT 1628 select 'c' like '_' as want0; 1629 END 1630 OUTPUT 1631 select 'c' like '_' as want0 from dual 1632 END 1633 INPUT 1634 select count(distinct concat(x,y)) from t1; 1635 END 1636 OUTPUT 1637 select count(distinct concat(x, y)) from t1 1638 END 1639 INPUT 1640 select length(v) from t1 where v=repeat('a',65530); 1641 END 1642 OUTPUT 1643 select length(v) from t1 where v = repeat('a', 65530) 1644 END 1645 INPUT 1646 select hex(a) from t1 where a = _big5 0xF9DC; 1647 END 1648 OUTPUT 1649 select hex(a) from t1 where a = _big5 0xF9DC 1650 END 1651 INPUT 1652 select count(distinct n2), n1 from t1 group by n1; 1653 END 1654 OUTPUT 1655 select count(distinct n2), n1 from t1 group by n1 1656 END 1657 INPUT 1658 select locate('LO','hello' collate utf8_bin,2); 1659 END 1660 OUTPUT 1661 select locate('LO', 'hello' collate utf8_bin, 2) from dual 1662 END 1663 INPUT 1664 select distinct a1,a1 from t1; 1665 END 1666 OUTPUT 1667 select distinct a1, a1 from t1 1668 END 1669 INPUT 1670 select from t1 where not(a >= 10); 1671 END 1672 ERROR 1673 syntax error at position 12 near 'from' 1674 END 1675 INPUT 1676 select hex(soundex(_utf8 0xD091D092D093)); 1677 END 1678 OUTPUT 1679 select hex(soundex(_utf8 0xD091D092D093)) from dual 1680 END 1681 INPUT 1682 select from t1 where btn like "ff%"; 1683 END 1684 ERROR 1685 syntax error at position 12 near 'from' 1686 END 1687 INPUT 1688 select 1<=>0,0<=>NULL,NULL<=>0; 1689 END 1690 OUTPUT 1691 select 1 <=> 0, 0 <=> null, null <=> 0 from dual 1692 END 1693 INPUT 1694 select left('hello', 18446744073709551616); 1695 END 1696 OUTPUT 1697 select left('hello', 18446744073709551616) from dual 1698 END 1699 INPUT 1700 select timestamp("2001-12-01"); 1701 END 1702 OUTPUT 1703 select timestamp('2001-12-01') from dual 1704 END 1705 INPUT 1706 select default(str), default(strnull), default(intg), default(rel) from t1; 1707 END 1708 OUTPUT 1709 select default(str), default(strnull), default(intg), default(rel) from t1 1710 END 1711 INPUT 1712 select count(c) from t1 where c = 10; 1713 END 1714 OUTPUT 1715 select count(c) from t1 where c = 10 1716 END 1717 INPUT 1718 select hex(CONVERT(@utf84 USING sjis)); 1719 END 1720 OUTPUT 1721 select hex(convert(@utf84 using sjis)) from dual 1722 END 1723 INPUT 1724 select lpad(f1, 12, "-o-/") from t1; 1725 END 1726 OUTPUT 1727 select lpad(f1, 12, '-o-/') from t1 1728 END 1729 INPUT 1730 select max(id) from t1; 1731 END 1732 OUTPUT 1733 select max(id) from t1 1734 END 1735 INPUT 1736 select from v1a natural join v2a; 1737 END 1738 ERROR 1739 syntax error at position 12 near 'from' 1740 END 1741 INPUT 1742 select 1 as a from t1 union all select 1 from dual limit 1; 1743 END 1744 OUTPUT 1745 select 1 as a from t1 union all select 1 from dual limit 1 1746 END 1747 INPUT 1748 select from t1 where a > _latin1 'B' collate latin1_bin; 1749 END 1750 ERROR 1751 syntax error at position 12 near 'from' 1752 END 1753 INPUT 1754 select from (select 1 union select 1) aaa; 1755 END 1756 ERROR 1757 syntax error at position 12 near 'from' 1758 END 1759 INPUT 1760 select from information_schema.STATISTICS where TABLE_SCHEMA = "mysqltest" order by table_name, index_name; 1761 END 1762 ERROR 1763 syntax error at position 12 near 'from' 1764 END 1765 INPUT 1766 select convert(char(0xff,0x8f) using utf8mb4); 1767 END 1768 OUTPUT 1769 select convert(char(0xff, 0x8f) using utf8mb4) from dual 1770 END 1771 INPUT 1772 select definer, event_name from information_schema.events; 1773 END 1774 OUTPUT 1775 select `definer`, event_name from information_schema.events 1776 END 1777 INPUT 1778 select mbrcontains(ST_GeomFromText("polygon((2 2, 10 2, 10 10, 2 10, 2 2))"), ST_GeomFromText("point(2 4)")); 1779 END 1780 OUTPUT 1781 select mbrcontains(ST_GeomFromText('polygon((2 2, 10 2, 10 10, 2 10, 2 2))'), ST_GeomFromText('point(2 4)')) from dual 1782 END 1783 INPUT 1784 select t1.*,t2.* from { oj t2 left outer join t1 on (t1.a=t2.a) }; 1785 END 1786 ERROR 1787 syntax error at position 24 near '{' 1788 END 1789 INPUT 1790 select round(1e1, 2147483648), truncate(1e1, 2147483648); 1791 END 1792 OUTPUT 1793 select round(1e1, 2147483648), truncate(1e1, 2147483648) from dual 1794 END 1795 INPUT 1796 select from information_schema.character_sets order by 1 limit 3; 1797 END 1798 ERROR 1799 syntax error at position 12 near 'from' 1800 END 1801 INPUT 1802 select get_lock('bug27638', 101); 1803 END 1804 OUTPUT 1805 select get_lock('bug27638', 101) from dual 1806 END 1807 INPUT 1808 select 2 || 3; 1809 END 1810 OUTPUT 1811 select 2 or 3 from dual 1812 END 1813 INPUT 1814 select from t1 where word=binary 0xDF; 1815 END 1816 ERROR 1817 syntax error at position 12 near 'from' 1818 END 1819 INPUT 1820 select from ( select from t1 union select from t1) a,(select from t1 union select from t1) b; 1821 END 1822 ERROR 1823 syntax error at position 12 near 'from' 1824 END 1825 INPUT 1826 select find_in_set(binary 'a',binary 'A,B,C'); 1827 END 1828 OUTPUT 1829 select find_in_set(binary 'a', binary 'A,B,C') from dual 1830 END 1831 INPUT 1832 select left('hello', 4294967296); 1833 END 1834 OUTPUT 1835 select left('hello', 4294967296) from dual 1836 END 1837 INPUT 1838 select 2 in (3,2,5,9,5,1),"monty" in ("david","monty","allan"), 1.2 in (1.4,1.2,1.0); 1839 END 1840 OUTPUT 1841 select 2 in (3, 2, 5, 9, 5, 1), 'monty' in ('david', 'monty', 'allan'), 1.2 in (1.4, 1.2, 1.0) from dual 1842 END 1843 INPUT 1844 select from bug20691 order by x asc; 1845 END 1846 ERROR 1847 syntax error at position 12 near 'from' 1848 END 1849 INPUT 1850 select i, count(*), std(e1/e2) from bug22555 group by i order by i; 1851 END 1852 OUTPUT 1853 select i, count(*), std(e1 / e2) from bug22555 group by i order by i asc 1854 END 1855 INPUT 1856 select sleep(@long_query_time + 1); 1857 END 1858 OUTPUT 1859 select sleep(@long_query_time + 1) from dual 1860 END 1861 INPUT 1862 select 'A' = 'a' collate latin2_czech_cs; 1863 END 1864 OUTPUT 1865 select 'A' = 'a' collate latin2_czech_cs from dual 1866 END 1867 INPUT 1868 select f2,group_concat(f1) from t1 group by f2; 1869 END 1870 OUTPUT 1871 select f2, group_concat(f1) from t1 group by f2 1872 END 1873 INPUT 1874 select insert('hello', -18446744073709551615, 1, 'hi'); 1875 END 1876 ERROR 1877 syntax error at position 14 near 'insert' 1878 END 1879 INPUT 1880 select substring('hello', -18446744073709551616, 1); 1881 END 1882 OUTPUT 1883 select substr('hello', -18446744073709551616, 1) from dual 1884 END 1885 INPUT 1886 select STR_TO_DATE('2004.12.12 22.30.61','%Y.%m.%d %T'); 1887 END 1888 OUTPUT 1889 select STR_TO_DATE('2004.12.12 22.30.61', '%Y.%m.%d %T') from dual 1890 END 1891 INPUT 1892 select a, MAX(b), CASE MAX(b) when 4 then 4 when 43 then 43 else 0 end from t1 group by a; 1893 END 1894 OUTPUT 1895 select a, MAX(b), case MAX(b) when 4 then 4 when 43 then 43 else 0 end from t1 group by a 1896 END 1897 INPUT 1898 select from t4 where c1 < f1(); 1899 END 1900 ERROR 1901 syntax error at position 12 near 'from' 1902 END 1903 INPUT 1904 select concat("$",format(2500,2)); 1905 END 1906 OUTPUT 1907 select concat('$', format(2500, 2)) from dual 1908 END 1909 INPUT 1910 select unix_timestamp(from_unixtime(2147483647)); 1911 END 1912 OUTPUT 1913 select unix_timestamp(from_unixtime(2147483647)) from dual 1914 END 1915 INPUT 1916 select 1, max(a) from t1m where a=99; 1917 END 1918 OUTPUT 1919 select 1, max(a) from t1m where a = 99 1920 END 1921 INPUT 1922 select sql_small_result t2.id, avg(rating+0.0e0) from t2 group by t2.id; 1923 END 1924 ERROR 1925 syntax error at position 28 1926 END 1927 INPUT 1928 select 12 % null as 'NULL'; 1929 END 1930 OUTPUT 1931 select 12 % null as `NULL` from dual 1932 END 1933 INPUT 1934 select str_to_date('04/30 /2004', '%m /%d /%Y'); 1935 END 1936 OUTPUT 1937 select str_to_date('04/30 /2004', '%m /%d /%Y') from dual 1938 END 1939 INPUT 1940 select c1,min(c2) as c2 from t1 group by c1 order by c2; 1941 END 1942 OUTPUT 1943 select c1, min(c2) as c2 from t1 group by c1 order by c2 asc 1944 END 1945 INPUT 1946 select from mysqldump_dba.v1; 1947 END 1948 ERROR 1949 syntax error at position 12 near 'from' 1950 END 1951 INPUT 1952 select SUBSTR('abcdefg',-3,2) FROM DUAL; 1953 END 1954 OUTPUT 1955 select substr('abcdefg', -3, 2) from dual 1956 END 1957 INPUT 1958 select @@local.profiling_history_size; 1959 END 1960 OUTPUT 1961 select @@local.profiling_history_size from dual 1962 END 1963 INPUT 1964 select 0 % null as 'NULL'; 1965 END 1966 OUTPUT 1967 select 0 % null as `NULL` from dual 1968 END 1969 INPUT 1970 select hex(b) from t1 order by pk1; 1971 END 1972 OUTPUT 1973 select hex(b) from t1 order by pk1 asc 1974 END 1975 INPUT 1976 select c as c_a from t1 where c='б'; 1977 END 1978 OUTPUT 1979 select c as c_a from t1 where c = 'б' 1980 END 1981 INPUT 1982 select from v3a; 1983 END 1984 ERROR 1985 syntax error at position 12 near 'from' 1986 END 1987 INPUT 1988 select ltrim("a"),rtrim("a"),trim(BOTH "" from "a"),trim(BOTH " " from "a"); 1989 END 1990 ERROR 1991 syntax error at position 47 near 'from' 1992 END 1993 INPUT 1994 select repeat("a",0),repeat("ab",5+5),repeat("ab",-1),reverse(NULL); 1995 END 1996 OUTPUT 1997 select repeat('a', 0), repeat('ab', 5 + 5), repeat('ab', -1), reverse(null) from dual 1998 END 1999 INPUT 2000 select date_add(date,INTERVAL "1:1" HOUR_MINUTE) from t1; 2001 END 2002 OUTPUT 2003 select date_add(`date`, interval '1:1' HOUR_MINUTE) from t1 2004 END 2005 INPUT 2006 select timediff(cast('1 12:00:00' as time), '12:00:00'); 2007 END 2008 OUTPUT 2009 select timediff(convert('1 12:00:00', time), '12:00:00') from dual 2010 END 2011 INPUT 2012 select hex(a), hex(@a:=convert(a using utf8mb4)), hex(convert(@a using utf16)) from t1; 2013 END 2014 ERROR 2015 syntax error at position 23 near ':' 2016 END 2017 INPUT 2018 select event_name from information_schema.events where event_name = 'e1' and sql_mode = @full_mode; 2019 END 2020 OUTPUT 2021 select event_name from information_schema.events where event_name = 'e1' and sql_mode = @full_mode 2022 END 2023 INPUT 2024 select collation(lcase(_latin2'a')), coercibility(lcase(_latin2'a')); 2025 END 2026 OUTPUT 2027 select collation(lcase(_latin2 'a')), coercibility(lcase(_latin2 'a')) from dual 2028 END 2029 INPUT 2030 select date_format('1999-12-31','%x-%v'),date_format('2000-01-01','%x-%v'); 2031 END 2032 OUTPUT 2033 select date_format('1999-12-31', '%x-%v'), date_format('2000-01-01', '%x-%v') from dual 2034 END 2035 INPUT 2036 select mbrwithin(ST_GeomFromText("point(2 4)"), ST_GeomFromText("polygon((2 2, 10 2, 10 10, 2 10, 2 2))")); 2037 END 2038 OUTPUT 2039 select mbrwithin(ST_GeomFromText('point(2 4)'), ST_GeomFromText('polygon((2 2, 10 2, 10 10, 2 10, 2 2))')) from dual 2040 END 2041 INPUT 2042 select locate('HE','hello' collate utf8_bin); 2043 END 2044 OUTPUT 2045 select locate('HE', 'hello' collate utf8_bin) from dual 2046 END 2047 INPUT 2048 select if (query_time >= '00:00:59', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log where sql_text = 'select get_lock('bug27638', 60)'; 2049 END 2050 ERROR 2051 syntax error at position 132 near 'bug27638' 2052 END 2053 INPUT 2054 select row('a','b','c') = row('a','b','c'); 2055 END 2056 OUTPUT 2057 select row('a', 'b', 'c') = row('a', 'b', 'c') from dual 2058 END 2059 INPUT 2060 select ST_Disjoint(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), ST_GeomFromText('POLYGON((10 10, 10 15, 15 15, 15 10, 10 10))')); 2061 END 2062 OUTPUT 2063 select ST_Disjoint(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), ST_GeomFromText('POLYGON((10 10, 10 15, 15 15, 15 10, 10 10))')) from dual 2064 END 2065 INPUT 2066 select insert('hello', -4294967295, 1, 'hi'); 2067 END 2068 ERROR 2069 syntax error at position 14 near 'insert' 2070 END 2071 INPUT 2072 select count(distinct f1,if(1,'',f1)) from t1; 2073 END 2074 OUTPUT 2075 select count(distinct f1, if(1, '', f1)) from t1 2076 END 2077 INPUT 2078 select hex(cast(9007199254740992 as decimal(30,0))); 2079 END 2080 OUTPUT 2081 select hex(convert(9007199254740992, decimal(30, 0))) from dual 2082 END 2083 INPUT 2084 select id, sum(qty) as sqty, count(qty) as cqty from t1 group by id having sqty>2 and cqty>1; 2085 END 2086 OUTPUT 2087 select id, sum(qty) as sqty, count(qty) as cqty from t1 group by id having sqty > 2 and cqty > 1 2088 END 2089 INPUT 2090 select id from t1 group by id; 2091 END 2092 OUTPUT 2093 select id from t1 group by id 2094 END 2095 INPUT 2096 select load_file("/proc/modules"); 2097 END 2098 OUTPUT 2099 select load_file('/proc/modules') from dual 2100 END 2101 INPUT 2102 select insert('hello', 4294967297, 4294967297, 'hi'); 2103 END 2104 ERROR 2105 syntax error at position 14 near 'insert' 2106 END 2107 INPUT 2108 select 1, max(1) from t1i where a=99; 2109 END 2110 OUTPUT 2111 select 1, max(1) from t1i where a = 99 2112 END 2113 INPUT 2114 select CASE 2.0 when 1 then "one" WHEN 2.0 then "two" ELSE "more" END; 2115 END 2116 OUTPUT 2117 select case 2.0 when 1 then 'one' when 2.0 then 'two' else 'more' end from dual 2118 END 2119 INPUT 2120 select 'A' like 'a'; 2121 END 2122 OUTPUT 2123 select 'A' like 'a' from dual 2124 END 2125 INPUT 2126 select count(a) from t1; 2127 END 2128 OUTPUT 2129 select count(a) from t1 2130 END 2131 INPUT 2132 select t1.*, (select a from t2 where d > a) from t1; 2133 END 2134 OUTPUT 2135 select t1.*, (select a from t2 where d > a) from t1 2136 END 2137 INPUT 2138 select makedate(9999,365); 2139 END 2140 OUTPUT 2141 select makedate(9999, 365) from dual 2142 END 2143 INPUT 2144 select a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b; 2145 END 2146 OUTPUT 2147 select a1, a2, b, c from t1 where a2 >= 'b' and b = 'a' and c = 'i121' group by a1, a2, b 2148 END 2149 INPUT 2150 select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3; 2151 END 2152 OUTPUT 2153 select 5.1 % 3, 5.1 % -3, -5.1 % 3, -5.1 % -3 from dual 2154 END 2155 INPUT 2156 select statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statistics.TABLE_SCHEMA, statistics.NON_UNIQUE, statistics.INDEX_SCHEMA, statistics.INDEX_NAME, statistics.SEQ_IN_INDEX, statistics.COLLATION, statistics.SUB_PART, statistics.PACKED, statistics.NULLABLE, statistics.INDEX_TYPE, statistics.COMMENT, columns.TABLE_CATALOG, columns.TABLE_SCHEMA, columns.COLUMN_DEFAULT, columns.IS_NULLABLE, columns.DATA_TYPE, columns.CHARACTER_MAXIMUM_LENGTH, columns.CHARACTER_OCTET_LENGTH, columns.NUMERIC_PRECISION, columns.NUMERIC_SCALE, columns.CHARACTER_SET_NAME, columns.COLLATION_NAME, columns.COLUMN_TYPE, columns.COLUMN_KEY, columns.EXTRA, columns.PRIVILEGES, columns.COLUMN_COMMENT from information_schema.statistics join information_schema.columns using(table_name,column_name) where table_name='user'; 2157 END 2158 OUTPUT 2159 select statistics.TABLE_NAME, statistics.COLUMN_NAME, statistics.TABLE_CATALOG, statistics.TABLE_SCHEMA, statistics.NON_UNIQUE, statistics.INDEX_SCHEMA, statistics.INDEX_NAME, statistics.SEQ_IN_INDEX, statistics.`COLLATION`, statistics.SUB_PART, statistics.PACKED, statistics.NULLABLE, statistics.INDEX_TYPE, statistics.`COMMENT`, `columns`.TABLE_CATALOG, `columns`.TABLE_SCHEMA, `columns`.COLUMN_DEFAULT, `columns`.IS_NULLABLE, `columns`.DATA_TYPE, `columns`.CHARACTER_MAXIMUM_LENGTH, `columns`.CHARACTER_OCTET_LENGTH, `columns`.NUMERIC_PRECISION, `columns`.NUMERIC_SCALE, `columns`.CHARACTER_SET_NAME, `columns`.COLLATION_NAME, `columns`.COLUMN_TYPE, `columns`.COLUMN_KEY, `columns`.EXTRA, `columns`.`PRIVILEGES`, `columns`.COLUMN_COMMENT from information_schema.statistics join information_schema.`columns` using (table_name, column_name) where table_name = 'user' 2160 END 2161 INPUT 2162 select c from t1 where c='cccc'; 2163 END 2164 OUTPUT 2165 select c from t1 where c = 'cccc' 2166 END 2167 INPUT 2168 select substring('hello', -4294967295, -4294967295); 2169 END 2170 OUTPUT 2171 select substr('hello', -4294967295, -4294967295) from dual 2172 END 2173 INPUT 2174 select cast(1.0e+300 as signed int); 2175 END 2176 ERROR 2177 syntax error at position 35 near 'int' 2178 END 2179 INPUT 2180 select mbrwithin(ST_GeomFromText("linestring(1 0, 2 0)"), ST_GeomFromText("linestring(0 0, 3 0)")); 2181 END 2182 OUTPUT 2183 select mbrwithin(ST_GeomFromText('linestring(1 0, 2 0)'), ST_GeomFromText('linestring(0 0, 3 0)')) from dual 2184 END 2185 INPUT 2186 select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin); 2187 END 2188 OUTPUT 2189 select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2 collate utf8mb4_bin) from dual 2190 END 2191 INPUT 2192 select week(20001231,0) as '0', week(20001231,1) as '1', week(20001231,2) as '2', week(20001231,3) as '3', week(20001231,4) as '4', week(20001231,5) as '5', week(20001231,6) as '6', week(20001231,7) as '7'; 2193 END 2194 OUTPUT 2195 select week(20001231, 0) as `0`, week(20001231, 1) as `1`, week(20001231, 2) as `2`, week(20001231, 3) as `3`, week(20001231, 4) as `4`, week(20001231, 5) as `5`, week(20001231, 6) as `6`, week(20001231, 7) as `7` from dual 2196 END 2197 INPUT 2198 select date_sub("1998-01-01 00:00:00",INTERVAL 1 DAY); 2199 END 2200 OUTPUT 2201 select date_sub('1998-01-01 00:00:00', interval 1 DAY) from dual 2202 END 2203 INPUT 2204 select "he"; 2205 END 2206 OUTPUT 2207 select 'he' from dual 2208 END 2209 INPUT 2210 select LENGTH(RANDOM_BYTES(1))=1; 2211 END 2212 OUTPUT 2213 select LENGTH(RANDOM_BYTES(1)) = 1 from dual 2214 END 2215 INPUT 2216 select hex(concat(_utf32 0x0410 collate utf32_general_ci, 0x61)); 2217 END 2218 OUTPUT 2219 select hex(concat(_utf32 0x0410 collate utf32_general_ci, 0x61)) from dual 2220 END 2221 INPUT 2222 select a.id, b.category as catid, b.state as stateid, b.county as countyid from t1 a, t2 b where (a.token = 'a71250b7ed780f6ef3185bfffe027983') and (a.count = b.id) order by a.id; 2223 END 2224 OUTPUT 2225 select a.id, b.category as catid, b.state as stateid, b.county as countyid from t1 as a, t2 as b where a.token = 'a71250b7ed780f6ef3185bfffe027983' and a.count = b.id order by a.id asc 2226 END 2227 INPUT 2228 select sql_data_access from information_schema.routines where specific_name like 'p%' and ROUTINE_SCHEMA != 'sys'; 2229 END 2230 OUTPUT 2231 select sql_data_access from information_schema.routines where specific_name like 'p%' and ROUTINE_SCHEMA != 'sys' 2232 END 2233 INPUT 2234 select strcmp(_koi8r'a' COLLATE koi8r_general_ci, _koi8r'A'); 2235 END 2236 OUTPUT 2237 select strcmp(_koi8r 'a' collate koi8r_general_ci, _koi8r 'A') from dual 2238 END 2239 INPUT 2240 select from v1 group by id limit 0; 2241 END 2242 ERROR 2243 syntax error at position 12 near 'from' 2244 END 2245 INPUT 2246 select char(2557 using utf8mb4); 2247 END 2248 ERROR 2249 syntax error at position 23 near 'using' 2250 END 2251 INPUT 2252 select compress(a), compress(a) from t1; 2253 END 2254 OUTPUT 2255 select compress(a), compress(a) from t1 2256 END 2257 INPUT 2258 select date_add("1997-12-31 23:59:59",INTERVAL 1 YEAR); 2259 END 2260 OUTPUT 2261 select date_add('1997-12-31 23:59:59', interval 1 YEAR) from dual 2262 END 2263 INPUT 2264 select monthname("1972-03-04"),monthname("1972-03-04")+0; 2265 END 2266 OUTPUT 2267 select monthname('1972-03-04'), monthname('1972-03-04') + 0 from dual 2268 END 2269 INPUT 2270 select object_id, ST_geometrytype(geo), ST_ISSIMPLE(GEO), ST_ASTEXT(ST_centroid(geo)) from t1 where object_id=85984; 2271 END 2272 OUTPUT 2273 select object_id, ST_geometrytype(geo), ST_ISSIMPLE(GEO), ST_ASTEXT(ST_centroid(geo)) from t1 where object_id = 85984 2274 END 2275 INPUT 2276 select @@global.optimizer_switch; 2277 END 2278 OUTPUT 2279 select @@global.optimizer_switch from dual 2280 END 2281 INPUT 2282 select from t5; 2283 END 2284 ERROR 2285 syntax error at position 12 near 'from' 2286 END 2287 INPUT 2288 select date_sub("1998-01-01 00:00:00.000001",INTERVAL "1:1.000002" MINUTE_MICROSECOND); 2289 END 2290 OUTPUT 2291 select date_sub('1998-01-01 00:00:00.000001', interval '1:1.000002' MINUTE_MICROSECOND) from dual 2292 END 2293 INPUT 2294 select locate('lo','hello',2); 2295 END 2296 OUTPUT 2297 select locate('lo', 'hello', 2) from dual 2298 END 2299 INPUT 2300 select date_add("1997-12-31 23:59:59.000002",INTERVAL "10000.999999" SECOND_MICROSECOND); 2301 END 2302 OUTPUT 2303 select date_add('1997-12-31 23:59:59.000002', interval '10000.999999' SECOND_MICROSECOND) from dual 2304 END 2305 INPUT 2306 select get_lock("mysqltest_lock", 100); 2307 END 2308 OUTPUT 2309 select get_lock('mysqltest_lock', 100) from dual 2310 END 2311 INPUT 2312 select group_concat('x') UNION ALL select 1; 2313 END 2314 OUTPUT 2315 select group_concat('x') from dual union all select 1 from dual 2316 END 2317 INPUT 2318 select sql_big_result trim(t),count(t) from t1 group by t order by t limit 10; 2319 END 2320 ERROR 2321 syntax error at position 28 2322 END 2323 INPUT 2324 select cast(rtrim(' 20.06 ') as decimal(19,2)); 2325 END 2326 OUTPUT 2327 select convert(rtrim(' 20.06 '), decimal(19, 2)) from dual 2328 END 2329 INPUT 2330 select rpad(c1,3,'�'), rpad('�',3,c1) from t1; 2331 END 2332 OUTPUT 2333 select rpad(c1, 3, '�'), rpad('�', 3, c1) from t1 2334 END 2335 INPUT 2336 select date("1997-13-31 23:59:59.000001"); 2337 END 2338 OUTPUT 2339 select date('1997-13-31 23:59:59.000001') from dual 2340 END 2341 INPUT 2342 select week(19980101),week(19970101),week(19980101,1),week(19970101,1); 2343 END 2344 OUTPUT 2345 select week(19980101), week(19970101), week(19980101, 1), week(19970101, 1) from dual 2346 END 2347 INPUT 2348 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_slovenian_ci; 2349 END 2350 OUTPUT 2351 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_slovenian_ci 2352 END 2353 INPUT 2354 select from t2 where MATCH ticket AGAINST ('foobar'); 2355 END 2356 ERROR 2357 syntax error at position 12 near 'from' 2358 END 2359 INPUT 2360 select date_sub("1998-01-01 00:00:00",INTERVAL "1 1" YEAR_MONTH); 2361 END 2362 OUTPUT 2363 select date_sub('1998-01-01 00:00:00', interval '1 1' YEAR_MONTH) from dual 2364 END 2365 INPUT 2366 select min(b) from t1; 2367 END 2368 OUTPUT 2369 select min(b) from t1 2370 END 2371 INPUT 2372 select collation(substring(_latin2'ab',1)), coercibility(substring(_latin2'ab',1)); 2373 END 2374 OUTPUT 2375 select collation(substr(_latin2 'ab', 1)), coercibility(substr(_latin2 'ab', 1)) from dual 2376 END 2377 INPUT 2378 select ST_astext(geom), ST_area(geom),ST_area(ST_buffer(geom,2)) from t1; 2379 END 2380 OUTPUT 2381 select ST_astext(geom), ST_area(geom), ST_area(ST_buffer(geom, 2)) from t1 2382 END 2383 INPUT 2384 select from t1,t2 right join t3 on (t2.i=t3.i) order by t1.i,t2.i,t3.i; 2385 END 2386 ERROR 2387 syntax error at position 12 near 'from' 2388 END 2389 INPUT 2390 select FROM t3 where fld3='bonfire'; 2391 END 2392 ERROR 2393 syntax error at position 12 near 'FROM' 2394 END 2395 INPUT 2396 select count(*) from t1 where id2 = 10; 2397 END 2398 OUTPUT 2399 select count(*) from t1 where id2 = 10 2400 END 2401 INPUT 2402 select ST_astext(st_symdifference(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 0 1, 1 1, 1 0, 0 0))'))) as result; 2403 END 2404 OUTPUT 2405 select ST_astext(st_symdifference(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 0 1, 1 1, 1 0, 0 0))'))) as result from dual 2406 END 2407 INPUT 2408 select TRIGGER_NAME from information_schema.triggers where trigger_schema='test'; 2409 END 2410 OUTPUT 2411 select TRIGGER_NAME from information_schema.`triggers` where trigger_schema = 'test' 2412 END 2413 INPUT 2414 select from v1 where id=1 group by id; 2415 END 2416 ERROR 2417 syntax error at position 12 near 'from' 2418 END 2419 INPUT 2420 select t2.isbn,city,t1.libname,count(t1.libname) as a from t3 left join t1 on t3.libname=t1.libname left join t2 on t3.isbn=t2.isbn group by city,t1.libname; 2421 END 2422 OUTPUT 2423 select t2.isbn, city, t1.libname, count(t1.libname) as a from t3 left join t1 on t3.libname = t1.libname left join t2 on t3.isbn = t2.isbn group by city, t1.libname 2424 END 2425 INPUT 2426 select from information_schema.partitions where table_schema="test" and table_name="t3"; 2427 END 2428 ERROR 2429 syntax error at position 12 near 'from' 2430 END 2431 INPUT 2432 select id from t2; 2433 END 2434 OUTPUT 2435 select id from t2 2436 END 2437 INPUT 2438 select Case When Count(*) < MAX_REQ Then 1 Else 0 End from t1 where t1.USR_ID = 1 group by MAX_REQ; 2439 END 2440 OUTPUT 2441 select case when Count(*) < MAX_REQ then 1 else 0 end from t1 where t1.USR_ID = 1 group by MAX_REQ 2442 END 2443 INPUT 2444 select t1.*,t2.* from t1 inner join t2 using (a); 2445 END 2446 OUTPUT 2447 select t1.*, t2.* from t1 join t2 using (a) 2448 END 2449 INPUT 2450 select length(uuid()), charset(uuid()), length(unhex(replace(uuid(),_utf8'-',_utf8''))); 2451 END 2452 OUTPUT 2453 select length(uuid()), charset(uuid()), length(unhex(replace(uuid(), _utf8 '-', _utf8 ''))) from dual 2454 END 2455 INPUT 2456 select substring('hello', 4294967296, 4294967296); 2457 END 2458 OUTPUT 2459 select substr('hello', 4294967296, 4294967296) from dual 2460 END 2461 INPUT 2462 select cast("2001-1-1" as datetime) = "2001-01-01 00:00:00"; 2463 END 2464 OUTPUT 2465 select convert('2001-1-1', datetime) = '2001-01-01 00:00:00' from dual 2466 END 2467 INPUT 2468 select a1,a2,b, max(c) from t1 where (c < 'k321') group by a1,a2,b; 2469 END 2470 OUTPUT 2471 select a1, a2, b, max(c) from t1 where c < 'k321' group by a1, a2, b 2472 END 2473 INPUT 2474 select grp,group_concat(c) from t1 group by grp; 2475 END 2476 OUTPUT 2477 select grp, group_concat(c) from t1 group by grp 2478 END 2479 INPUT 2480 select a.id, b.category as catid, b.state as stateid, b.county as countyid from t1 a, t2 b ignore index (primary) where (a.token ='a71250b7ed780f6ef3185bfffe027983') and (a.count = b.id); 2481 END 2482 OUTPUT 2483 select a.id, b.category as catid, b.state as stateid, b.county as countyid from t1 as a, t2 as b ignore index (`primary`) where a.token = 'a71250b7ed780f6ef3185bfffe027983' and a.count = b.id 2484 END 2485 INPUT 2486 select count(distinct n2) from t1; 2487 END 2488 OUTPUT 2489 select count(distinct n2) from t1 2490 END 2491 INPUT 2492 select data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, dtd_identifier from information_schema.routines where routine_schema='test'; 2493 END 2494 OUTPUT 2495 select data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, dtd_identifier from information_schema.routines where routine_schema = 'test' 2496 END 2497 INPUT 2498 select 'null' sounds like null; 2499 END 2500 ERROR 2501 syntax error at position 26 near 'like' 2502 END 2503 INPUT 2504 select from t1 left join t2 on t1.a = t2.a order by t1.b; 2505 END 2506 ERROR 2507 syntax error at position 12 near 'from' 2508 END 2509 INPUT 2510 select date,format,concat(TIME(str_to_date(date, format))) as time2 from t1; 2511 END 2512 OUTPUT 2513 select `date`, `format`, concat(TIME(str_to_date(`date`, `format`))) as time2 from t1 2514 END 2515 INPUT 2516 select cast(cast('1.2' as decimal(3,2)) as signed); 2517 END 2518 OUTPUT 2519 select convert(convert('1.2', decimal(3, 2)), signed) from dual 2520 END 2521 INPUT 2522 select from t1 where a = 7 or not(a < 15 and a > 5); 2523 END 2524 ERROR 2525 syntax error at position 12 near 'from' 2526 END 2527 INPUT 2528 select concat('',left(right(concat('what ',concat('is ','happening')),9),4),'',substring('monty',5,1)); 2529 END 2530 OUTPUT 2531 select concat('', left(right(concat('what ', concat('is ', 'happening')), 9), 4), '', substr('monty', 5, 1)) from dual 2532 END 2533 INPUT 2534 select _cp1251'andre%' like convert('andre�%' using cp1251) escape '�'; 2535 END 2536 OUTPUT 2537 select _cp1251 'andre%' like convert('andre�%' using cp1251) escape '�' from dual 2538 END 2539 INPUT 2540 select a from t3 order by a desc limit 300,10; 2541 END 2542 OUTPUT 2543 select a from t3 order by a desc limit 300, 10 2544 END 2545 INPUT 2546 select count(*) from t1 group by col2 having col1 = 10; 2547 END 2548 OUTPUT 2549 select count(*) from t1 group by col2 having col1 = 10 2550 END 2551 INPUT 2552 select from t1 where match a against ("+aaa* +ccc*" in boolean mode); 2553 END 2554 ERROR 2555 syntax error at position 12 near 'from' 2556 END 2557 INPUT 2558 select max_data_length into @changed_max_data_length from information_schema.tables where table_name='t1'; 2559 END 2560 ERROR 2561 syntax error at position 53 near 'changed_max_data_length' 2562 END 2563 INPUT 2564 select 1 and min(a) is null from t1; 2565 END 2566 OUTPUT 2567 select 1 and min(a) is null from t1 2568 END 2569 INPUT 2570 select ST_astext(st_difference(ST_GeomFromText('multipoint(2 2, 3 3)'), ST_GeomFromText('multipoint(0 0, 4 4)'))); 2571 END 2572 OUTPUT 2573 select ST_astext(st_difference(ST_GeomFromText('multipoint(2 2, 3 3)'), ST_GeomFromText('multipoint(0 0, 4 4)'))) from dual 2574 END 2575 INPUT 2576 select a1,a2,b, max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b; 2577 END 2578 OUTPUT 2579 select a1, a2, b, max(c) from t1 where c > 'b1' or c <= 'g1' group by a1, a2, b 2580 END 2581 INPUT 2582 select distinct sum(b) from (select a,b from t1) y group by a; 2583 END 2584 OUTPUT 2585 select distinct sum(b) from (select a, b from t1) as y group by a 2586 END 2587 INPUT 2588 select _utf8 0xD0B0D0B1D0B2 like concat(_utf8'%',_utf8 0xD0B1,_utf8 '%'); 2589 END 2590 OUTPUT 2591 select _utf8 0xD0B0D0B1D0B2 like concat(_utf8 '%', _utf8 0xD0B1, _utf8 '%') from dual 2592 END 2593 INPUT 2594 select from t1 where MATCH(a,b) AGAINST ("indexes"); 2595 END 2596 ERROR 2597 syntax error at position 12 near 'from' 2598 END 2599 INPUT 2600 select collation(lpad(_latin2'a',4,_latin2'b')), coercibility(lpad(_latin2'a',4,_latin2'b')); 2601 END 2602 OUTPUT 2603 select collation(lpad(_latin2 'a', 4, _latin2 'b')), coercibility(lpad(_latin2 'a', 4, _latin2 'b')) from dual 2604 END 2605 INPUT 2606 select DAYOFYEAR("1997-03-03"), WEEK("1998-03-03"), QUARTER(980303); 2607 END 2608 OUTPUT 2609 select DAYOFYEAR('1997-03-03'), WEEK('1998-03-03'), QUARTER(980303) from dual 2610 END 2611 INPUT 2612 select timestampdiff(SQL_TSI_HOUR, '2001-02-01', '2001-05-01') as a; 2613 END 2614 OUTPUT 2615 select timestampdiff(SQL_TSI_HOUR, '2001-02-01', '2001-05-01') as a from dual 2616 END 2617 INPUT 2618 select max(t2.a1) from t2 left outer join t1 on t2.a2=10 where t2.a2=10; 2619 END 2620 OUTPUT 2621 select max(t2.a1) from t2 left join t1 on t2.a2 = 10 where t2.a2 = 10 2622 END 2623 INPUT 2624 select timestampadd(SQL_TSI_SECOND, 1, date) from t1; 2625 END 2626 OUTPUT 2627 select timestampadd(SQL_TSI_SECOND, 1, `date`) from t1 2628 END 2629 INPUT 2630 select from (select 1 as a) b left join (select 2 as a) c using(a); 2631 END 2632 ERROR 2633 syntax error at position 12 near 'from' 2634 END 2635 INPUT 2636 select s1 as after_delete_bin from t1 where s1 like 'ペテ%'; 2637 END 2638 OUTPUT 2639 select s1 as after_delete_bin from t1 where s1 like 'ペテ%' 2640 END 2641 INPUT 2642 select substring('hello', -4294967297, -4294967297); 2643 END 2644 OUTPUT 2645 select substr('hello', -4294967297, -4294967297) from dual 2646 END 2647 INPUT 2648 select 12 mod 2 as '0'; 2649 END 2650 OUTPUT 2651 select 12 % 2 as `0` from dual 2652 END 2653 INPUT 2654 select 1 as weight_string, 2 as reverse; 2655 END 2656 OUTPUT 2657 select 1 as weight_string, 2 as reverse from dual 2658 END 2659 INPUT 2660 select c,count(*) from t1 group by c order by c limit 10; 2661 END 2662 OUTPUT 2663 select c, count(*) from t1 group by c order by c asc limit 10 2664 END 2665 INPUT 2666 select concat(a, if(b>10, _utf8'æ', _utf8'ß')) from t1; 2667 END 2668 OUTPUT 2669 select concat(a, if(b > 10, _utf8 'æ', _utf8 'ß')) from t1 2670 END 2671 INPUT 2672 select hex(group_concat(a separator ',')) from t1; 2673 END 2674 OUTPUT 2675 select hex(group_concat(a separator ',')) from t1 2676 END 2677 INPUT 2678 select collation(quote(_latin2'ab')), coercibility(quote(_latin2'ab')); 2679 END 2680 OUTPUT 2681 select collation(quote(_latin2 'ab')), coercibility(quote(_latin2 'ab')) from dual 2682 END 2683 INPUT 2684 select group_concat(f1) from t1; 2685 END 2686 OUTPUT 2687 select group_concat(f1) from t1 2688 END 2689 INPUT 2690 select CAST(0xffffffffffffffff as unsigned); 2691 END 2692 OUTPUT 2693 select convert(0xffffffffffffffff, unsigned) from dual 2694 END 2695 INPUT 2696 select "a" as col1, "ct" as col2; 2697 END 2698 OUTPUT 2699 select 'a' as col1, 'ct' as col2 from dual 2700 END 2701 INPUT 2702 select hex(_utf8 X'616263FF'); 2703 END 2704 OUTPUT 2705 select hex(_utf8 X'616263FF') from dual 2706 END 2707 INPUT 2708 select t2.count, t1.name from t2 inner join t1 using (color); 2709 END 2710 OUTPUT 2711 select t2.count, t1.`name` from t2 join t1 using (color) 2712 END 2713 INPUT 2714 select st_touches(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 2715 END 2716 OUTPUT 2717 select st_touches(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 2718 END 2719 INPUT 2720 select a, t1.* as 'with_alias' from t1; 2721 END 2722 ERROR 2723 syntax error at position 18 near 'as' 2724 END 2725 INPUT 2726 select @x:=group_concat(x) from t1 group by y; 2727 END 2728 ERROR 2729 syntax error at position 11 near ':' 2730 END 2731 INPUT 2732 select cast('-10a' as signed integer); 2733 END 2734 OUTPUT 2735 select convert('-10a', signed) from dual 2736 END 2737 INPUT 2738 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_vietnamese_ci; 2739 END 2740 OUTPUT 2741 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_vietnamese_ci 2742 END 2743 INPUT 2744 select from information_schema.partitions where table_schema="test" and table_name="t1"; 2745 END 2746 ERROR 2747 syntax error at position 12 near 'from' 2748 END 2749 INPUT 2750 select from t1 join (t2, t3) using (b); 2751 END 2752 ERROR 2753 syntax error at position 12 near 'from' 2754 END 2755 INPUT 2756 select group_concat(null) from t1; 2757 END 2758 OUTPUT 2759 select group_concat(null) from t1 2760 END 2761 INPUT 2762 select hex(weight_string(_utf16 0xD800DC01 collate utf16_unicode_ci)); 2763 END 2764 OUTPUT 2765 select hex(weight_string(_utf16 0xD800DC01 collate utf16_unicode_ci)) from dual 2766 END 2767 INPUT 2768 select from t4 where a+0 > 90; 2769 END 2770 ERROR 2771 syntax error at position 12 near 'from' 2772 END 2773 INPUT 2774 select from t1 where st_a=1 and swt1a=1 and swt2a=1 and st_b=1 and swt1b=1 and swt2b=1 limit 5; 2775 END 2776 ERROR 2777 syntax error at position 12 near 'from' 2778 END 2779 INPUT 2780 select a from t1 where right(a+0,6) in ( right(20040106123400,6) ); 2781 END 2782 OUTPUT 2783 select a from t1 where right(a + 0, 6) in (right(20040106123400, 6)) 2784 END 2785 INPUT 2786 select 'vv: Following query must use ALL(t1), eq_ref(A), eq_ref(B): vv' Z; 2787 END 2788 OUTPUT 2789 select 'vv: Following query must use ALL(t1), eq_ref(A), eq_ref(B): vv' as Z from dual 2790 END 2791 INPUT 2792 select group_concat(distinct b) from t1 group by a; 2793 END 2794 OUTPUT 2795 select group_concat(distinct b) from t1 group by a 2796 END 2797 INPUT 2798 select collation(trim(BOTH _latin2' ' FROM _latin2'a')), coercibility(trim(BOTH _latin2'a' FROM _latin2'a')); 2799 END 2800 ERROR 2801 syntax error at position 35 near '_latin2' 2802 END 2803 INPUT 2804 select hex(weight_string(ch)) w, name from t1 order by ch; 2805 END 2806 OUTPUT 2807 select hex(weight_string(ch)) as w, `name` from t1 order by ch asc 2808 END 2809 INPUT 2810 select date_sub("1998-01-01 00:00:00",INTERVAL 1 SECOND); 2811 END 2812 OUTPUT 2813 select date_sub('1998-01-01 00:00:00', interval 1 SECOND) from dual 2814 END 2815 INPUT 2816 select from t6 order by a,b; 2817 END 2818 ERROR 2819 syntax error at position 12 near 'from' 2820 END 2821 INPUT 2822 select hex(weight_string(s1)) from t1 order by s1; 2823 END 2824 OUTPUT 2825 select hex(weight_string(s1)) from t1 order by s1 asc 2826 END 2827 INPUT 2828 select collation(substring(_latin2'a',1,1)), coercibility(substring(_latin2'a',1,1)); 2829 END 2830 OUTPUT 2831 select collation(substr(_latin2 'a', 1, 1)), coercibility(substr(_latin2 'a', 1, 1)) from dual 2832 END 2833 INPUT 2834 select substring_index('aaaaaaaaa1','aaa',4); 2835 END 2836 OUTPUT 2837 select substring_index('aaaaaaaaa1', 'aaa', 4) from dual 2838 END 2839 INPUT 2840 select ST_astext(ST_centroid(ST_PolyFromWKB(ST_AsWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(1, 0), Point(0, 0))))))); 2841 END 2842 OUTPUT 2843 select ST_astext(ST_centroid(ST_PolyFromWKB(ST_AsWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(1, 0), Point(0, 0))))))) from dual 2844 END 2845 INPUT 2846 select null sounds like 'null'; 2847 END 2848 ERROR 2849 syntax error at position 24 near 'like' 2850 END 2851 INPUT 2852 select ST_Contains(ST_GeomFromText('POLYGON((0 0,5 0,5 5,0 5,0 0))'),ST_GeomFromText('LINESTRING(1 2,5 5)')) as result; 2853 END 2854 OUTPUT 2855 select ST_Contains(ST_GeomFromText('POLYGON((0 0,5 0,5 5,0 5,0 0))'), ST_GeomFromText('LINESTRING(1 2,5 5)')) as result from dual 2856 END 2857 INPUT 2858 select from t1 where a like '%PESA%'; 2859 END 2860 ERROR 2861 syntax error at position 12 near 'from' 2862 END 2863 INPUT 2864 select a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; 2865 END 2866 OUTPUT 2867 select a1, a2, b from t1 where a2 >= 'b' and b = 'a' group by a1, a2, b 2868 END 2869 INPUT 2870 select space(18446744073709551616); 2871 END 2872 OUTPUT 2873 select space(18446744073709551616) from dual 2874 END 2875 INPUT 2876 select t1.*,t2.* from t1 left join t2 on (t1.a=t2.a) where t2.id is null; 2877 END 2878 OUTPUT 2879 select t1.*, t2.* from t1 left join t2 on t1.a = t2.a where t2.id is null 2880 END 2881 INPUT 2882 select ST_astext(st_symdifference(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); 2883 END 2884 OUTPUT 2885 select ST_astext(st_symdifference(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual 2886 END 2887 INPUT 2888 select @@session.transaction_isolation; 2889 END 2890 OUTPUT 2891 select @@session.transaction_isolation from dual 2892 END 2893 INPUT 2894 select hex(left(_utf16 0xD800DC00D87FDFFF, 1)); 2895 END 2896 OUTPUT 2897 select hex(left(_utf16 0xD800DC00D87FDFFF, 1)) from dual 2898 END 2899 INPUT 2900 select timestampdiff(QUARTER, '2002-05-01', '2001-01-01') as a; 2901 END 2902 OUTPUT 2903 select timestampdiff(QUARTER, '2002-05-01', '2001-01-01') as a from dual 2904 END 2905 INPUT 2906 select from information_schema.TABLE_CONSTRAINTS where TABLE_NAME= "vo"; 2907 END 2908 ERROR 2909 syntax error at position 12 near 'from' 2910 END 2911 INPUT 2912 select distinct a1 from t1 where a2 = 'b'; 2913 END 2914 OUTPUT 2915 select distinct a1 from t1 where a2 = 'b' 2916 END 2917 INPUT 2918 select SUBSTRING('abcdefg',3,2); 2919 END 2920 OUTPUT 2921 select substr('abcdefg', 3, 2) from dual 2922 END 2923 INPUT 2924 select locate('HE','hello' collate utf8mb4_bin,2); 2925 END 2926 OUTPUT 2927 select locate('HE', 'hello' collate utf8mb4_bin, 2) from dual 2928 END 2929 INPUT 2930 select field("b","a",NULL),field(1,0,NULL)+0,field(1.0,0.0,NULL)+0.0,field(1.0e1,0.0e1,NULL)+0.0e1; 2931 END 2932 OUTPUT 2933 select field('b', 'a', null), field(1, 0, null) + 0, field(1.0, 0.0, null) + 0.0, field(1.0e1, 0.0e1, null) + 0.0e1 from dual 2934 END 2935 INPUT 2936 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_roman_ci; 2937 END 2938 OUTPUT 2939 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_roman_ci 2940 END 2941 INPUT 2942 select locate('lo','hello',4294967295); 2943 END 2944 OUTPUT 2945 select locate('lo', 'hello', 4294967295) from dual 2946 END 2947 INPUT 2948 select cast('-1' as unsigned); 2949 END 2950 OUTPUT 2951 select convert('-1', unsigned) from dual 2952 END 2953 INPUT 2954 select hex(cast(0x20000000000000 as unsigned) + 1); 2955 END 2956 OUTPUT 2957 select hex(convert(0x20000000000000, unsigned) + 1) from dual 2958 END 2959 INPUT 2960 select cast(-1e18 as decimal(22,2)); 2961 END 2962 OUTPUT 2963 select convert(-1e18, decimal(22, 2)) from dual 2964 END 2965 INPUT 2966 select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE; 2967 END 2968 OUTPUT 2969 select str_to_date('10:00 PM', '%h:%i %p') + interval 10 MINUTE from dual 2970 END 2971 INPUT 2972 select 497, TMP.ID, NULL from (select 497 as ID, MAX(t3.DATA) as DATA from t1 join t2 on (t1.ObjectID = t2.ID) join t3 on (t1.ObjectID = t3.ID) group by t2.ParID order by DATA DESC) as TMP; 2973 END 2974 OUTPUT 2975 select 497, TMP.ID, null from (select 497 as ID, MAX(t3.`DATA`) as `DATA` from t1 join t2 on t1.ObjectID = t2.ID join t3 on t1.ObjectID = t3.ID group by t2.ParID order by `DATA` desc) as TMP 2976 END 2977 INPUT 2978 select cast(1000 as CHAR(3)); 2979 END 2980 OUTPUT 2981 select convert(1000, CHAR(3)) from dual 2982 END 2983 INPUT 2984 select Fld1, max(Fld2) from t1 group by Fld1 having avg(Fld2) is not null; 2985 END 2986 OUTPUT 2987 select Fld1, max(Fld2) from t1 group by Fld1 having avg(Fld2) is not null 2988 END 2989 INPUT 2990 select from t1 where tt like '%AA%'; 2991 END 2992 ERROR 2993 syntax error at position 12 near 'from' 2994 END 2995 INPUT 2996 select concat(a, if(b>10, 'x' 'æ', 'y' 'ß')) from t1; 2997 END 2998 OUTPUT 2999 select concat(a, if(b > 10, 'x' as `æ`, 'y' as `ß`)) from t1 3000 END 3001 INPUT 3002 select from (t1 natural join t2) natural join (t3 join (t4 natural join t5) on (b < z)); 3003 END 3004 ERROR 3005 syntax error at position 12 near 'from' 3006 END 3007 INPUT 3008 select a.* from (select 214748364 as v_small) a; 3009 END 3010 OUTPUT 3011 select a.* from (select 214748364 as v_small from dual) as a 3012 END 3013 INPUT 3014 select a as uci1 from t1 where a like 'さしすせそかきくけこあいうえお%'; 3015 END 3016 OUTPUT 3017 select a as uci1 from t1 where a like 'さしすせそかきくけこあいうえお%' 3018 END 3019 INPUT 3020 select from t2 right join t1 on t2.a=t1.a; 3021 END 3022 ERROR 3023 syntax error at position 12 near 'from' 3024 END 3025 INPUT 3026 select from information_schema.views where table_name='v1' or table_name='v2'; 3027 END 3028 ERROR 3029 syntax error at position 12 near 'from' 3030 END 3031 INPUT 3032 select count(*) from t3 where id3; 3033 END 3034 OUTPUT 3035 select count(*) from t3 where id3 3036 END 3037 INPUT 3038 select st_union((cast(linestring(point(6,-68), point(-22,-4)) as binary(13))), st_intersection(point(6,8),multipoint(point(3,1),point(-4,-6),point(1,6),point(-3,-5),point(5,4)))); 3039 END 3040 OUTPUT 3041 select st_union(convert(linestring(point(6, -68), point(-22, -4)), binary(13)), st_intersection(point(6, 8), multipoint(point(3, 1), point(-4, -6), point(1, 6), point(-3, -5), point(5, 4)))) from dual 3042 END 3043 INPUT 3044 select st_disjoint(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 3045 END 3046 OUTPUT 3047 select st_disjoint(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 3048 END 3049 INPUT 3050 select _latin1 0xFF regexp _latin1 '[[:lower:]]' COLLATE latin1_bin; 3051 END 3052 OUTPUT 3053 select _latin1 0xFF regexp _latin1 '[[:lower:]]' collate latin1_bin from dual 3054 END 3055 INPUT 3056 select hex(weight_string('x�' as char(2))); 3057 END 3058 ERROR 3059 syntax error at position 41 3060 END 3061 INPUT 3062 select spid,count(*) from t1 where spid between 1 and 2 group by spid; 3063 END 3064 OUTPUT 3065 select spid, count(*) from t1 where spid between 1 and 2 group by spid 3066 END 3067 INPUT 3068 select benchmark(100, (select (a) from table_26093)); 3069 END 3070 OUTPUT 3071 select benchmark(100, (select a from table_26093)) from dual 3072 END 3073 INPUT 3074 select get_lock('ee_16407_2', 60); 3075 END 3076 OUTPUT 3077 select get_lock('ee_16407_2', 60) from dual 3078 END 3079 INPUT 3080 select sql_big_result score,count(*) from t1 group by score order by score desc; 3081 END 3082 OUTPUT 3083 select `sql_big_result` as score, count(*) from t1 group by score order by score desc 3084 END 3085 INPUT 3086 select from information_schema.TABLE_CONSTRAINTS where TABLE_SCHEMA= "test" order by constraint_name; 3087 END 3088 ERROR 3089 syntax error at position 12 near 'from' 3090 END 3091 INPUT 3092 select from `information_schema`.`VIEWS` where `TABLE_NAME` = NULL; 3093 END 3094 ERROR 3095 syntax error at position 12 near 'from' 3096 END 3097 INPUT 3098 select locate(_utf8 0xD091, _utf8 0xD0B0D0B1D0B2); 3099 END 3100 OUTPUT 3101 select locate(_utf8 0xD091, _utf8 0xD0B0D0B1D0B2) from dual 3102 END 3103 INPUT 3104 select group_concat(distinct a, c order by a desc, c desc) from t1; 3105 END 3106 OUTPUT 3107 select group_concat(distinct a, c order by a desc, c desc) from t1 3108 END 3109 INPUT 3110 select from t1 natural join (t2 join t4 on b + 1 = y); 3111 END 3112 ERROR 3113 syntax error at position 12 near 'from' 3114 END 3115 INPUT 3116 select _utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4'%',_utf8mb4 0xD0B1,_utf8mb4 '%'); 3117 END 3118 OUTPUT 3119 select _utf8mb4 0xD0B0D0B1D0B2 like concat(_utf8mb4 '%', _utf8mb4 0xD0B1, _utf8mb4 '%') from dual 3120 END 3121 INPUT 3122 select date_add("1997-12-31 23:59:59",INTERVAL 1 SECOND); 3123 END 3124 OUTPUT 3125 select date_add('1997-12-31 23:59:59', interval 1 SECOND) from dual 3126 END 3127 INPUT 3128 select t1.id, count(t2.id) from t1,t2 where t2.id = t1.id group by t1.id; 3129 END 3130 OUTPUT 3131 select t1.id, count(t2.id) from t1, t2 where t2.id = t1.id group by t1.id 3132 END 3133 INPUT 3134 select @@global.Host_Cache_Size=@Default_host_cache_size; 3135 END 3136 OUTPUT 3137 select @@global.Host_Cache_Size = @Default_host_cache_size from dual 3138 END 3139 INPUT 3140 select substring_index('the king of thethethe.the hill','the',-3); 3141 END 3142 OUTPUT 3143 select substring_index('the king of thethethe.the hill', 'the', -3) from dual 3144 END 3145 INPUT 3146 select rpad('hello', 18446744073709551615, '1'); 3147 END 3148 OUTPUT 3149 select rpad('hello', 18446744073709551615, '1') from dual 3150 END 3151 INPUT 3152 select position(("1" in (1,2,3)) in "01"); 3153 END 3154 ERROR 3155 syntax error at position 41 near '01' 3156 END 3157 INPUT 3158 select cast(variance(ff) as decimal(10,3)) from t2; 3159 END 3160 OUTPUT 3161 select convert(variance(ff), decimal(10, 3)) from t2 3162 END 3163 INPUT 3164 select insert('hello', 18446744073709551615, 18446744073709551615, 'hi'); 3165 END 3166 ERROR 3167 syntax error at position 14 near 'insert' 3168 END 3169 INPUT 3170 select now()-curdate()*1000000-curtime(); 3171 END 3172 OUTPUT 3173 select now() - curdate() * 1000000 - curtime() from dual 3174 END 3175 INPUT 3176 select MYSQLTEST.t1.* from MYSQLTEST.t1; 3177 END 3178 OUTPUT 3179 select MYSQLTEST.t1.* from MYSQLTEST.t1 3180 END 3181 INPUT 3182 select a from t1 where a='http://www.foo.com/' order by abs(timediff(ts, 0)); 3183 END 3184 OUTPUT 3185 select a from t1 where a = 'http://www.foo.com/' order by abs(timediff(ts, 0)) asc 3186 END 3187 INPUT 3188 select from t1, t2 where t1.start >= t2.ctime1 and t1.start <= t2.ctime2; 3189 END 3190 ERROR 3191 syntax error at position 12 near 'from' 3192 END 3193 INPUT 3194 select substring_index('the king of the the hill','the',3); 3195 END 3196 OUTPUT 3197 select substring_index('the king of the the hill', 'the', 3) from dual 3198 END 3199 INPUT 3200 select release_lock("mysqltest_lock"); 3201 END 3202 OUTPUT 3203 select release_lock('mysqltest_lock') from dual 3204 END 3205 INPUT 3206 select a from t1 group by b order by b; 3207 END 3208 OUTPUT 3209 select a from t1 group by b order by b asc 3210 END 3211 INPUT 3212 select a, ifnull(b,cast(-7 as signed)) as b, ifnull(c,cast(7 as unsigned)) as c, ifnull(d,cast('2000-01-01' as date)) as d, ifnull(e,cast('b' as char)) as e, ifnull(f,cast('2000-01-01' as datetime)) as f, ifnull(g,cast('5:4:3' as time)) as g, ifnull(h,cast('yet another binary data' as binary)) as h, addtime(cast('1:0:0' as time),cast('1:0:0' as time)) as dd from t1; 3213 END 3214 OUTPUT 3215 select a, ifnull(b, convert(-7, signed)) as b, ifnull(c, convert(7, unsigned)) as c, ifnull(d, convert('2000-01-01', date)) as d, ifnull(e, convert('b', char)) as e, ifnull(f, convert('2000-01-01', datetime)) as f, ifnull(g, convert('5:4:3', time)) as g, ifnull(h, convert('yet another binary data', binary)) as h, addtime(convert('1:0:0', time), convert('1:0:0', time)) as dd from t1 3216 END 3217 INPUT 3218 select substring('hello', 1, 18446744073709551616); 3219 END 3220 OUTPUT 3221 select substr('hello', 1, 18446744073709551616) from dual 3222 END 3223 INPUT 3224 select from t1 where bob is null and cip=1; 3225 END 3226 ERROR 3227 syntax error at position 12 near 'from' 3228 END 3229 INPUT 3230 select a.f1 as a, b.f1 as b, a.f1 > b.f1 as gt, a.f1 < b.f1 as lt, a.f1<=>b.f1 as eq from t1 a, t1 b; 3231 END 3232 OUTPUT 3233 select a.f1 as a, b.f1 as b, a.f1 > b.f1 as gt, a.f1 < b.f1 as lt, a.f1 <=> b.f1 as eq from t1 as a, t1 as b 3234 END 3235 INPUT 3236 select from t1 where a like "%abcd%"; 3237 END 3238 ERROR 3239 syntax error at position 12 near 'from' 3240 END 3241 INPUT 3242 select fld3,companynr FROM t2 where companynr = 58 order by fld3; 3243 END 3244 OUTPUT 3245 select fld3, companynr from t2 where companynr = 58 order by fld3 asc 3246 END 3247 INPUT 3248 select date_add("1997-12-31 23:59:59",INTERVAL -100000 MINUTE); 3249 END 3250 OUTPUT 3251 select date_add('1997-12-31 23:59:59', interval (-100000) MINUTE) from dual 3252 END 3253 INPUT 3254 select insert('hello', 18446744073709551616, 1, 'hi'); 3255 END 3256 ERROR 3257 syntax error at position 14 near 'insert' 3258 END 3259 INPUT 3260 select b, group_concat(a) from t1 order by 1, 2; 3261 END 3262 OUTPUT 3263 select b, group_concat(a) from t1 order by 1 asc, 2 asc 3264 END 3265 INPUT 3266 select insert('hello', -1, 1, 'hi'); 3267 END 3268 ERROR 3269 syntax error at position 14 near 'insert' 3270 END 3271 INPUT 3272 select from t1 join (t2 join t4 on b + 1 = y) on t1.c = t4.c; 3273 END 3274 ERROR 3275 syntax error at position 12 near 'from' 3276 END 3277 INPUT 3278 select f3 from t1 where timestamp(f3) between cast("2006-1-1 12:1:1" as datetime) and cast("2006-1-1 12:1:2" as datetime); 3279 END 3280 OUTPUT 3281 select f3 from t1 where timestamp(f3) between convert('2006-1-1 12:1:1', datetime) and convert('2006-1-1 12:1:2', datetime) 3282 END 3283 INPUT 3284 select f1() from t1; 3285 END 3286 OUTPUT 3287 select f1() from t1 3288 END 3289 INPUT 3290 select hex(soundex(_utf32 0x000004100000041100000412)); 3291 END 3292 OUTPUT 3293 select hex(soundex(_utf32 0x000004100000041100000412)) from dual 3294 END 3295 INPUT 3296 select from t1 where 'K' > s1 and s1 = 'Y'; 3297 END 3298 ERROR 3299 syntax error at position 12 near 'from' 3300 END 3301 INPUT 3302 select timediff(cast('2004-12-30 12:00:00' as time), '12:00:00'); 3303 END 3304 OUTPUT 3305 select timediff(convert('2004-12-30 12:00:00', time), '12:00:00') from dual 3306 END 3307 INPUT 3308 select i from t1 where a=repeat(_utf8 0xD0B1,200); 3309 END 3310 OUTPUT 3311 select i from t1 where a = repeat(_utf8 0xD0B1, 200) 3312 END 3313 INPUT 3314 select @@read_rnd_buffer_size; 3315 END 3316 OUTPUT 3317 select @@read_rnd_buffer_size from dual 3318 END 3319 INPUT 3320 select left(_utf8mb4 0xD0B0D0B1D0B2,1); 3321 END 3322 OUTPUT 3323 select left(_utf8mb4 0xD0B0D0B1D0B2, 1) from dual 3324 END 3325 INPUT 3326 select 1197.90 mod 50; 3327 END 3328 OUTPUT 3329 select 1197.90 % 50 from dual 3330 END 3331 INPUT 3332 select column_name, NUMERIC_PRECISION, NUMERIC_SCALE from information_schema.columns where table_name='t1' order by column_name; 3333 END 3334 OUTPUT 3335 select column_name, NUMERIC_PRECISION, NUMERIC_SCALE from information_schema.`columns` where table_name = 't1' order by column_name asc 3336 END 3337 INPUT 3338 select "xyz" as name union select "abc" as name order by name desc; 3339 END 3340 OUTPUT 3341 select 'xyz' as `name` from dual union select 'abc' as `name` from dual order by `name` desc 3342 END 3343 INPUT 3344 select from t1 where text1 like 'teststring_%'; 3345 END 3346 ERROR 3347 syntax error at position 12 near 'from' 3348 END 3349 INPUT 3350 select week("2000-01-01",1) as '2000', week("2001-01-01",1) as '2001', week("2002-01-01",1) as '2002',week("2003-01-01",1) as '2003', week("2004-01-01",1) as '2004', week("2005-01-01",1) as '2005', week("2006-01-01",1) as '2006'; 3351 END 3352 OUTPUT 3353 select week('2000-01-01', 1) as `2000`, week('2001-01-01', 1) as `2001`, week('2002-01-01', 1) as `2002`, week('2003-01-01', 1) as `2003`, week('2004-01-01', 1) as `2004`, week('2005-01-01', 1) as `2005`, week('2006-01-01', 1) as `2006` from dual 3354 END 3355 INPUT 3356 select strcmp(date_format(date_sub(localtimestamp(), interval 3 hour),"%Y-%m-%d"), utc_date())=0; 3357 END 3358 OUTPUT 3359 select strcmp(date_format(date_sub(localtimestamp(), interval 3 hour), '%Y-%m-%d'), utc_date()) = 0 from dual 3360 END 3361 INPUT 3362 select trim(trailing NULL from 'xyz') as "must_be_null"; 3363 END 3364 ERROR 3365 syntax error at position 26 near 'NULL' 3366 END 3367 INPUT 3368 select 0<=>0.0, 0.0<=>0E0, 0E0<=>"0", 10.0<=>1E1, 10<=>10.0, 10<=>1E1; 3369 END 3370 OUTPUT 3371 select 0 <=> 0.0, 0.0 <=> 0E0, 0E0 <=> '0', 10.0 <=> 1E1, 10 <=> 10.0, 10 <=> 1E1 from dual 3372 END 3373 INPUT 3374 select from t1 where MATCH a,b AGAINST ("+call* +coll*" IN BOOLEAN MODE); 3375 END 3376 ERROR 3377 syntax error at position 12 near 'from' 3378 END 3379 INPUT 3380 select count(*) from t1 where id1; 3381 END 3382 OUTPUT 3383 select count(*) from t1 where id1 3384 END 3385 INPUT 3386 select 1 as f1 from information_schema.tables where "COLUMN_PRIVILEGES"= (select cast(table_name as char) from information_schema.tables where table_schema != 'performance_schema' order by table_name limit 1) limit 1; 3387 END 3388 OUTPUT 3389 select 1 as f1 from information_schema.`tables` where 'COLUMN_PRIVILEGES' = (select convert(table_name, char) from information_schema.`tables` where table_schema != 'performance_schema' order by table_name asc limit 1) limit 1 3390 END 3391 INPUT 3392 select date_sub("1998-01-01 00:00:00",INTERVAL "1:1" HOUR_MINUTE); 3393 END 3394 OUTPUT 3395 select date_sub('1998-01-01 00:00:00', interval '1:1' HOUR_MINUTE) from dual 3396 END 3397 INPUT 3398 select (select f from (select max(t1.a) as f) as dt) as g from t1; 3399 END 3400 OUTPUT 3401 select (select f from (select max(t1.a) as f from dual) as dt) as g from t1 3402 END 3403 INPUT 3404 select 'st_Intersects'; 3405 END 3406 OUTPUT 3407 select 'st_Intersects' from dual 3408 END 3409 INPUT 3410 select from table_24562; 3411 END 3412 ERROR 3413 syntax error at position 12 near 'from' 3414 END 3415 INPUT 3416 select grp,group_concat(distinct c order by c separator ",") from t1 group by grp; 3417 END 3418 OUTPUT 3419 select grp, group_concat(distinct c order by c asc separator ',') from t1 group by grp 3420 END 3421 INPUT 3422 select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b) where charset(t2.a) = _utf8'binary' order by t1.a,t2.a; 3423 END 3424 OUTPUT 3425 select t1.*, t2.* from t1 left join t2 on t1.b = t2.b where charset(t2.a) = _utf8 'binary' order by t1.a asc, t2.a asc 3426 END 3427 INPUT 3428 select 1 from (select 1) as a; 3429 END 3430 OUTPUT 3431 select 1 from (select 1 from dual) as a 3432 END 3433 INPUT 3434 select t1.name, t2.name, t2.id from t2 right join t1 on (t1.id = t2.owner); 3435 END 3436 OUTPUT 3437 select t1.`name`, t2.`name`, t2.id from t2 right join t1 on t1.id = t2.owner 3438 END 3439 INPUT 3440 select column_name from information_schema.columns where table_schema='test' and table_name='t1'; 3441 END 3442 OUTPUT 3443 select column_name from information_schema.`columns` where table_schema = 'test' and table_name = 't1' 3444 END 3445 INPUT 3446 select a1,a2,b,min(c) from t1 where (ord(a1) > 97) and (ord(a2) + ord(a1) > 194) and (b = 'c') group by a1,a2,b; 3447 END 3448 OUTPUT 3449 select a1, a2, b, min(c) from t1 where ord(a1) > 97 and ord(a2) + ord(a1) > 194 and b = 'c' group by a1, a2, b 3450 END 3451 INPUT 3452 select var_samp(s), var_pop(s) from bug22555; 3453 END 3454 OUTPUT 3455 select var_samp(s), var_pop(s) from bug22555 3456 END 3457 INPUT 3458 select cast(sum(distinct ff) as decimal(5,2)) from t2; 3459 END 3460 OUTPUT 3461 select convert(sum(distinct ff), decimal(5, 2)) from t2 3462 END 3463 INPUT 3464 select substring_index('the king of the the hill',' ',-1); 3465 END 3466 OUTPUT 3467 select substring_index('the king of the the hill', ' ', -1) from dual 3468 END 3469 INPUT 3470 select a1, max(c) from t2 where a1 in ('a','b','d') group by a1,a2,b; 3471 END 3472 OUTPUT 3473 select a1, max(c) from t2 where a1 in ('a', 'b', 'd') group by a1, a2, b 3474 END 3475 INPUT 3476 select sum(col1) as co12 from t1 group by col2 having col2 10; 3477 END 3478 ERROR 3479 syntax error at position 62 near '10' 3480 END 3481 INPUT 3482 select 1, min(a) from t1i where 1=99; 3483 END 3484 OUTPUT 3485 select 1, min(a) from t1i where 1 = 99 3486 END 3487 INPUT 3488 select microsecond(19971231235959.01) as a; 3489 END 3490 OUTPUT 3491 select microsecond(19971231235959.01) as a from dual 3492 END 3493 INPUT 3494 select addtime("-01:01:01.01", "-23:59:59.1") as a; 3495 END 3496 OUTPUT 3497 select addtime('-01:01:01.01', '-23:59:59.1') as a from dual 3498 END 3499 INPUT 3500 select timediff("2000:01:01 00:00:00", "2000:01:01 00:00:00.000001"); 3501 END 3502 OUTPUT 3503 select timediff('2000:01:01 00:00:00', '2000:01:01 00:00:00.000001') from dual 3504 END 3505 INPUT 3506 select rpad('hello', -18446744073709551617, '1'); 3507 END 3508 OUTPUT 3509 select rpad('hello', -18446744073709551617, '1') from dual 3510 END 3511 INPUT 3512 select c,count(t) from t1 group by c order by c limit 10; 3513 END 3514 OUTPUT 3515 select c, count(t) from t1 group by c order by c asc limit 10 3516 END 3517 INPUT 3518 select substring('hello', -1, 1); 3519 END 3520 OUTPUT 3521 select substr('hello', -1, 1) from dual 3522 END 3523 INPUT 3524 select from information_schema.user_privileges where grantee like '%user%' and grantee not like '%session%' order by grantee; 3525 END 3526 ERROR 3527 syntax error at position 12 near 'from' 3528 END 3529 INPUT 3530 select hex(substr(_utf32 0x000000e4000000e500000068,-3)); 3531 END 3532 OUTPUT 3533 select hex(substr(_utf32 0x000000e4000000e500000068, -3)) from dual 3534 END 3535 INPUT 3536 select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121'); 3537 END 3538 OUTPUT 3539 select distinct a1, a2, b, c from t2 where a2 >= 'b' and b = 'a' and c = 'i121' 3540 END 3541 INPUT 3542 select concat("-",a,"-",b,"-") from t1 where b="hello "; 3543 END 3544 OUTPUT 3545 select concat('-', a, '-', b, '-') from t1 where b = 'hello ' 3546 END 3547 INPUT 3548 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_slovenian_ci; 3549 END 3550 OUTPUT 3551 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_slovenian_ci 3552 END 3553 INPUT 3554 select 123; 3555 END 3556 OUTPUT 3557 select 123 from dual 3558 END 3559 INPUT 3560 select round(1.5, -4294967296), round(1.5, 4294967296); 3561 END 3562 OUTPUT 3563 select round(1.5, -4294967296), round(1.5, 4294967296) from dual 3564 END 3565 INPUT 3566 select from t1 where MATCH(a,b) AGAINST ("indexes collections" WITH QUERY EXPANSION); 3567 END 3568 ERROR 3569 syntax error at position 12 near 'from' 3570 END 3571 INPUT 3572 select a1,a2,b,min(c),max(c) from t1 where (b = 'b') group by a1,a2; 3573 END 3574 OUTPUT 3575 select a1, a2, b, min(c), max(c) from t1 where b = 'b' group by a1, a2 3576 END 3577 INPUT 3578 select round(5.64,1),round(5.64,2),round(5.64,-1),round(5.64,-2); 3579 END 3580 OUTPUT 3581 select round(5.64, 1), round(5.64, 2), round(5.64, -1), round(5.64, -2) from dual 3582 END 3583 INPUT 3584 select max(a5) from t1 where a5 < date'1970-01-01'; 3585 END 3586 ERROR 3587 syntax error at position 51 near '1970-01-01' 3588 END 3589 INPUT 3590 select i.name as k, f.name as c from information_schema.innodb_tables as t, information_schema.innodb_indexes as i, information_schema.innodb_fields as f where t.name='test/t1' and t.table_id = i.table_id and i.index_id = f.index_id order by k, c; 3591 END 3592 OUTPUT 3593 select i.`name` as k, f.`name` as c from information_schema.innodb_tables as t, information_schema.innodb_indexes as i, information_schema.innodb_fields as f where t.`name` = 'test/t1' and t.table_id = i.table_id and i.index_id = f.index_id order by k asc, c asc 3594 END 3595 INPUT 3596 select mid(@my_uuid,15,1); 3597 END 3598 OUTPUT 3599 select mid(@my_uuid, 15, 1) from dual 3600 END 3601 INPUT 3602 select collation(concat_ws(_latin2'a',_latin2'b')), coercibility(concat_ws(_latin2'a',_latin2'b')); 3603 END 3604 OUTPUT 3605 select collation(concat_ws(_latin2 'a', _latin2 'b')), coercibility(concat_ws(_latin2 'a', _latin2 'b')) from dual 3606 END 3607 INPUT 3608 select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('point(1 1)')); 3609 END 3610 OUTPUT 3611 select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('point(1 1)')) from dual 3612 END 3613 INPUT 3614 select date_add("1997-12-31 23:59:59",INTERVAL 1 MINUTE); 3615 END 3616 OUTPUT 3617 select date_add('1997-12-31 23:59:59', interval 1 MINUTE) from dual 3618 END 3619 INPUT 3620 select hex(_utf32 X'103344'); 3621 END 3622 OUTPUT 3623 select hex(_utf32 X'103344') from dual 3624 END 3625 INPUT 3626 select substring('hello', 4294967296, 1); 3627 END 3628 OUTPUT 3629 select substr('hello', 4294967296, 1) from dual 3630 END 3631 INPUT 3632 select last_day('2005-01-00'); 3633 END 3634 OUTPUT 3635 select last_day('2005-01-00') from dual 3636 END 3637 INPUT 3638 select t2.b,t1.b,t1.a from t2 inner join t1 on 1 cross join t2 a on 1 group by t1.b; 3639 END 3640 OUTPUT 3641 select t2.b, t1.b, t1.a from t2 join t1 on 1 join t2 as a on 1 group by t1.b 3642 END 3643 INPUT 3644 select FIELD(_latin2'b','A','B'); 3645 END 3646 OUTPUT 3647 select FIELD(_latin2 'b', 'A', 'B') from dual 3648 END 3649 INPUT 3650 select from t1 where name='patnom' and author='patauteur' and category=0; 3651 END 3652 ERROR 3653 syntax error at position 12 near 'from' 3654 END 3655 INPUT 3656 select std(s1/s2) from bug22555 where i=1; 3657 END 3658 OUTPUT 3659 select std(s1 / s2) from bug22555 where i = 1 3660 END 3661 INPUT 3662 select ST_astext(st_intersection(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_difference(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); 3663 END 3664 OUTPUT 3665 select ST_astext(st_intersection(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_difference(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual 3666 END 3667 INPUT 3668 select 'a' union select concat('a', -0.0); 3669 END 3670 OUTPUT 3671 select 'a' from dual union select concat('a', -0.0) from dual 3672 END 3673 INPUT 3674 select 9223372036854775808+1; 3675 END 3676 OUTPUT 3677 select 9223372036854775808 + 1 from dual 3678 END 3679 INPUT 3680 select inet_ntoa(1099511627775),inet_ntoa(4294902271),inet_ntoa(511); 3681 END 3682 OUTPUT 3683 select inet_ntoa(1099511627775), inet_ntoa(4294902271), inet_ntoa(511) from dual 3684 END 3685 INPUT 3686 select a1,a2,b,min(c),max(c) from t2 where (c > 'b1') group by a1,a2,b; 3687 END 3688 OUTPUT 3689 select a1, a2, b, min(c), max(c) from t2 where c > 'b1' group by a1, a2, b 3690 END 3691 INPUT 3692 select date_add("1997-12-31 23:59:59",INTERVAL "1 1" YEAR_MONTH); 3693 END 3694 OUTPUT 3695 select date_add('1997-12-31 23:59:59', interval '1 1' YEAR_MONTH) from dual 3696 END 3697 INPUT 3698 select distinct pk from v1; 3699 END 3700 OUTPUT 3701 select distinct pk from v1 3702 END 3703 INPUT 3704 select ST_DISTANCE(ST_GeomFromText('polygon((0 0, 1 2, 2 1, 0 0))'), ST_GeomFromText('linestring(0 1, 1 0)')); 3705 END 3706 OUTPUT 3707 select ST_DISTANCE(ST_GeomFromText('polygon((0 0, 1 2, 2 1, 0 0))'), ST_GeomFromText('linestring(0 1, 1 0)')) from dual 3708 END 3709 INPUT 3710 select mod(12.0, NULL) as 'NULL'; 3711 END 3712 OUTPUT 3713 select mod(12.0, null) as `NULL` from dual 3714 END 3715 INPUT 3716 select from v1c join v2a on v1c.b = v2a.c; 3717 END 3718 ERROR 3719 syntax error at position 12 near 'from' 3720 END 3721 INPUT 3722 select count(*) from t1 where match a against ('aaaxxx' in boolean mode); 3723 END 3724 ERROR 3725 syntax error at position 38 near 'a' 3726 END 3727 INPUT 3728 select date_add("1997-12-31 23:59:59.000002",INTERVAL "10000 99:99:99.999999" DAY_MICROSECOND); 3729 END 3730 OUTPUT 3731 select date_add('1997-12-31 23:59:59.000002', interval '10000 99:99:99.999999' DAY_MICROSECOND) from dual 3732 END 3733 INPUT 3734 select from t5 where a < 3; 3735 END 3736 ERROR 3737 syntax error at position 12 near 'from' 3738 END 3739 INPUT 3740 select count(*) from t1 where a = 100; 3741 END 3742 OUTPUT 3743 select count(*) from t1 where a = 100 3744 END 3745 INPUT 3746 select ST_area(ST_PolygonFromText('POLYGON((10 10,20 10,20 20,10 20, 10 10))')); 3747 END 3748 OUTPUT 3749 select ST_area(ST_PolygonFromText('POLYGON((10 10,20 10,20 20,10 20, 10 10))')) from dual 3750 END 3751 INPUT 3752 select min(a3) from t1 where a2 = 2 and a3 >= 'SEA' and a3 = 'MIN'; 3753 END 3754 OUTPUT 3755 select min(a3) from t1 where a2 = 2 and a3 >= 'SEA' and a3 = 'MIN' 3756 END 3757 INPUT 3758 select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2); 3759 END 3760 OUTPUT 3761 select log(exp(10)), exp(log(sqrt(10)) * 2), log(-1), log(null), log(1, 1), log(3, 9), log(-1, 2), log(null, 2) from dual 3762 END 3763 INPUT 3764 select max(t2.a2), max(t1.a1) from t1, t2; 3765 END 3766 OUTPUT 3767 select max(t2.a2), max(t1.a1) from t1, t2 3768 END 3769 INPUT 3770 select from `information_schema`.`VIEWS` where `TABLE_SCHEMA` = NULL; 3771 END 3772 ERROR 3773 syntax error at position 12 near 'from' 3774 END 3775 INPUT 3776 select 1 like 2 xor 2 like 1; 3777 END 3778 OUTPUT 3779 select 1 like 2 xor 2 like 1 from dual 3780 END 3781 INPUT 3782 select from bug15205_2; 3783 END 3784 ERROR 3785 syntax error at position 12 near 'from' 3786 END 3787 INPUT 3788 select count(*) from t where id>=8894754949779693574 and id <=17790886498483827171; 3789 END 3790 OUTPUT 3791 select count(*) from t where id >= 8894754949779693574 and id <= 17790886498483827171 3792 END 3793 INPUT 3794 select hex(weight_string(_utf32 0x10001)); 3795 END 3796 OUTPUT 3797 select hex(weight_string(_utf32 0x10001)) from dual 3798 END 3799 INPUT 3800 select t2.isbn,city,@bar:=t1.libname,count(distinct t1.libname) as a from t3 left join t1 on t3.libname=t1.libname left join t2 on t3.isbn=t2.isbn group by city having count(distinct t1.libname) > 1; 3801 END 3802 ERROR 3803 syntax error at position 26 near ':' 3804 END 3805 INPUT 3806 select format('f','')<=replace(1,1,mid(0xd9,2,1)); 3807 END 3808 OUTPUT 3809 select format('f', '') <= replace(1, 1, mid(0xd9, 2, 1)) from dual 3810 END 3811 INPUT 3812 select substring('hello', 4294967295, 4294967295); 3813 END 3814 OUTPUT 3815 select substr('hello', 4294967295, 4294967295) from dual 3816 END 3817 INPUT 3818 select @@warning_count; 3819 END 3820 OUTPUT 3821 select @@warning_count from dual 3822 END 3823 INPUT 3824 select 2 as a from (select from t1) b; 3825 END 3826 ERROR 3827 syntax error at position 32 near 'from' 3828 END 3829 INPUT 3830 select benchmark(100, (select avg(func_26093_a(a)) from table_26093)); 3831 END 3832 OUTPUT 3833 select benchmark(100, (select avg(func_26093_a(a)) from table_26093)) from dual 3834 END 3835 INPUT 3836 select abs(cast(-2 as unsigned)), abs(18446744073709551614), abs(-2); 3837 END 3838 OUTPUT 3839 select abs(convert(-2, unsigned)), abs(18446744073709551614), abs(-2) from dual 3840 END 3841 INPUT 3842 select hex(substr(_utf32 0x000000e4000000e500000068,3)); 3843 END 3844 OUTPUT 3845 select hex(substr(_utf32 0x000000e4000000e500000068, 3)) from dual 3846 END 3847 INPUT 3848 select concat('|',c,'|') from t1; 3849 END 3850 OUTPUT 3851 select concat('|', c, '|') from t1 3852 END 3853 INPUT 3854 select group_concat(c order by (select concat(t1.c,group_concat(c)) from t2 where a=t1.a)) as grp from t1; 3855 END 3856 OUTPUT 3857 select group_concat(c order by (select concat(t1.c, group_concat(c)) from t2 where a = t1.a) asc) as grp from t1 3858 END 3859 INPUT 3860 select s1,count(s1) from t1 group by s1 collate latin1_swedish_ci having s1 = 'y'; 3861 END 3862 OUTPUT 3863 select s1, count(s1) from t1 group by s1 collate latin1_swedish_ci having s1 = 'y' 3864 END 3865 INPUT 3866 select group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a)) as grp from t1; 3867 END 3868 OUTPUT 3869 select group_concat(c order by (select mid(group_concat(c order by a asc), 1, 5) from t2 where t2.a = t1.a) asc) as grp from t1 3870 END 3871 INPUT 3872 select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b; 3873 END 3874 OUTPUT 3875 select a1, a2, b, min(c) from t1 where (a1 > 'a' or a1 < '9') and (a2 >= 'b' and a2 < 'z') and b = 'a' and (c < 'h112' or c = 'j121' or c > 'k121' and c < 'm122' or c > 'o122') group by a1, a2, b 3876 END 3877 INPUT 3878 select a, quote(a), isnull(quote(a)), quote(a) is null, ifnull(quote(a), 'n') from t1; 3879 END 3880 OUTPUT 3881 select a, quote(a), isnull(quote(a)), quote(a) is null, ifnull(quote(a), 'n') from t1 3882 END 3883 INPUT 3884 select count(*) from t3; 3885 END 3886 OUTPUT 3887 select count(*) from t3 3888 END 3889 INPUT 3890 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_turkish_ci; 3891 END 3892 OUTPUT 3893 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_turkish_ci 3894 END 3895 INPUT 3896 select round(1.5, 18446744073709551615), truncate(1.5, 18446744073709551615); 3897 END 3898 OUTPUT 3899 select round(1.5, 18446744073709551615), truncate(1.5, 18446744073709551615) from dual 3900 END 3901 INPUT 3902 select a2 from t1 join t2 using (a1) join t3 on b=c1 join t4 using (c2); 3903 END 3904 OUTPUT 3905 select a2 from t1 join t2 using (a1) join t3 on b = c1 join t4 using (c2) 3906 END 3907 INPUT 3908 select t1.c1 as c2 from t1, t2 where t1.c2 = t2.c4 group by c2; 3909 END 3910 OUTPUT 3911 select t1.c1 as c2 from t1, t2 where t1.c2 = t2.c4 group by c2 3912 END 3913 INPUT 3914 select count(*) from t1 where t='a'; 3915 END 3916 OUTPUT 3917 select count(*) from t1 where t = 'a' 3918 END 3919 INPUT 3920 select row_number() over (), value,description,COUNT(bug_id) from t2 left join t1 on t2.program=t1.product and t2.value=t1.component where program="AAAAA" group by value having COUNT(bug_id) IN (0,2); 3921 END 3922 ERROR 3923 syntax error at position 27 3924 END 3925 INPUT 3926 select from t1 where lower(a)='aaa'; 3927 END 3928 ERROR 3929 syntax error at position 12 near 'from' 3930 END 3931 INPUT 3932 select a1,min(c),max(c) from t2 where a1 >= 'b' group by a1,a2,b; 3933 END 3934 OUTPUT 3935 select a1, min(c), max(c) from t2 where a1 >= 'b' group by a1, a2, b 3936 END 3937 INPUT 3938 select table_name,column_name from information_schema.COLUMNS where table_schema like "test%" order by table_name, column_name; 3939 END 3940 OUTPUT 3941 select table_name, column_name from information_schema.`COLUMNS` where table_schema like 'test%' order by table_name asc, column_name asc 3942 END 3943 INPUT 3944 select from v0; 3945 END 3946 ERROR 3947 syntax error at position 12 near 'from' 3948 END 3949 INPUT 3950 select ST_astext(st_symdifference(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); 3951 END 3952 OUTPUT 3953 select ST_astext(st_symdifference(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual 3954 END 3955 INPUT 3956 select 2; 3957 END 3958 OUTPUT 3959 select 2 from dual 3960 END 3961 INPUT 3962 select _latin1'B' in (_latin1'a',_latin2'b'); 3963 END 3964 OUTPUT 3965 select _latin1 'B' in (_latin1 'a', _latin2 'b') from dual 3966 END 3967 INPUT 3968 select right('hello', -4294967297); 3969 END 3970 OUTPUT 3971 select right('hello', -4294967297) from dual 3972 END 3973 INPUT 3974 select timestampdiff(month,'2003-02-28','2005-02-28'); 3975 END 3976 OUTPUT 3977 select timestampdiff(month, '2003-02-28', '2005-02-28') from dual 3978 END 3979 INPUT 3980 select t1.a,t3.a from t1,(select from t2 where b='c') as t3 where t1.a = t3.a; 3981 END 3982 ERROR 3983 syntax error at position 38 near 'from' 3984 END 3985 INPUT 3986 select ST_astext(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(1, 0), Point(0, 0)))); 3987 END 3988 OUTPUT 3989 select ST_astext(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(1, 0), Point(0, 0)))) from dual 3990 END 3991 INPUT 3992 select host,user from mysql.user where User='myuser'; 3993 END 3994 OUTPUT 3995 select host, `user` from mysql.`user` where `User` = 'myuser' 3996 END 3997 INPUT 3998 select from t5 natural right join (t4 natural right join ((t2 natural right join t1) natural right join t3)); 3999 END 4000 ERROR 4001 syntax error at position 12 near 'from' 4002 END 4003 INPUT 4004 select count(distinct concat(c1, repeat('xx', 250))) as cc from t2 order by 1; 4005 END 4006 OUTPUT 4007 select count(distinct concat(c1, repeat('xx', 250))) as cc from t2 order by 1 asc 4008 END 4009 INPUT 4010 select X.a from t1 AS X group by X.b having (x.b = 1); 4011 END 4012 OUTPUT 4013 select X.a from t1 as X group by X.b having x.b = 1 4014 END 4015 INPUT 4016 select count(*) from t1 where id IS NULL; 4017 END 4018 OUTPUT 4019 select count(*) from t1 where id is null 4020 END 4021 INPUT 4022 select SQL_BIG_RESULT distinct from t1, t2 order by 1, 2, 3, 4; 4023 END 4024 ERROR 4025 syntax error at position 31 near 'distinct' 4026 END 4027 INPUT 4028 select benchmark(100, (select avg(func_26093_b(a, rand())) from table_26093)); 4029 END 4030 OUTPUT 4031 select benchmark(100, (select avg(func_26093_b(a, rand())) from table_26093)) from dual 4032 END 4033 INPUT 4034 select @topic1_id:= 10101; 4035 END 4036 ERROR 4037 syntax error at position 19 near ':' 4038 END 4039 INPUT 4040 select locate(_ujis 0xa2a1,_ujis 0xa1a2a1a3 collate ujis_bin); 4041 END 4042 OUTPUT 4043 select locate(_ujis 0xa2a1, _ujis 0xa1a2a1a3 collate ujis_bin) from dual 4044 END 4045 INPUT 4046 select 1 as a union all select 1 union all select 2 union select 1 union all select 2; 4047 END 4048 OUTPUT 4049 select 1 as a from dual union all select 1 from dual union all select 2 from dual union select 1 from dual union all select 2 from dual 4050 END 4051 INPUT 4052 select mod(5, cast(-2 as unsigned)), mod(5, 18446744073709551614), mod(5, -2); 4053 END 4054 OUTPUT 4055 select mod(5, convert(-2, unsigned)), mod(5, 18446744073709551614), mod(5, -2) from dual 4056 END 4057 INPUT 4058 select _koi8r'a' = _koi8r'A'; 4059 END 4060 OUTPUT 4061 select _koi8r 'a' = _koi8r 'A' from dual 4062 END 4063 INPUT 4064 select collation(char(130)), coercibility(hex(130)); 4065 END 4066 OUTPUT 4067 select collation(char(130)), coercibility(hex(130)) from dual 4068 END 4069 INPUT 4070 select from_unixtime(2147483647); 4071 END 4072 OUTPUT 4073 select from_unixtime(2147483647) from dual 4074 END 4075 INPUT 4076 select release_lock('mysqltest_lock'); 4077 END 4078 OUTPUT 4079 select release_lock('mysqltest_lock') from dual 4080 END 4081 INPUT 4082 select collation(make_set(255,_latin2'a',_latin2'b',_latin2'c')), coercibility(make_set(255,_latin2'a',_latin2'b',_latin2'c')); 4083 END 4084 OUTPUT 4085 select collation(make_set(255, _latin2 'a', _latin2 'b', _latin2 'c')), coercibility(make_set(255, _latin2 'a', _latin2 'b', _latin2 'c')) from dual 4086 END 4087 INPUT 4088 select a$1, $b, c$ from mysqltest.$test1; 4089 END 4090 OUTPUT 4091 select a$1, $b, c$ from mysqltest.$test1 4092 END 4093 INPUT 4094 select database(), user(); 4095 END 4096 OUTPUT 4097 select database(), user() from dual 4098 END 4099 INPUT 4100 select group_concat(a,c,null) from t1; 4101 END 4102 OUTPUT 4103 select group_concat(a, c, null) from t1 4104 END 4105 INPUT 4106 select a1,a2,b, max(c) from t1 where (b = 'b') group by a1,a2; 4107 END 4108 OUTPUT 4109 select a1, a2, b, max(c) from t1 where b = 'b' group by a1, a2 4110 END 4111 INPUT 4112 select database() = _latin1"test"; 4113 END 4114 OUTPUT 4115 select database() = _latin1 'test' from dual 4116 END 4117 INPUT 4118 select date_add("1997-12-31 23:59:59.000002",INTERVAL "10000:99.999999" MINUTE_MICROSECOND); 4119 END 4120 OUTPUT 4121 select date_add('1997-12-31 23:59:59.000002', interval '10000:99.999999' MINUTE_MICROSECOND) from dual 4122 END 4123 INPUT 4124 select insert(_ucs2 0x006100620063,1,2,_ucs2 0x006400650066); 4125 END 4126 ERROR 4127 syntax error at position 14 near 'insert' 4128 END 4129 INPUT 4130 select hex(@utf81); 4131 END 4132 OUTPUT 4133 select hex(@utf81) from dual 4134 END 4135 INPUT 4136 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_german2_ci; 4137 END 4138 OUTPUT 4139 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_german2_ci 4140 END 4141 INPUT 4142 select case when 1>0 then "TRUE" else "FALSE" END; 4143 END 4144 OUTPUT 4145 select case when 1 > 0 then 'TRUE' else 'FALSE' end from dual 4146 END 4147 INPUT 4148 select aes_encrypt("a",NULL); 4149 END 4150 OUTPUT 4151 select aes_encrypt('a', null) from dual 4152 END 4153 INPUT 4154 select hex(weight_string('aa' as char(3))); 4155 END 4156 ERROR 4157 syntax error at position 39 4158 END 4159 INPUT 4160 select date_add("1997-12-31 23:59:59",INTERVAL "1:1" HOUR_MINUTE); 4161 END 4162 OUTPUT 4163 select date_add('1997-12-31 23:59:59', interval '1:1' HOUR_MINUTE) from dual 4164 END 4165 INPUT 4166 select ST_astext(ST_buffer(ST_geometryfromtext('point(1 1)'), 1)); 4167 END 4168 OUTPUT 4169 select ST_astext(ST_buffer(ST_geometryfromtext('point(1 1)'), 1)) from dual 4170 END 4171 INPUT 4172 select concat(a,if(b<10,_ucs2 0x00C0,_ucs2 0x0062)) from t1; 4173 END 4174 OUTPUT 4175 select concat(a, if(b < 10, _ucs2 0x00C0, _ucs2 0x0062)) from t1 4176 END 4177 INPUT 4178 select substring_index('aaaaaaaaa1','aaaa',2); 4179 END 4180 OUTPUT 4181 select substring_index('aaaaaaaaa1', 'aaaa', 2) from dual 4182 END 4183 INPUT 4184 select t1.* as 'with_alias', t1.* as 'alias2' from t1; 4185 END 4186 ERROR 4187 syntax error at position 15 near 'as' 4188 END 4189 INPUT 4190 select @@session.time_zone into @save_tz; 4191 END 4192 ERROR 4193 syntax error at position 41 near 'save_tz' 4194 END 4195 INPUT 4196 select count(*), min(7), max(7) from t1m, t1i; 4197 END 4198 OUTPUT 4199 select count(*), min(7), max(7) from t1m, t1i 4200 END 4201 INPUT 4202 select password_lifetime from mysql.user where user='wl7131'; 4203 END 4204 OUTPUT 4205 select password_lifetime from mysql.`user` where `user` = 'wl7131' 4206 END 4207 INPUT 4208 select from myUC; 4209 END 4210 ERROR 4211 syntax error at position 12 near 'from' 4212 END 4213 INPUT 4214 select id >= 0 and id <= 5 as grp,count(*) from t1 group by grp; 4215 END 4216 OUTPUT 4217 select id >= 0 and id <= 5 as grp, count(*) from t1 group by grp 4218 END 4219 INPUT 4220 select 'y'='~'; 4221 END 4222 OUTPUT 4223 select 'y' = '~' from dual 4224 END 4225 INPUT 4226 select from t1 where i between 2 and 4 and v in ('def','3r4f','lmn'); 4227 END 4228 ERROR 4229 syntax error at position 12 near 'from' 4230 END 4231 INPUT 4232 select from t1 where c1='b'; 4233 END 4234 ERROR 4235 syntax error at position 12 near 'from' 4236 END 4237 INPUT 4238 select datediff("1997-11-30 23:59:59.000001","1997-12-31"); 4239 END 4240 OUTPUT 4241 select datediff('1997-11-30 23:59:59.000001', '1997-12-31') from dual 4242 END 4243 INPUT 4244 select @topic2_id:= 10102; 4245 END 4246 ERROR 4247 syntax error at position 19 near ':' 4248 END 4249 INPUT 4250 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_hungarian_ci; 4251 END 4252 OUTPUT 4253 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_hungarian_ci 4254 END 4255 INPUT 4256 select hex(a) from t1 order by a; 4257 END 4258 OUTPUT 4259 select hex(a) from t1 order by a asc 4260 END 4261 INPUT 4262 select date_add(date,INTERVAL "1:1" DAY_HOUR) from t1; 4263 END 4264 OUTPUT 4265 select date_add(`date`, interval '1:1' DAY_HOUR) from t1 4266 END 4267 INPUT 4268 select from v1a join v1b on t1.b = t2.b; 4269 END 4270 ERROR 4271 syntax error at position 12 near 'from' 4272 END 4273 INPUT 4274 select date_sub("1998-01-01 00:00:00",INTERVAL "1 1:1:1" DAY_SECOND); 4275 END 4276 OUTPUT 4277 select date_sub('1998-01-01 00:00:00', interval '1 1:1:1' DAY_SECOND) from dual 4278 END 4279 INPUT 4280 select cast(rtrim(ltrim(' 20.06 ')) as decimal(19,2)); 4281 END 4282 OUTPUT 4283 select convert(rtrim(ltrim(' 20.06 ')), decimal(19, 2)) from dual 4284 END 4285 INPUT 4286 select from t1 where MATCH a,b AGAINST ('"xt indexes"' IN BOOLEAN MODE); 4287 END 4288 ERROR 4289 syntax error at position 12 near 'from' 4290 END 4291 INPUT 4292 select max(value) from t1 AS m LEFT JOIN t2 AS c1 ON m.c1id = c1.id AND c1.active = 'Yes' LEFT JOIN t3 AS c2 ON m.c2id = c2.id AND c2.active = 'Yes' WHERE m.pid=1 AND (c1.id IS NOT NULL OR c2.id IS NOT NULL); 4293 END 4294 OUTPUT 4295 select max(value) from t1 as m left join t2 as c1 on m.c1id = c1.id and c1.active = 'Yes' left join t3 as c2 on m.c2id = c2.id and c2.active = 'Yes' where m.pid = 1 and (c1.id is not null or c2.id is not null) 4296 END 4297 INPUT 4298 select from t1 where a in (select a from t11) order by 1, 2, 3 limit 1; 4299 END 4300 ERROR 4301 syntax error at position 12 near 'from' 4302 END 4303 INPUT 4304 select from t1 where a='807780' and b='477' and c='165'; 4305 END 4306 ERROR 4307 syntax error at position 12 near 'from' 4308 END 4309 INPUT 4310 select timestampdiff(month,'1999-09-11','2001-9-11'); 4311 END 4312 OUTPUT 4313 select timestampdiff(month, '1999-09-11', '2001-9-11') from dual 4314 END 4315 INPUT 4316 select ST_astext(st_intersection(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); 4317 END 4318 OUTPUT 4319 select ST_astext(st_intersection(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual 4320 END 4321 INPUT 4322 select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 1 0, 1 1, 0 1, 0 0))'), st_geomfromtext('polygon((2 0, 3 0, 3 1, 2 1, 2 0))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 2 0, 2 1, 0 1, 0 0))'), st_geomfromtext('polygon((1 0, 3 0, 3 1, 1 1, 1 0))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 1 0, 1 1, 0 1, 0 0))'), st_geomfromtext('polygon((1 0, 2 0, 2 1, 1 1, 1 0))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 10 0, 10 3, 0 3, 0 0))'), st_geomfromtext('polygon((0 5, 1 3, 2 5, 0 5))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 10 0, 10 3, 0 3, 0 0))'), st_geomfromtext('polygon((0 5, 1 3, 2 5, 3 3, 4 3, 4 5, 0 5))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 10 0, 10 3, 0 3, 0 0))'), st_geomfromtext('polygon((0 5, 1 3, 2 5, 3 2, 6 2, 6 5, 0 5))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 10 0, 10 3, 0 3, 0 0))'), st_geomfromtext('polygon((0 5, 1 3, 4 3, 4 2, 6 2, 6 5, 0 5))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 10 0, 10 3, 0 3, 0 0))'), st_geomfromtext('polygon((0 5, 1 3, 4 3, 4 0, 6 0, 6 3, 5 3, 5 5, 0 5))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 10 0, 10 3, 0 3, 0 0))'), st_geomfromtext('polygon((0 5, 1 3, 2 5, 3 3, 4 3, 4 2, 6 2, 6 5, 0 5))'))) select st_astext(st_intersection( st_geomfromtext('polygon((0 0, 10 0, 10 3, 0 3, 0 0))'), st_geomfromtext('polygon((0 5, 1 3, 2 5, 3 3, 4 3, 4 0, 10 0, 10 3, 6 3, 6 5, 0 5))'))) SELECT ST_AsText(ST_GeomFromText("POINT(10 11) POINT(11 12)")) as result; 4323 END 4324 ERROR 4325 syntax error at position 152 near 'select' 4326 END 4327 INPUT 4328 select a1,a2,b,min(c),max(c) from t2 where (c > 'f123') group by a1,a2,b; 4329 END 4330 OUTPUT 4331 select a1, a2, b, min(c), max(c) from t2 where c > 'f123' group by a1, a2, b 4332 END 4333 INPUT 4334 select from t1_base; 4335 END 4336 ERROR 4337 syntax error at position 12 near 'from' 4338 END 4339 INPUT 4340 select @iv; 4341 END 4342 OUTPUT 4343 select @iv from dual 4344 END 4345 INPUT 4346 select from t1 where str is null; 4347 END 4348 ERROR 4349 syntax error at position 12 near 'from' 4350 END 4351 INPUT 4352 select _koi8r 0xFF regexp _koi8r '[[:upper:]]' COLLATE koi8r_bin; 4353 END 4354 OUTPUT 4355 select _koi8r 0xFF regexp _koi8r '[[:upper:]]' collate koi8r_bin from dual 4356 END 4357 INPUT 4358 select from t1 left join t2 on (t1.i=t2.i) left join t3 on (t2.i=t3.i); 4359 END 4360 ERROR 4361 syntax error at position 12 near 'from' 4362 END 4363 INPUT 4364 select from mysqltest1.t22; 4365 END 4366 ERROR 4367 syntax error at position 12 near 'from' 4368 END 4369 INPUT 4370 select round(999999999999999999, -18); 4371 END 4372 OUTPUT 4373 select round(999999999999999999, -18) from dual 4374 END 4375 INPUT 4376 select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2); 4377 END 4378 OUTPUT 4379 select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D0B1D0B2) from dual 4380 END 4381 INPUT 4382 select from t1 where str="foo"; 4383 END 4384 ERROR 4385 syntax error at position 12 near 'from' 4386 END 4387 INPUT 4388 select date_add(datetime, INTERVAL 1 SECOND) from t1; 4389 END 4390 OUTPUT 4391 select date_add(`datetime`, interval 1 SECOND) from t1 4392 END 4393 INPUT 4394 select max(a) from t1; 4395 END 4396 OUTPUT 4397 select max(a) from t1 4398 END 4399 INPUT 4400 select t1.a1, t1.a2, t2.a1, t2.a2 from t1,t2; 4401 END 4402 OUTPUT 4403 select t1.a1, t1.a2, t2.a1, t2.a2 from t1, t2 4404 END 4405 INPUT 4406 select replace('aaaa','a','b'),replace('aaaa','aa','b'),replace('aaaa','a','bb'),replace('aaaa','','b'),replace('bbbb','a','c'); 4407 END 4408 OUTPUT 4409 select replace('aaaa', 'a', 'b'), replace('aaaa', 'aa', 'b'), replace('aaaa', 'a', 'bb'), replace('aaaa', '', 'b'), replace('bbbb', 'a', 'c') from dual 4410 END 4411 INPUT 4412 select _koi8r'a' = _koi8r'A' COLLATE koi8r_general_ci; 4413 END 4414 OUTPUT 4415 select _koi8r 'a' = _koi8r 'A' collate koi8r_general_ci from dual 4416 END 4417 INPUT 4418 select fld3 from t2 where fld3 like "%cultivation"; 4419 END 4420 OUTPUT 4421 select fld3 from t2 where fld3 like '%cultivation' 4422 END 4423 INPUT 4424 select t1.id, t2.id from t1, t2 where t2.id = t1.id; 4425 END 4426 OUTPUT 4427 select t1.id, t2.id from t1, t2 where t2.id = t1.id 4428 END 4429 INPUT 4430 select avg ( (select ( (select sum(outr.a + innr.a) from t1 as innr limit 1)) as tt from t1 as outr order by count(outr.a) limit 1)) as tt from t1 as most_outer; 4431 END 4432 OUTPUT 4433 select avg((select (select sum(outr.a + innr.a) from t1 as innr limit 1) as tt from t1 as outr order by count(outr.a) asc limit 1)) as tt from t1 as most_outer 4434 END 4435 INPUT 4436 select a1,a2,b,min(c),max(c) from t2 where a1 >= 'c' or a2 < 'b' group by a1,a2,b; 4437 END 4438 OUTPUT 4439 select a1, a2, b, min(c), max(c) from t2 where a1 >= 'c' or a2 < 'b' group by a1, a2, b 4440 END 4441 INPUT 4442 select from t1 where id <=>id; 4443 END 4444 ERROR 4445 syntax error at position 12 near 'from' 4446 END 4447 INPUT 4448 select hex(cast(9007199254740993 as decimal(30,0))); 4449 END 4450 OUTPUT 4451 select hex(convert(9007199254740993, decimal(30, 0))) from dual 4452 END 4453 INPUT 4454 select min(a3) from t1 where a2 = 4; 4455 END 4456 OUTPUT 4457 select min(a3) from t1 where a2 = 4 4458 END 4459 INPUT 4460 select count(T1.a) from t1; 4461 END 4462 OUTPUT 4463 select count(T1.a) from t1 4464 END 4465 INPUT 4466 select aes_decrypt("a","a"); 4467 END 4468 OUTPUT 4469 select aes_decrypt('a', 'a') from dual 4470 END 4471 INPUT 4472 select collation(group_concat(a,_koi8r'test')) from t1; 4473 END 4474 OUTPUT 4475 select collation(group_concat(a, _koi8r 'test')) from t1 4476 END 4477 INPUT 4478 select from t1 where match title against ('test' in boolean mode); 4479 END 4480 ERROR 4481 syntax error at position 12 near 'from' 4482 END 4483 INPUT 4484 select a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1; 4485 END 4486 OUTPUT 4487 select a1, a2, b, min(c) from t2 where a2 = 'a' and b is null group by a1 4488 END 4489 INPUT 4490 select *,substring(b,1),substring(b,-1),substring(b,-2),substring(b,-3),substring(b,-4),substring(b,-5) from t1; 4491 END 4492 OUTPUT 4493 select *, substr(b, 1), substr(b, -1), substr(b, -2), substr(b, -3), substr(b, -4), substr(b, -5) from t1 4494 END 4495 INPUT 4496 select TABLE_NAME,TABLE_TYPE,ENGINE from information_schema.tables where table_schema='information_schema' order by table_name collate utf8_general_ci limit 2; 4497 END 4498 OUTPUT 4499 select TABLE_NAME, TABLE_TYPE, `ENGINE` from information_schema.`tables` where table_schema = 'information_schema' order by table_name collate utf8_general_ci asc limit 2 4500 END 4501 INPUT 4502 select grp,group_concat(a order by a,d+c-ascii(c)-a) from t1 group by grp; 4503 END 4504 OUTPUT 4505 select grp, group_concat(a order by a asc, d + c - ascii(c) - a asc) from t1 group by grp 4506 END 4507 INPUT 4508 select from t1 union select from t2 order by 1, 2; 4509 END 4510 ERROR 4511 syntax error at position 12 near 'from' 4512 END 4513 INPUT 4514 select CAST(1-2 AS UNSIGNED); 4515 END 4516 OUTPUT 4517 select convert(1 - 2, UNSIGNED) from dual 4518 END 4519 INPUT 4520 select (with recursive dt as (select t1.a as a union all select a+1 from dt where a<10) select concat(count(*), ' - ', avg(dt.a)) from dt ) as subq from t1; 4521 END 4522 OUTPUT 4523 select (with recursive dt as (select t1.a as a from dual union all select a + 1 from dt where a < 10) select concat(count(*), ' - ', avg(dt.a)) from dt) as subq from t1 4524 END 4525 INPUT 4526 select substring_index('the king of the the hill',' ',-5); 4527 END 4528 OUTPUT 4529 select substring_index('the king of the the hill', ' ', -5) from dual 4530 END 4531 INPUT 4532 select min(f1),max(f1) from t1; 4533 END 4534 OUTPUT 4535 select min(f1), max(f1) from t1 4536 END 4537 INPUT 4538 select 1 as a limit 4294967296,10; 4539 END 4540 OUTPUT 4541 select 1 as a from dual limit 4294967296, 10 4542 END 4543 INPUT 4544 select timestampadd(MINUTE, 1, date) from t1; 4545 END 4546 OUTPUT 4547 select timestampadd(MINUTE, 1, `date`) from t1 4548 END 4549 INPUT 4550 select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200)'))); 4551 END 4552 OUTPUT 4553 select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200)'))) from dual 4554 END 4555 INPUT 4556 select TABLE_SCHEMA,TABLE_NAME FROM information_schema.TABLES where TABLE_SCHEMA ='mysqltest_LC2'; 4557 END 4558 OUTPUT 4559 select TABLE_SCHEMA, TABLE_NAME from information_schema.`TABLES` where TABLE_SCHEMA = 'mysqltest_LC2' 4560 END 4561 INPUT 4562 select hex(weight_string(0x010203)); 4563 END 4564 OUTPUT 4565 select hex(weight_string(0x010203)) from dual 4566 END 4567 INPUT 4568 select max(t2.a1) from t2 left outer join t1 on t2.a2=10 where t2.a2=20; 4569 END 4570 OUTPUT 4571 select max(t2.a1) from t2 left join t1 on t2.a2 = 10 where t2.a2 = 20 4572 END 4573 INPUT 4574 select length(_latin1'; 4575 END 4576 ERROR 4577 syntax error at position 24 near ';' 4578 END 4579 INPUT 4580 select _latin1'B' collate latin1_bin between _latin1'a' and _latin1'c'; 4581 END 4582 OUTPUT 4583 select _latin1 'B' collate latin1_bin between _latin1 'a' and _latin1 'c' from dual 4584 END 4585 INPUT 4586 select t1.i,t2.i,t3.i from t2 natural left join t3,t1 order by t1.i,t2.i,t3.i; 4587 END 4588 OUTPUT 4589 select t1.i, t2.i, t3.i from t2 natural left join t3, t1 order by t1.i asc, t2.i asc, t3.i asc 4590 END 4591 INPUT 4592 select char(2557 using utf8); 4593 END 4594 ERROR 4595 syntax error at position 23 near 'using' 4596 END 4597 INPUT 4598 select uncompressed_length(""); 4599 END 4600 OUTPUT 4601 select uncompressed_length('') from dual 4602 END 4603 INPUT 4604 select -1 >> 0, -1 << 0; 4605 END 4606 OUTPUT 4607 select -1 >> 0, -1 << 0 from dual 4608 END 4609 INPUT 4610 select a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b; 4611 END 4612 OUTPUT 4613 select a1, a2, b, c from t2 where a2 >= 'b' and b = 'a' and c = 'i121' group by a1, a2, b 4614 END 4615 INPUT 4616 select char_length(a), length(a), a from t1 order by a; 4617 END 4618 OUTPUT 4619 select char_length(a), length(a), a from t1 order by a asc 4620 END 4621 INPUT 4622 select t1.*,t2.* from t1 left join t2 on (t1.a=t2.a) order by t1.grp,t1.a,t2.c; 4623 END 4624 OUTPUT 4625 select t1.*, t2.* from t1 left join t2 on t1.a = t2.a order by t1.grp asc, t1.a asc, t2.c asc 4626 END 4627 INPUT 4628 select QN.a from (select 1 as a) as qn; 4629 END 4630 OUTPUT 4631 select QN.a from (select 1 as a from dual) as qn 4632 END 4633 INPUT 4634 select cast(pow(2,63)-1024 as signed) as pp; 4635 END 4636 OUTPUT 4637 select convert(pow(2, 63) - 1024, signed) as pp from dual 4638 END 4639 INPUT 4640 select yearweek("2000-01-01",1) as '2000', yearweek("2001-01-01",1) as '2001', yearweek("2002-01-01",1) as '2002',yearweek("2003-01-01",1) as '2003', yearweek("2004-01-01",1) as '2004', yearweek("2005-01-01",1) as '2005', yearweek("2006-01-01",1) as '2006'; 4641 END 4642 OUTPUT 4643 select yearweek('2000-01-01', 1) as `2000`, yearweek('2001-01-01', 1) as `2001`, yearweek('2002-01-01', 1) as `2002`, yearweek('2003-01-01', 1) as `2003`, yearweek('2004-01-01', 1) as `2004`, yearweek('2005-01-01', 1) as `2005`, yearweek('2006-01-01', 1) as `2006` from dual 4644 END 4645 INPUT 4646 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_turkish_ci; 4647 END 4648 OUTPUT 4649 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_turkish_ci 4650 END 4651 INPUT 4652 select char_length(_utf16 0xD87FDFFF), octet_length(_utf16 0xD87FDFFF); 4653 END 4654 OUTPUT 4655 select char_length(_utf16 0xD87FDFFF), octet_length(_utf16 0xD87FDFFF) from dual 4656 END 4657 INPUT 4658 select min(a) from t1i; 4659 END 4660 OUTPUT 4661 select min(a) from t1i 4662 END 4663 INPUT 4664 select from t1 where t1="ABCD"; 4665 END 4666 ERROR 4667 syntax error at position 12 near 'from' 4668 END 4669 INPUT 4670 select 1e18 cast('1.2' as decimal(3,2)); 4671 END 4672 ERROR 4673 syntax error at position 17 near 'cast' 4674 END 4675 INPUT 4676 select count(*) from t1 where a >= 10; 4677 END 4678 OUTPUT 4679 select count(*) from t1 where a >= 10 4680 END 4681 INPUT 4682 select extract(HOUR FROM "1999-01-02 10:11:12"); 4683 END 4684 OUTPUT 4685 select extract(hour from '1999-01-02 10:11:12') from dual 4686 END 4687 INPUT 4688 select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join t1 c on b.id = c.thread where match(b.betreff) against ('+abc' in boolean mode) group by a.text, b.id, b.betreff union select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join t1 c on b.id = c.thread where match(c.beitrag) against ('+abc' in boolean mode) group by a.text, b.id, b.betreff order by match(b.betreff) against ('+abc' in boolean mode) desc; 4689 END 4690 OUTPUT 4691 select a.`text`, b.id, b.betreff from t2 as a join t3 as b on a.id = b.forum join t1 as c on b.id = c.thread where match(b.betreff) against ('+abc' in boolean mode) group by a.`text`, b.id, b.betreff union select a.`text`, b.id, b.betreff from t2 as a join t3 as b on a.id = b.forum join t1 as c on b.id = c.thread where match(c.beitrag) against ('+abc' in boolean mode) group by a.`text`, b.id, b.betreff order by match(b.betreff) against ('+abc' in boolean mode) desc 4692 END 4693 INPUT 4694 select count(s1) from t1 group by s1 having count(1+1)=2; 4695 END 4696 OUTPUT 4697 select count(s1) from t1 group by s1 having count(1 + 1) = 2 4698 END 4699 INPUT 4700 select ST_AsText(a) from t2; 4701 END 4702 OUTPUT 4703 select ST_AsText(a) from t2 4704 END 4705 INPUT 4706 select count(distinct f) from t1; 4707 END 4708 OUTPUT 4709 select count(distinct f) from t1 4710 END 4711 INPUT 4712 select repeat('hello', -4294967297); 4713 END 4714 OUTPUT 4715 select repeat('hello', -4294967297) from dual 4716 END 4717 INPUT 4718 select a1, b, min(c), a1, max(c), b, a2, max(c), max(c) from t1 group by a1, a2, b; 4719 END 4720 OUTPUT 4721 select a1, b, min(c), a1, max(c), b, a2, max(c), max(c) from t1 group by a1, a2, b 4722 END 4723 INPUT 4724 select max(t1.a1), max(t2.a2) from t1, t2; 4725 END 4726 OUTPUT 4727 select max(t1.a1), max(t2.a2) from t1, t2 4728 END 4729 INPUT 4730 select from (select 2 from DUAL) b; 4731 END 4732 ERROR 4733 syntax error at position 12 near 'from' 4734 END 4735 INPUT 4736 select from t1 where field = '2006-11-06'; 4737 END 4738 ERROR 4739 syntax error at position 12 near 'from' 4740 END 4741 INPUT 4742 select _latin1'B' COLLATE latin1_general_ci in (_latin1'a',_latin1'b' COLLATE latin1_bin); 4743 END 4744 OUTPUT 4745 select _latin1 'B' collate latin1_general_ci in (_latin1 'a', _latin1 'b' collate latin1_bin) from dual 4746 END 4747 INPUT 4748 select substring_index('aaaaaaaaa1','aa',-5); 4749 END 4750 OUTPUT 4751 select substring_index('aaaaaaaaa1', 'aa', -5) from dual 4752 END 4753 INPUT 4754 select count(*) from t3 where t = "cc"; 4755 END 4756 OUTPUT 4757 select count(*) from t3 where t = 'cc' 4758 END 4759 INPUT 4760 select date_add('1998-01-30',Interval 1 month); 4761 END 4762 OUTPUT 4763 select date_add('1998-01-30', interval 1 month) from dual 4764 END 4765 INPUT 4766 select from t12; 4767 END 4768 ERROR 4769 syntax error at position 12 near 'from' 4770 END 4771 INPUT 4772 select row('A' COLLATE latin1_general_ci,'b','c') = row('a' COLLATE latin1_bin,'b','c'); 4773 END 4774 OUTPUT 4775 select row('A' collate latin1_general_ci, 'b', 'c') = row('a' collate latin1_bin, 'b', 'c') from dual 4776 END 4777 INPUT 4778 select group_concat(t1.id) FROM t1,t2; 4779 END 4780 OUTPUT 4781 select group_concat(t1.id) from t1, t2 4782 END 4783 INPUT 4784 select 50, 'abc'; 4785 END 4786 OUTPUT 4787 select 50, 'abc' from dual 4788 END 4789 INPUT 4790 select trim(leading NULL from 'kate') as "must_be_null"; 4791 END 4792 ERROR 4793 syntax error at position 25 near 'NULL' 4794 END 4795 INPUT 4796 select min(f4),max(f4) from t1; 4797 END 4798 OUTPUT 4799 select min(f4), max(f4) from t1 4800 END 4801 INPUT 4802 select uncompress(a), uncompressed_length(a) from t1; 4803 END 4804 OUTPUT 4805 select uncompress(a), uncompressed_length(a) from t1 4806 END 4807 INPUT 4808 select 1, ST_Intersects(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))')); 4809 END 4810 OUTPUT 4811 select 1, ST_Intersects(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))')) from dual 4812 END 4813 INPUT 4814 select substring_index('aaaaaaaaa1','aaa',2); 4815 END 4816 OUTPUT 4817 select substring_index('aaaaaaaaa1', 'aaa', 2) from dual 4818 END 4819 INPUT 4820 select now()-now(),weekday(curdate())-weekday(now()),unix_timestamp()-unix_timestamp(now()); 4821 END 4822 OUTPUT 4823 select now() - now(), weekday(curdate()) - weekday(now()), unix_timestamp() - unix_timestamp(now()) from dual 4824 END 4825 INPUT 4826 select insert('hello', -18446744073709551616, 1, 'hi'); 4827 END 4828 ERROR 4829 syntax error at position 14 near 'insert' 4830 END 4831 INPUT 4832 select sql_big_result trim(v),count(t) from t1 group by v order by v limit 10; 4833 END 4834 ERROR 4835 syntax error at position 28 4836 END 4837 INPUT 4838 select count(distinct x.id_aams) into not_installed from (select from (select t1.id_aams, t2.* from t1 left join t2 on t2.code_id = vlt_code_id and t1.id_aams = t2.id_game where t1.id_aams = 1715000360 order by t2.id desc ) as g group by g.id_aams having g.id is null ) as x; 4839 END 4840 ERROR 4841 syntax error at position 52 near 'not_installed' 4842 END 4843 INPUT 4844 select "... and something more ..."; 4845 END 4846 OUTPUT 4847 select '... and something more ...' from dual 4848 END 4849 INPUT 4850 select from v1; 4851 END 4852 ERROR 4853 syntax error at position 12 near 'from' 4854 END 4855 INPUT 4856 select f1(), f2(); 4857 END 4858 OUTPUT 4859 select f1(), f2() from dual 4860 END 4861 INPUT 4862 select cast(-5 as unsigned) | 1, cast(-5 as unsigned) & -1; 4863 END 4864 OUTPUT 4865 select convert(-5, unsigned) | 1, convert(-5, unsigned) & -1 from dual 4866 END 4867 INPUT 4868 select 5 div 2.0; 4869 END 4870 OUTPUT 4871 select 5 div 2.0 from dual 4872 END 4873 INPUT 4874 select unix_timestamp('2039-01-20 01:00:00'); 4875 END 4876 OUTPUT 4877 select unix_timestamp('2039-01-20 01:00:00') from dual 4878 END 4879 INPUT 4880 select count(distinct a) from t1; 4881 END 4882 OUTPUT 4883 select count(distinct a) from t1 4884 END 4885 INPUT 4886 select case 'str' when 'STR' then 'str' when null then 'null' end as c01, case 'str' when null then 'null' when 'STR' then 'str' end as c02, field(null, 'str1', 'str2') as c03, field('str1','STR1', null) as c04, field('str1', null, 'STR1') as c05, 'string' in ('STRING', null) as c08, 'string' in (null, 'STRING') as c09; 4887 END 4888 OUTPUT 4889 select case 'str' when 'STR' then 'str' when null then 'null' end as c01, case 'str' when null then 'null' when 'STR' then 'str' end as c02, field(null, 'str1', 'str2') as c03, field('str1', 'STR1', null) as c04, field('str1', null, 'STR1') as c05, 'string' in ('STRING', null) as c08, 'string' in (null, 'STRING') as c09 from dual 4890 END 4891 INPUT 4892 select @@sql_mode; 4893 END 4894 OUTPUT 4895 select @@sql_mode from dual 4896 END 4897 INPUT 4898 select /*1*/ user, host, db, info from information_schema.processlist where state = 'User lock' and info = 'select get_lock('test_bug16407', 60)'; 4899 END 4900 ERROR 4901 syntax error at position 139 near 'test_bug16407' 4902 END 4903 INPUT 4904 select from t1 where bigint_col='17666000000000000000'; 4905 END 4906 ERROR 4907 syntax error at position 12 near 'from' 4908 END 4909 INPUT 4910 select date_add(date,INTERVAL 1 DAY) from t1; 4911 END 4912 OUTPUT 4913 select date_add(`date`, interval 1 DAY) from t1 4914 END 4915 INPUT 4916 select from t1 where word between binary 0xDF and binary 0xDF; 4917 END 4918 ERROR 4919 syntax error at position 12 near 'from' 4920 END 4921 INPUT 4922 select left('hello', -4294967297); 4923 END 4924 OUTPUT 4925 select left('hello', -4294967297) from dual 4926 END 4927 INPUT 4928 select CASE "b" when "a" then 1 when "b" then 2 END; 4929 END 4930 OUTPUT 4931 select case 'b' when 'a' then 1 when 'b' then 2 end from dual 4932 END 4933 INPUT 4934 select @@global.profiling; 4935 END 4936 OUTPUT 4937 select @@global.profiling from dual 4938 END 4939 INPUT 4940 select a1,a2,b,min(c),max(c) from t2 where (c < 'k321') group by a1,a2,b; 4941 END 4942 OUTPUT 4943 select a1, a2, b, min(c), max(c) from t2 where c < 'k321' group by a1, a2, b 4944 END 4945 INPUT 4946 select 1 /*!32301 +1 */; 4947 END 4948 OUTPUT 4949 select 1 + 1 from dual 4950 END 4951 INPUT 4952 select st_distance(ST_GeomFromText('geometrycollection(geometrycollection(),polygon((0 0,0 10,10 10,10 0,0 0)))'),ST_GeomFromText('point(100 100)')); 4953 END 4954 OUTPUT 4955 select st_distance(ST_GeomFromText('geometrycollection(geometrycollection(),polygon((0 0,0 10,10 10,10 0,0 0)))'), ST_GeomFromText('point(100 100)')) from dual 4956 END 4957 INPUT 4958 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_polish_ci; 4959 END 4960 OUTPUT 4961 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_polish_ci 4962 END 4963 INPUT 4964 select insert('hello', 18446744073709551617, 1, 'hi'); 4965 END 4966 ERROR 4967 syntax error at position 14 near 'insert' 4968 END 4969 INPUT 4970 select distinct n2 from t1; 4971 END 4972 OUTPUT 4973 select distinct n2 from t1 4974 END 4975 INPUT 4976 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_icelandic_ci; 4977 END 4978 OUTPUT 4979 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_icelandic_ci 4980 END 4981 INPUT 4982 select from t1 where a = 0; 4983 END 4984 ERROR 4985 syntax error at position 12 near 'from' 4986 END 4987 INPUT 4988 select _latin1'B' in (_latin1'a',_latin1'b'); 4989 END 4990 OUTPUT 4991 select _latin1 'B' in (_latin1 'a', _latin1 'b') from dual 4992 END 4993 INPUT 4994 select from t1 where word2=binary 0xDF; 4995 END 4996 ERROR 4997 syntax error at position 12 near 'from' 4998 END 4999 INPUT 5000 select min(a2) from t1 group by a1; 5001 END 5002 OUTPUT 5003 select min(a2) from t1 group by a1 5004 END 5005 INPUT 5006 select find_in_set("","a,b,c"),find_in_set("","a,b,c,"),find_in_set("",",a,b,c"); 5007 END 5008 OUTPUT 5009 select find_in_set('', 'a,b,c'), find_in_set('', 'a,b,c,'), find_in_set('', ',a,b,c') from dual 5010 END 5011 INPUT 5012 select ''; 5013 END 5014 OUTPUT 5015 select '' from dual 5016 END 5017 INPUT 5018 select concat('0',mid(@my_uuid,16,3),mid(@my_uuid,10,4),left(@my_uuid,8)) into @my_uuidate; 5019 END 5020 ERROR 5021 syntax error at position 91 near 'my_uuidate' 5022 END 5023 INPUT 5024 select locate('he','hello',null),locate('he',null,2),locate(null,'hello',2); 5025 END 5026 OUTPUT 5027 select locate('he', 'hello', null), locate('he', null, 2), locate(null, 'hello', 2) from dual 5028 END 5029 INPUT 5030 select CASE BINARY "b" when "a" then 1 when "B" then 2 WHEN "b" then "ok" END; 5031 END 5032 OUTPUT 5033 select case binary 'b' when 'a' then 1 when 'B' then 2 when 'b' then 'ok' end from dual 5034 END 5035 INPUT 5036 select space(4294967297); 5037 END 5038 OUTPUT 5039 select space(4294967297) from dual 5040 END 5041 INPUT 5042 select st_crosses(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 5043 END 5044 OUTPUT 5045 select st_crosses(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 5046 END 5047 INPUT 5048 select from v1c; 5049 END 5050 ERROR 5051 syntax error at position 12 near 'from' 5052 END 5053 INPUT 5054 select from t4 order by a,b; 5055 END 5056 ERROR 5057 syntax error at position 12 near 'from' 5058 END 5059 INPUT 5060 select a1,a2,b,min(c),max(c) from t2 where a1 >= 'b' group by a1,a2,b; 5061 END 5062 OUTPUT 5063 select a1, a2, b, min(c), max(c) from t2 where a1 >= 'b' group by a1, a2, b 5064 END 5065 INPUT 5066 select substring_index('aaaaaaaaa1','aa',5); 5067 END 5068 OUTPUT 5069 select substring_index('aaaaaaaaa1', 'aa', 5) from dual 5070 END 5071 INPUT 5072 select strcmp(_koi8r'a' COLLATE koi8r_general_ci, _koi8r'A' COLLATE koi8r_bin); 5073 END 5074 OUTPUT 5075 select strcmp(_koi8r 'a' collate koi8r_general_ci, _koi8r 'A' collate koi8r_bin) from dual 5076 END 5077 INPUT 5078 select from t1 union distinct select from t2; 5079 END 5080 ERROR 5081 syntax error at position 12 near 'from' 5082 END 5083 INPUT 5084 select hex(soundex(_ucs2 0x00BF00C0)); 5085 END 5086 OUTPUT 5087 select hex(soundex(_ucs2 0x00BF00C0)) from dual 5088 END 5089 INPUT 5090 select insert('hello', -4294967297, 1, 'hi'); 5091 END 5092 ERROR 5093 syntax error at position 14 near 'insert' 5094 END 5095 INPUT 5096 select from (t3 cross join t4) natural join t1; 5097 END 5098 ERROR 5099 syntax error at position 12 near 'from' 5100 END 5101 INPUT 5102 select format(cast(-2 as unsigned), 2), format(18446744073709551614, 2), format(-2, 2); 5103 END 5104 OUTPUT 5105 select format(convert(-2, unsigned), 2), format(18446744073709551614, 2), format(-2, 2) from dual 5106 END 5107 INPUT 5108 select max(7) from t1m; 5109 END 5110 OUTPUT 5111 select max(7) from t1m 5112 END 5113 INPUT 5114 select collation(insert(_latin2'abcd',2,3,_latin2'ef')), coercibility(insert(_latin2'abcd',2,3,_latin2'ef')); 5115 END 5116 ERROR 5117 syntax error at position 24 near 'insert' 5118 END 5119 INPUT 5120 select grp, group_concat(a separator "")+0 from t1 group by grp; 5121 END 5122 OUTPUT 5123 select grp, group_concat(a separator '') + 0 from t1 group by grp 5124 END 5125 INPUT 5126 select FIND_IN_SET(_latin1'B',_latin1'a,b,c,d' COLLATE latin1_bin); 5127 END 5128 OUTPUT 5129 select FIND_IN_SET(_latin1 'B', _latin1 'a,b,c,d' collate latin1_bin) from dual 5130 END 5131 INPUT 5132 select t1.id, avg(rating) from t1 left join t2 on ( t1.id = t2.id ) group by t1.id; 5133 END 5134 OUTPUT 5135 select t1.id, avg(rating) from t1 left join t2 on t1.id = t2.id group by t1.id 5136 END 5137 INPUT 5138 select column_name, column_default from columns where table_schema='test' and table_name='t1'; 5139 END 5140 OUTPUT 5141 select column_name, column_default from `columns` where table_schema = 'test' and table_name = 't1' 5142 END 5143 INPUT 5144 select trim(trailing 'foo' from 'foo'); 5145 END 5146 ERROR 5147 syntax error at position 32 near 'from' 5148 END 5149 INPUT 5150 select from (t1 natural join t2) natural left join (t3 natural join t4); 5151 END 5152 ERROR 5153 syntax error at position 12 near 'from' 5154 END 5155 INPUT 5156 select max_data_length into @orig_max_data_length from information_schema.tables where table_name='t1'; 5157 END 5158 ERROR 5159 syntax error at position 50 near 'orig_max_data_length' 5160 END 5161 INPUT 5162 select hex(substr(_utf16 0x00e400e50068,-3)); 5163 END 5164 OUTPUT 5165 select hex(substr(_utf16 0x00e400e50068, -3)) from dual 5166 END 5167 INPUT 5168 select collation(conv(130,16,10)), coercibility(conv(130,16,10)); 5169 END 5170 OUTPUT 5171 select collation(conv(130, 16, 10)), coercibility(conv(130, 16, 10)) from dual 5172 END 5173 INPUT 5174 select from mysqldump_dbb.v1; 5175 END 5176 ERROR 5177 syntax error at position 12 near 'from' 5178 END 5179 INPUT 5180 select from t1 where match a against ("+(+aaa* +bbb1*)" in boolean mode); 5181 END 5182 ERROR 5183 syntax error at position 12 near 'from' 5184 END 5185 INPUT 5186 select from t1 where isnull(to_days(mydate)); 5187 END 5188 ERROR 5189 syntax error at position 12 near 'from' 5190 END 5191 INPUT 5192 select count(distinct i) from v1; 5193 END 5194 OUTPUT 5195 select count(distinct i) from v1 5196 END 5197 INPUT 5198 select null,isnull(null),isnull(1/0),isnull(1/0 = null),ifnull(null,1),ifnull(null,"TRUE"),ifnull("TRUE","ERROR"),1/0 is null,1 is not null; 5199 END 5200 OUTPUT 5201 select null, isnull(null), isnull(1 / 0), isnull(1 / 0 = null), ifnull(null, 1), ifnull(null, 'TRUE'), ifnull('TRUE', 'ERROR'), 1 / 0 is null, 1 is not null from dual 5202 END 5203 INPUT 5204 select format(4.55, 1), format(4.551, 1); 5205 END 5206 OUTPUT 5207 select format(4.55, 1), format(4.551, 1) from dual 5208 END 5209 INPUT 5210 select timestampdiff(month,'2004-02-29','2005-02-28'); 5211 END 5212 OUTPUT 5213 select timestampdiff(month, '2004-02-29', '2005-02-28') from dual 5214 END 5215 INPUT 5216 select extract(MONTH FROM "2001-02-00"); 5217 END 5218 OUTPUT 5219 select extract(month from '2001-02-00') from dual 5220 END 5221 INPUT 5222 select t1.col1 from t1 where t1.col2 in (select t2.col2 from t2 group by t2.col1, t2.col2 having t1.col1 <= 10); 5223 END 5224 OUTPUT 5225 select t1.col1 from t1 where t1.col2 in (select t2.col2 from t2 group by t2.col1, t2.col2 having t1.col1 <= 10) 5226 END 5227 INPUT 5228 select from t1 where match a against('ab c' in boolean mode); 5229 END 5230 ERROR 5231 syntax error at position 12 near 'from' 5232 END 5233 INPUT 5234 select @ujis2 = CONVERT(@utf82 USING ujis); 5235 END 5236 OUTPUT 5237 select @ujis2 = convert(@utf82 using ujis) from dual 5238 END 5239 INPUT 5240 select (with dt as (select t1.a as a, t2.a as b from t2) select dt2.a from dt dt1, dt dt2 where dt1.b=t1.a and dt2.b=dt1.b) as subq from t1; 5241 END 5242 OUTPUT 5243 select (with dt as (select t1.a as a, t2.a as b from t2) select dt2.a from dt as dt1, dt as dt2 where dt1.b = t1.a and dt2.b = dt1.b) as subq from t1 5244 END 5245 INPUT 5246 select count(*), case interval(qty,2,3,4,5,6,7,8) when -1 then NULL when 0 then "zero" when 1 then "one" when 2 then "two" end as category from t1 group by category; 5247 END 5248 ERROR 5249 syntax error at position 55 near 'when' 5250 END 5251 INPUT 5252 select table_priv,column_priv from mysql.tables_priv where user="mysqltest_1"; 5253 END 5254 OUTPUT 5255 select table_priv, column_priv from mysql.tables_priv where `user` = 'mysqltest_1' 5256 END 5257 INPUT 5258 select position('bb' in 'abba'); 5259 END 5260 ERROR 5261 syntax error at position 31 near 'abba' 5262 END 5263 INPUT 5264 select min(7) from t1m; 5265 END 5266 OUTPUT 5267 select min(7) from t1m 5268 END 5269 INPUT 5270 select _cp866'aaaaaaaaa' like _cp866'%aaaa%' collate cp866_bin; 5271 END 5272 OUTPUT 5273 select _cp866 'aaaaaaaaa' like _cp866 '%aaaa%' collate cp866_bin from dual 5274 END 5275 INPUT 5276 select position("0" in "baaa" in (1)),position("0" in "1" in (1,2,3)),position("sql" in ("mysql")); 5277 END 5278 ERROR 5279 syntax error at position 30 near 'baaa' 5280 END 5281 INPUT 5282 select count(*) from t1 where a = 'aaayyy'; 5283 END 5284 OUTPUT 5285 select count(*) from t1 where a = 'aaayyy' 5286 END 5287 INPUT 5288 select sum(num) from t1 group by user; 5289 END 5290 OUTPUT 5291 select sum(num) from t1 group by `user` 5292 END 5293 INPUT 5294 select a from t1 where a > 3 order by a; 5295 END 5296 OUTPUT 5297 select a from t1 where a > 3 order by a asc 5298 END 5299 INPUT 5300 select t1.*, a as 'x' from t1; 5301 END 5302 OUTPUT 5303 select t1.*, a as x from t1 5304 END 5305 INPUT 5306 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_romanian_ci; 5307 END 5308 OUTPUT 5309 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_romanian_ci 5310 END 5311 INPUT 5312 select round(15000111000111000155,-1); 5313 END 5314 OUTPUT 5315 select round(15000111000111000155, -1) from dual 5316 END 5317 INPUT 5318 select yearweek("2000-01-01",0) as '2000', yearweek("2001-01-01",0) as '2001', yearweek("2002-01-01",0) as '2002',yearweek("2003-01-01",0) as '2003', yearweek("2004-01-01",0) as '2004', yearweek("2005-01-01",0) as '2005', yearweek("2006-01-01",0) as '2006'; 5319 END 5320 OUTPUT 5321 select yearweek('2000-01-01', 0) as `2000`, yearweek('2001-01-01', 0) as `2001`, yearweek('2002-01-01', 0) as `2002`, yearweek('2003-01-01', 0) as `2003`, yearweek('2004-01-01', 0) as `2004`, yearweek('2005-01-01', 0) as `2005`, yearweek('2006-01-01', 0) as `2006` from dual 5322 END 5323 INPUT 5324 select fld3 from t2; 5325 END 5326 OUTPUT 5327 select fld3 from t2 5328 END 5329 INPUT 5330 select distinct(a1) from t1 where ord(a2) = 98; 5331 END 5332 OUTPUT 5333 select distinct a1 from t1 where ord(a2) = 98 5334 END 5335 INPUT 5336 select count(*) FROM t3; 5337 END 5338 OUTPUT 5339 select count(*) from t3 5340 END 5341 INPUT 5342 select benchmark(0, NULL); 5343 END 5344 OUTPUT 5345 select benchmark(0, null) from dual 5346 END 5347 INPUT 5348 select sql_big_result spid,sum(userid) from t1 group by spid order by spid desc; 5349 END 5350 OUTPUT 5351 select `sql_big_result` as spid, sum(userid) from t1 group by spid order by spid desc 5352 END 5353 INPUT 5354 select from t1 where f1='test' and (f2= md5("test") or f2= md5("TEST")); 5355 END 5356 ERROR 5357 syntax error at position 12 near 'from' 5358 END 5359 INPUT 5360 select count(*) from t1 /bin /boot /cdrom /dev /etc /home /lib /lib32 /lib64 /libx32 /lost+found /media /mnt /opt /proc /root /run /sbin /snap /srv /swapfile /sys /tmp /usr /var must be 0 */; 5361 END 5362 ERROR 5363 syntax error at position 26 5364 END 5365 INPUT 5366 select std(s1/s2) from bug22555 group by i; 5367 END 5368 OUTPUT 5369 select std(s1 / s2) from bug22555 group by i 5370 END 5371 INPUT 5372 select ceiling(5.5),ceiling(-5.5); 5373 END 5374 OUTPUT 5375 select ceiling(5.5), ceiling(-5.5) from dual 5376 END 5377 INPUT 5378 select hex(convert(0xFF using utf8)); 5379 END 5380 OUTPUT 5381 select hex(convert(0xFF using utf8)) from dual 5382 END 5383 INPUT 5384 select from t1, t3 where t1.start between t3.ctime1 and t3.ctime2; 5385 END 5386 ERROR 5387 syntax error at position 12 near 'from' 5388 END 5389 INPUT 5390 select substring_index('the king of the.the hill','the',-2); 5391 END 5392 OUTPUT 5393 select substring_index('the king of the.the hill', 'the', -2) from dual 5394 END 5395 INPUT 5396 select @@table_type='MyISAM'; 5397 END 5398 OUTPUT 5399 select @@table_type = 'MyISAM' from dual 5400 END 5401 INPUT 5402 select cast(sum(distinct ff) as signed) from t2; 5403 END 5404 OUTPUT 5405 select convert(sum(distinct ff), signed) from t2 5406 END 5407 INPUT 5408 select substring_index(null,null,3); 5409 END 5410 OUTPUT 5411 select substring_index(null, null, 3) from dual 5412 END 5413 INPUT 5414 select a1,a2,b,min(c),max(c) from t1 where (c < 'c5') or (c = 'g412') or (c = 'k421') group by a1,a2,b; 5415 END 5416 OUTPUT 5417 select a1, a2, b, min(c), max(c) from t1 where c < 'c5' or c = 'g412' or c = 'k421' group by a1, a2, b 5418 END 5419 INPUT 5420 select s1 from t1 where s1 in (select version from information_schema.tables) union select version from information_schema.tables; 5421 END 5422 OUTPUT 5423 select s1 from t1 where s1 in (select version from information_schema.`tables`) union select version from information_schema.`tables` 5424 END 5425 INPUT 5426 select from t1 where a='a'; 5427 END 5428 ERROR 5429 syntax error at position 12 near 'from' 5430 END 5431 INPUT 5432 select concat(_latin1'a',_latin2'a'); 5433 END 5434 OUTPUT 5435 select concat(_latin1 'a', _latin2 'a') from dual 5436 END 5437 INPUT 5438 select find_in_set("b","a,b,c"),find_in_set("c","a,b,c"),find_in_set("dd","a,bbb,dd"),find_in_set("bbb","a,bbb,dd"); 5439 END 5440 OUTPUT 5441 select find_in_set('b', 'a,b,c'), find_in_set('c', 'a,b,c'), find_in_set('dd', 'a,bbb,dd'), find_in_set('bbb', 'a,bbb,dd') from dual 5442 END 5443 INPUT 5444 select fld3 FROM t2 where fld3 like "%cultivation"; 5445 END 5446 OUTPUT 5447 select fld3 from t2 where fld3 like '%cultivation' 5448 END 5449 INPUT 5450 select length(format('nan', 2)) > 0; 5451 END 5452 OUTPUT 5453 select length(format('nan', 2)) > 0 from dual 5454 END 5455 INPUT 5456 select concat(a1,min(c)),b from t1 where a1 < 'd' group by a1,a2,b; 5457 END 5458 OUTPUT 5459 select concat(a1, min(c)), b from t1 where a1 < 'd' group by a1, a2, b 5460 END 5461 INPUT 5462 select timestampdiff(MONTH, '2000-03-28', '2000-02-29') as a; 5463 END 5464 OUTPUT 5465 select timestampdiff(MONTH, '2000-03-28', '2000-02-29') as a from dual 5466 END 5467 INPUT 5468 select concat(_latin1'a',_latin2'b',_latin5'c' collate latin5_turkish_ci); 5469 END 5470 OUTPUT 5471 select concat(_latin1 'a', _latin2 'b', _latin5 'c' collate latin5_turkish_ci) from dual 5472 END 5473 INPUT 5474 select hex(substr(_utf16 0x00e400e5D800DC00,2)); 5475 END 5476 OUTPUT 5477 select hex(substr(_utf16 0x00e400e5D800DC00, 2)) from dual 5478 END 5479 INPUT 5480 select week("2000-01-01",0) as '2000', week("2001-01-01",0) as '2001', week("2002-01-01",0) as '2002',week("2003-01-01",0) as '2003', week("2004-01-01",0) as '2004', week("2005-01-01",0) as '2005', week("2006-01-01",0) as '2006'; 5481 END 5482 OUTPUT 5483 select week('2000-01-01', 0) as `2000`, week('2001-01-01', 0) as `2001`, week('2002-01-01', 0) as `2002`, week('2003-01-01', 0) as `2003`, week('2004-01-01', 0) as `2004`, week('2005-01-01', 0) as `2005`, week('2006-01-01', 0) as `2006` from dual 5484 END 5485 INPUT 5486 select from (t1 natural join t2), (t3 natural join t4); 5487 END 5488 ERROR 5489 syntax error at position 12 near 'from' 5490 END 5491 INPUT 5492 select count(*) from t3 where id3 > 95; 5493 END 5494 OUTPUT 5495 select count(*) from t3 where id3 > 95 5496 END 5497 INPUT 5498 select st_intersects(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 5499 END 5500 OUTPUT 5501 select st_intersects(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 5502 END 5503 INPUT 5504 select from t1 where id=000000000001; 5505 END 5506 ERROR 5507 syntax error at position 12 near 'from' 5508 END 5509 INPUT 5510 select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; 5511 END 5512 OUTPUT 5513 select a, count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a 5514 END 5515 INPUT 5516 select a1,a2,b,min(c),max(c) from t2 where (c < 'a0') or (c > 'b1') group by a1,a2,b; 5517 END 5518 OUTPUT 5519 select a1, a2, b, min(c), max(c) from t2 where c < 'a0' or c > 'b1' group by a1, a2, b 5520 END 5521 INPUT 5522 select from t1 natural left join t2 where (t2.i is not null)=0; 5523 END 5524 ERROR 5525 syntax error at position 12 near 'from' 5526 END 5527 INPUT 5528 select 5 between 0 and 10 between 0 and 1,(5 between 0 and 10) between 0 and 1; 5529 END 5530 OUTPUT 5531 select 5 between 0 and (10 between 0 and 1), 5 between 0 and 10 between 0 and 1 from dual 5532 END 5533 INPUT 5534 select from (t1 join t2 on t1.b=t2.b) natural join (t3 natural join t4); 5535 END 5536 ERROR 5537 syntax error at position 12 near 'from' 5538 END 5539 INPUT 5540 select round(999999999.0, -9); 5541 END 5542 OUTPUT 5543 select round(999999999.0, -9) from dual 5544 END 5545 INPUT 5546 select table_name, table_type, auto_increment, table_comment from information_schema.tables where table_schema='test' and table_name='t2'; 5547 END 5548 OUTPUT 5549 select table_name, table_type, `auto_increment`, table_comment from information_schema.`tables` where table_schema = 'test' and table_name = 't2' 5550 END 5551 INPUT 5552 select vq1.b,dt.b from v1 vq1, lateral (select vq1.b) dt; 5553 END 5554 ERROR 5555 syntax error at position 41 5556 END 5557 INPUT 5558 select right('hello', -1); 5559 END 5560 OUTPUT 5561 select right('hello', -1) from dual 5562 END 5563 INPUT 5564 select index_name from information_schema.statistics where table_schema='test' order by index_name; 5565 END 5566 OUTPUT 5567 select index_name from information_schema.statistics where table_schema = 'test' order by index_name asc 5568 END 5569 INPUT 5570 select (select from (select from (select t1.a from t2) as dt limit 1) dt2) from t1; 5571 END 5572 ERROR 5573 syntax error at position 20 near 'from' 5574 END 5575 INPUT 5576 select substring_index('the king of the the hill',' the ',-2); 5577 END 5578 OUTPUT 5579 select substring_index('the king of the the hill', ' the ', -2) from dual 5580 END 5581 INPUT 5582 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_roman_ci; 5583 END 5584 OUTPUT 5585 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_roman_ci 5586 END 5587 INPUT 5588 select distinct a1,a2,b from t1; 5589 END 5590 OUTPUT 5591 select distinct a1, a2, b from t1 5592 END 5593 INPUT 5594 select from t1 where city = 'Durban'; 5595 END 5596 ERROR 5597 syntax error at position 12 near 'from' 5598 END 5599 INPUT 5600 select CAST(0xb3 as signed); 5601 END 5602 OUTPUT 5603 select convert(0xb3, signed) from dual 5604 END 5605 INPUT 5606 select 'a' union select concat('a', -'3'); 5607 END 5608 OUTPUT 5609 select 'a' from dual union select concat('a', -'3') from dual 5610 END 5611 INPUT 5612 select st_crosses(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 5613 END 5614 OUTPUT 5615 select st_crosses(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 5616 END 5617 INPUT 5618 select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin2'd',2); 5619 END 5620 OUTPUT 5621 select SUBSTRING_INDEX(_latin1 'abcdabcdabcd', _latin2 'd', 2) from dual 5622 END 5623 INPUT 5624 select from t1 where tt like 'AA%'; 5625 END 5626 ERROR 5627 syntax error at position 12 near 'from' 5628 END 5629 INPUT 5630 select repeat('hello', -4294967295); 5631 END 5632 OUTPUT 5633 select repeat('hello', -4294967295) from dual 5634 END 5635 INPUT 5636 select from (t3 natural join t4) natural join (t1 join t2 on t1.b=t2.b); 5637 END 5638 ERROR 5639 syntax error at position 12 near 'from' 5640 END 5641 INPUT 5642 select hex(c1) as h, c1 from t1 order by c1, h; 5643 END 5644 OUTPUT 5645 select hex(c1) as h, c1 from t1 order by c1 asc, h asc 5646 END 5647 INPUT 5648 select s1*0 from t1 group by s1 having s1 = 0; 5649 END 5650 OUTPUT 5651 select s1 * 0 from t1 group by s1 having s1 = 0 5652 END 5653 INPUT 5654 select from t1 where not((a < 5 and a < 10) and (not(a > 16) or a > 17)); 5655 END 5656 ERROR 5657 syntax error at position 12 near 'from' 5658 END 5659 INPUT 5660 select from t1 where MATCH a,b AGAINST ('"text search" "now support"' IN BOOLEAN MODE); 5661 END 5662 ERROR 5663 syntax error at position 12 near 'from' 5664 END 5665 INPUT 5666 select insert('hello', 1, -18446744073709551616, 'hi'); 5667 END 5668 ERROR 5669 syntax error at position 14 near 'insert' 5670 END 5671 INPUT 5672 select substring_index('aaaaaaaaa1','aaa',-1); 5673 END 5674 OUTPUT 5675 select substring_index('aaaaaaaaa1', 'aaa', -1) from dual 5676 END 5677 INPUT 5678 select a1,a2,b from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b; 5679 END 5680 OUTPUT 5681 select a1, a2, b from t1 where (a1 >= 'c' or a2 < 'b') and b > 'a' group by a1, a2, b 5682 END 5683 INPUT 5684 select st_distance(linestring(point(26,87),point(13,95)), geometrycollection(point(4.297374e+307,8.433875e+307))) as dist; 5685 END 5686 OUTPUT 5687 select st_distance(linestring(point(26, 87), point(13, 95)), geometrycollection(point(4.297374e+307, 8.433875e+307))) as dist from dual 5688 END 5689 INPUT 5690 select count(not_existing_database.t1.a) from not_existing_database.t1; 5691 END 5692 OUTPUT 5693 select count(not_existing_database.t1.a) from not_existing_database.t1 5694 END 5695 INPUT 5696 select lpad('hello', -18446744073709551616, '1'); 5697 END 5698 OUTPUT 5699 select lpad('hello', -18446744073709551616, '1') from dual 5700 END 5701 INPUT 5702 select c1 from t1 order by c1 limit 1; 5703 END 5704 OUTPUT 5705 select c1 from t1 order by c1 asc limit 1 5706 END 5707 INPUT 5708 select unix_timestamp('2038-01-17 12:00:00'); 5709 END 5710 OUTPUT 5711 select unix_timestamp('2038-01-17 12:00:00') from dual 5712 END 5713 INPUT 5714 select extract(MONTH FROM "0000-00-00"),extract(MONTH FROM d),extract(MONTH FROM dt),extract(MONTH FROM t),extract(MONTH FROM c) from t1; 5715 END 5716 OUTPUT 5717 select extract(month from '0000-00-00'), extract(month from d), extract(month from dt), extract(month from t), extract(month from c) from t1 5718 END 5719 INPUT 5720 select from t3 where a < 10; 5721 END 5722 ERROR 5723 syntax error at position 12 near 'from' 5724 END 5725 INPUT 5726 select 1, ST_Within(ST_GeomFromText('POLYGON((1 1,20 10,10 30, 1 1))'), ST_GeomFromText('POLYGON((0 0,30 5,10 40, 0 0))')); 5727 END 5728 OUTPUT 5729 select 1, ST_Within(ST_GeomFromText('POLYGON((1 1,20 10,10 30, 1 1))'), ST_GeomFromText('POLYGON((0 0,30 5,10 40, 0 0))')) from dual 5730 END 5731 INPUT 5732 select hex(substr(_utf16 0x00e400e50068,-2)); 5733 END 5734 OUTPUT 5735 select hex(substr(_utf16 0x00e400e50068, -2)) from dual 5736 END 5737 INPUT 5738 select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('point(1 2)')); 5739 END 5740 OUTPUT 5741 select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('point(1 2)')) from dual 5742 END 5743 INPUT 5744 select a1,a2,b, max(c) from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b; 5745 END 5746 OUTPUT 5747 select a1, a2, b, max(c) from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and a2 > 'a' group by a1, a2, b 5748 END 5749 INPUT 5750 select i from t2; 5751 END 5752 OUTPUT 5753 select i from t2 5754 END 5755 INPUT 5756 select yearweek('1981-12-31',1),yearweek('1982-01-01',1),yearweek('1982-12-31',1),yearweek('1983-01-01',1); 5757 END 5758 OUTPUT 5759 select yearweek('1981-12-31', 1), yearweek('1982-01-01', 1), yearweek('1982-12-31', 1), yearweek('1983-01-01', 1) from dual 5760 END 5761 INPUT 5762 select from t5 order by b,a limit 3,3; 5763 END 5764 ERROR 5765 syntax error at position 12 near 'from' 5766 END 5767 INPUT 5768 select mod(12, 0.0) as 'NULL'; 5769 END 5770 OUTPUT 5771 select mod(12, 0.0) as `NULL` from dual 5772 END 5773 INPUT 5774 select 3 from t1; 5775 END 5776 OUTPUT 5777 select 3 from t1 5778 END 5779 INPUT 5780 select count(*) from t3 where id3 > 5; 5781 END 5782 OUTPUT 5783 select count(*) from t3 where id3 > 5 5784 END 5785 INPUT 5786 select date_sub("0169-01-01 00:00:01",INTERVAL 2 SECOND); 5787 END 5788 OUTPUT 5789 select date_sub('0169-01-01 00:00:01', interval 2 SECOND) from dual 5790 END 5791 INPUT 5792 select timediff("1997-12-31 23:59:59.000001","1997-12-30 01:01:01.000002"); 5793 END 5794 OUTPUT 5795 select timediff('1997-12-31 23:59:59.000001', '1997-12-30 01:01:01.000002') from dual 5796 END 5797 INPUT 5798 select from t1 where NULL or not(a < 15 and a > 5); 5799 END 5800 ERROR 5801 syntax error at position 12 near 'from' 5802 END 5803 INPUT 5804 select ST_GeomFromText("POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))") into @a; 5805 END 5806 ERROR 5807 syntax error at position 73 near 'a' 5808 END 5809 INPUT 5810 select 'a' union select concat('a', -concat('3',4)); 5811 END 5812 OUTPUT 5813 select 'a' from dual union select concat('a', -concat('3', 4)) from dual 5814 END 5815 INPUT 5816 select t1.*,t2.* from t1 natural join t2; 5817 END 5818 OUTPUT 5819 select t1.*, t2.* from t1 natural join t2 5820 END 5821 INPUT 5822 select from INFORMATION_SCHEMA.COLUMN_PRIVILEGES WHERE table_schema != 'sys'; 5823 END 5824 ERROR 5825 syntax error at position 12 near 'from' 5826 END 5827 INPUT 5828 select aes_decrypt(aes_encrypt('abc','1'),'1'); 5829 END 5830 OUTPUT 5831 select aes_decrypt(aes_encrypt('abc', '1'), '1') from dual 5832 END 5833 INPUT 5834 select ST_astext(st_union(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); 5835 END 5836 OUTPUT 5837 select ST_astext(st_union(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual 5838 END 5839 INPUT 5840 select column_type from information_schema.columns where table_schema="information_schema" and table_name="COLUMNS" and (column_name="character_set_name" or column_name="collation_name"); 5841 END 5842 OUTPUT 5843 select column_type from information_schema.`columns` where table_schema = 'information_schema' and table_name = 'COLUMNS' and (column_name = 'character_set_name' or column_name = 'collation_name') 5844 END 5845 INPUT 5846 select concat(a, if(b>10, _utf8'x', _utf8'y')) from t1; 5847 END 5848 OUTPUT 5849 select concat(a, if(b > 10, _utf8 'x', _utf8 'y')) from t1 5850 END 5851 INPUT 5852 select /lib32/ /libx32/ user, host, db, info from information_schema.processlist where state = 'User lock' and info = 'select get_lock('ee_16407_2', 60)'; 5853 END 5854 ERROR 5855 syntax error at position 9 5856 END 5857 INPUT 5858 select insert('hello', 1, 4294967296, 'hi'); 5859 END 5860 ERROR 5861 syntax error at position 14 near 'insert' 5862 END 5863 INPUT 5864 select charset(a) from t3; 5865 END 5866 OUTPUT 5867 select charset(a) from t3 5868 END 5869 INPUT 5870 select count(distinct a1,a2,b) from t1 where (a2 >= 'b') and (b = 'a'); 5871 END 5872 OUTPUT 5873 select count(distinct a1, a2, b) from t1 where a2 >= 'b' and b = 'a' 5874 END 5875 INPUT 5876 select st_intersects(@a, @l); 5877 END 5878 OUTPUT 5879 select st_intersects(@a, @l) from dual 5880 END 5881 INPUT 5882 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_czech_ci; 5883 END 5884 OUTPUT 5885 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_czech_ci 5886 END 5887 INPUT 5888 select min(big),max(big),max(big)-1 from t1; 5889 END 5890 OUTPUT 5891 select min(big), max(big), max(big) - 1 from t1 5892 END 5893 INPUT 5894 select unhex(hex("foobar")), hex(unhex("1234567890ABCDEF")), unhex("345678"), unhex(NULL); 5895 END 5896 OUTPUT 5897 select unhex(hex('foobar')), hex(unhex('1234567890ABCDEF')), unhex('345678'), unhex(null) from dual 5898 END 5899 INPUT 5900 select from performance_schema.global_variables where variable_name='init_connect'; 5901 END 5902 ERROR 5903 syntax error at position 12 near 'from' 5904 END 5905 INPUT 5906 select t1.a from MYSQLTEST.T1; 5907 END 5908 OUTPUT 5909 select t1.a from MYSQLTEST.T1 5910 END 5911 INPUT 5912 select convert("123" using binary); 5913 END 5914 OUTPUT 5915 select convert('123' using binary) from dual 5916 END 5917 INPUT 5918 select t2.fld3 FROM t2 where companynr = 58 and fld3 like "%imaginable%"; 5919 END 5920 OUTPUT 5921 select t2.fld3 from t2 where companynr = 58 and fld3 like '%imaginable%' 5922 END 5923 INPUT 5924 select -1 | 0, -1 ^ 0, -1 & 0; 5925 END 5926 OUTPUT 5927 select -1 | 0, -1 ^ 0, -1 & 0 from dual 5928 END 5929 INPUT 5930 select -1 >> 1, -1 << 1; 5931 END 5932 OUTPUT 5933 select -1 >> 1, -1 << 1 from dual 5934 END 5935 INPUT 5936 select a,b,c from (t1 natural join t2) natural join (t3 natural join t4) where b + 1 = y or b + 10 = y group by b,c,a having min(b) < max(y) order by a; 5937 END 5938 OUTPUT 5939 select a, b, c from (t1 natural join t2) natural join (t3 natural join t4) where b + 1 = y or b + 10 = y group by b, c, a having min(b) < max(y) order by a asc 5940 END 5941 INPUT 5942 select benchmark(100, (select 1, 1)); 5943 END 5944 OUTPUT 5945 select benchmark(100, (select 1, 1 from dual)) from dual 5946 END 5947 INPUT 5948 select find_in_set(binary 'a', 'A,B,C'); 5949 END 5950 OUTPUT 5951 select find_in_set(binary 'a', 'A,B,C') from dual 5952 END 5953 INPUT 5954 select INTERVAL 1 DAY + "1997-12-31"; 5955 END 5956 OUTPUT 5957 select interval 1 DAY + '1997-12-31' from dual 5958 END 5959 INPUT 5960 select from t1 where t1 like "a_%"; 5961 END 5962 ERROR 5963 syntax error at position 12 near 'from' 5964 END 5965 INPUT 5966 select cast(1-pow(2,63) as signed) as qq; 5967 END 5968 OUTPUT 5969 select convert(1 - pow(2, 63), signed) as qq from dual 5970 END 5971 INPUT 5972 select 1 + /*!00000 2 node_modules/ + 3 /*!99999 noise*/ + 4; 5973 END 5974 ERROR 5975 syntax error at position 57 5976 END 5977 INPUT 5978 select 1, st_touches(t.geom, p.geom) from tbl_polygon t, tbl_polygon p where t.id = 'POLY1' and p.id = 'POLY2'; 5979 END 5980 OUTPUT 5981 select 1, st_touches(t.geom, p.geom) from tbl_polygon as t, tbl_polygon as p where t.id = 'POLY1' and p.id = 'POLY2' 5982 END 5983 INPUT 5984 select collation_name, character_set_name, id from information_schema.collations where id>256 order by id; 5985 END 5986 OUTPUT 5987 select collation_name, character_set_name, id from information_schema.collations where id > 256 order by id asc 5988 END 5989 INPUT 5990 select 1 union select 1; 5991 END 5992 OUTPUT 5993 select 1 from dual union select 1 from dual 5994 END 5995 INPUT 5996 select distinct n1,s from t1; 5997 END 5998 OUTPUT 5999 select distinct n1, s from t1 6000 END 6001 INPUT 6002 select period from t1; 6003 END 6004 OUTPUT 6005 select period from t1 6006 END 6007 INPUT 6008 select event_name from information_schema.events; 6009 END 6010 OUTPUT 6011 select event_name from information_schema.events 6012 END 6013 INPUT 6014 select round(std(e1/e2), 17) from bug22555; 6015 END 6016 OUTPUT 6017 select round(std(e1 / e2), 17) from bug22555 6018 END 6019 INPUT 6020 select user_host, db, sql_text from mysql.slow_log where sql_text like 'select 'events_logs_test'%'; 6021 END 6022 ERROR 6023 syntax error at position 97 near 'events_logs_test' 6024 END 6025 INPUT 6026 select ifnull(A=1, 'N') as A, ifnull(B=1, 'N') as B, ifnull(not (A=1), 'N') as nA, ifnull(not (B=1), 'N') as nB, ifnull((A=1) and (B=1), 'N') as AB, ifnull(not ((A=1) and (B=1)), 'N') as `n(AB)`, ifnull((not (A=1) or not (B=1)), 'N') as nAonB, ifnull((A=1) or (B=1), 'N') as AoB, ifnull(not((A=1) or (B=1)), 'N') as `n(AoB)`, ifnull(not (A=1) and not (B=1), 'N') as nAnB from t1; 6027 END 6028 OUTPUT 6029 select ifnull(A = 1, 'N') as A, ifnull(B = 1, 'N') as B, ifnull(not A = 1, 'N') as nA, ifnull(not B = 1, 'N') as nB, ifnull(A = 1 and B = 1, 'N') as AB, ifnull(not (A = 1 and B = 1), 'N') as `n(AB)`, ifnull(not A = 1 or not B = 1, 'N') as nAonB, ifnull(A = 1 or B = 1, 'N') as AoB, ifnull(not (A = 1 or B = 1), 'N') as `n(AoB)`, ifnull(not A = 1 and not B = 1, 'N') as nAnB from t1 6030 END 6031 INPUT 6032 select from (select polygon(t1.a) as p from t1 order by t1.a) d; 6033 END 6034 ERROR 6035 syntax error at position 12 near 'from' 6036 END 6037 INPUT 6038 select from t1 where a = 'b'; 6039 END 6040 ERROR 6041 syntax error at position 12 near 'from' 6042 END 6043 INPUT 6044 select hex(@utf83); 6045 END 6046 OUTPUT 6047 select hex(@utf83) from dual 6048 END 6049 INPUT 6050 select length(repeat("1",1024*1024)) as a; 6051 END 6052 OUTPUT 6053 select length(repeat('1', 1024 * 1024)) as a from dual 6054 END 6055 INPUT 6056 select locate('HE','hello' collate utf8_bin,2); 6057 END 6058 OUTPUT 6059 select locate('HE', 'hello' collate utf8_bin, 2) from dual 6060 END 6061 INPUT 6062 select ctime from t1 where extract(MONTH FROM ctime) = 1 AND extract(YEAR FROM ctime) = 2001; 6063 END 6064 OUTPUT 6065 select ctime from t1 where extract(month from ctime) = 1 and extract(year from ctime) = 2001 6066 END 6067 INPUT 6068 select cast(_koi8r'��' AS nchar) as c1, cast(_koi8r'� ' AS nchar) as c2, cast(_koi8r'���' AS nchar(2)) as c3, cast(_koi8r'� ' AS nchar(2)) as c4, cast(_koi8r'�' AS nchar(2)) as c5; 6069 END 6070 OUTPUT 6071 select convert(_koi8r '��', nchar) as c1, convert(_koi8r '� ', nchar) as c2, convert(_koi8r '���', nchar(2)) as c3, convert(_koi8r '� ', nchar(2)) as c4, convert(_koi8r '�', nchar(2)) as c5 from dual 6072 END 6073 INPUT 6074 select date_add(cast('2004-12-30 12:00:00' as date), interval 0 hour); 6075 END 6076 OUTPUT 6077 select date_add(convert('2004-12-30 12:00:00', date), interval 0 hour) from dual 6078 END 6079 INPUT 6080 select c as c_all from t1 order by c; 6081 END 6082 OUTPUT 6083 select c as c_all from t1 order by c asc 6084 END 6085 INPUT 6086 select foofct("call 2"); 6087 END 6088 OUTPUT 6089 select foofct('call 2') from dual 6090 END 6091 INPUT 6092 select benchmark((select 10 from dual), pi()); 6093 END 6094 OUTPUT 6095 select benchmark((select 10 from dual), pi()) from dual 6096 END 6097 INPUT 6098 select from t6 natural join ((t1 natural join t2), (t3 natural join t4)); 6099 END 6100 ERROR 6101 syntax error at position 12 near 'from' 6102 END 6103 INPUT 6104 select ST_astext(g) from t1 where ST_Contains(ST_GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))'), g); 6105 END 6106 OUTPUT 6107 select ST_astext(g) from t1 where ST_Contains(ST_GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))'), g) 6108 END 6109 INPUT 6110 select timestamp("2001-12-01", "25:01:01"); 6111 END 6112 OUTPUT 6113 select timestamp('2001-12-01', '25:01:01') from dual 6114 END 6115 INPUT 6116 select if (query_time >= '00:01:40', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log where sql_text = 'select get_lock('bug27638', 101)'; 6117 END 6118 ERROR 6119 syntax error at position 132 near 'bug27638' 6120 END 6121 INPUT 6122 select from_unixtime(-1); 6123 END 6124 OUTPUT 6125 select from_unixtime(-1) from dual 6126 END 6127 INPUT 6128 select hex(conv(convert('123' using utf16), -10, 16)); 6129 END 6130 OUTPUT 6131 select hex(conv(convert('123' using utf16), -10, 16)) from dual 6132 END 6133 INPUT 6134 select count(*) from t2 where id2 > 95; 6135 END 6136 OUTPUT 6137 select count(*) from t2 where id2 > 95 6138 END 6139 INPUT 6140 select t1.* as 'with_alias', t1.* from t1; 6141 END 6142 ERROR 6143 syntax error at position 15 near 'as' 6144 END 6145 INPUT 6146 select count(*) from t1 where i=2 or i is null; 6147 END 6148 OUTPUT 6149 select count(*) from t1 where i = 2 or i is null 6150 END 6151 INPUT 6152 select truncate(-5000111000111000155,-1); 6153 END 6154 OUTPUT 6155 select truncate(-5000111000111000155, -1) from dual 6156 END 6157 INPUT 6158 select (@orig_max_data_length > @changed_max_data_length); 6159 END 6160 OUTPUT 6161 select @orig_max_data_length > @changed_max_data_length from dual 6162 END 6163 INPUT 6164 select ST_astext(ST_Intersection(ST_geometryfromtext('point(1 1)'), ST_geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))'))); 6165 END 6166 OUTPUT 6167 select ST_astext(ST_Intersection(ST_geometryfromtext('point(1 1)'), ST_geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))'))) from dual 6168 END 6169 INPUT 6170 select (select d from t2 where d > a) as 'x', t1.* from t1; 6171 END 6172 OUTPUT 6173 select (select d from t2 where d > a) as x, t1.* from t1 6174 END 6175 INPUT 6176 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_esperanto_ci; 6177 END 6178 OUTPUT 6179 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_esperanto_ci 6180 END 6181 INPUT 6182 select mail_id, if(folder.f_description!='', folder.f_description, folder.f_name) as folder_name, date, address_id, phrase, address, subject from folder, (select mail.mail_id as mail_id, date_format(mail.h_date, '%b %e, %Y %h:%i') as date, mail.folder_id, sender.address_id as address_id, sender.phrase as phrase, sender.address as address, mail.h_subject as subject from mail left join mxa as mxa_sender on mail.mail_id=mxa_sender.mail_id and mxa_sender.type='from' left join address as sender on mxa_sender.address_id=sender.address_id mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_recipient.mail_id and mxa_recipient.address_id=recipient.address_id and mxa_recipient.type='to' and match(sender.phrase, sender.address, sender.comment) against ('jeremy' in boolean mode) and match(recipient.phrase, recipient.address, recipient.comment) against ('monty' in boolean mode) order by mail.h_date desc limit 0, 25 ) as query where query.folder_id=folder.folder_id; 6183 END 6184 ERROR 6185 syntax error at position 542 near 'mxa' 6186 END 6187 INPUT 6188 select (with recursive dt as (select t1.a as a union select a+1 from dt where a<10) select dt1.a from dt dt1 where dt1.a=t1.a ) as subq from t1; 6189 END 6190 OUTPUT 6191 select (with recursive dt as (select t1.a as a from dual union select a + 1 from dt where a < 10) select dt1.a from dt as dt1 where dt1.a = t1.a) as subq from t1 6192 END 6193 INPUT 6194 select from t5 natural join ((t1 natural join t2), (t3 natural join t4)); 6195 END 6196 ERROR 6197 syntax error at position 12 near 'from' 6198 END 6199 INPUT 6200 select count(*) FROM t4; 6201 END 6202 OUTPUT 6203 select count(*) from t4 6204 END 6205 INPUT 6206 select from (t4 natural right join t3) natural right join (t2 natural right join t1); 6207 END 6208 ERROR 6209 syntax error at position 12 near 'from' 6210 END 6211 INPUT 6212 select a1,a2,b,min(c),max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b; 6213 END 6214 OUTPUT 6215 select a1, a2, b, min(c), max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1, a2, b 6216 END 6217 INPUT 6218 select charset(a), collation(a), coercibility(a) from t1; 6219 END 6220 OUTPUT 6221 select charset(a), collation(a), coercibility(a) from t1 6222 END 6223 INPUT 6224 select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c'); 6225 END 6226 OUTPUT 6227 select distinct a1, a2, b from t2 where a1 > 'a' and a2 > 'a' and b = 'c' 6228 END 6229 INPUT 6230 select qn.a from (select 1 as a) as QN; 6231 END 6232 OUTPUT 6233 select qn.a from (select 1 as a from dual) as QN 6234 END 6235 INPUT 6236 select a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; 6237 END 6238 OUTPUT 6239 select a1, a2, b from t1 where a1 > 'a' and a2 > 'a' and b = 'c' group by a1, a2, b 6240 END 6241 INPUT 6242 select hex(s1), hex(s2) from t1; 6243 END 6244 OUTPUT 6245 select hex(s1), hex(s2) from t1 6246 END 6247 INPUT 6248 select grp,group_concat(c order by c desc separator ",") from t1 group by grp; 6249 END 6250 OUTPUT 6251 select grp, group_concat(c order by c desc separator ',') from t1 group by grp 6252 END 6253 INPUT 6254 select t1.a, f from t1, lateral (select max(t1.a) as f) as dt; 6255 END 6256 ERROR 6257 syntax error at position 34 6258 END 6259 INPUT 6260 select 2 -9223372036854775808 as result; 6261 END 6262 OUTPUT 6263 select 2 - 9223372036854775808 as result from dual 6264 END 6265 INPUT 6266 select "a" like "%%b","a" like "%%ab","ab" like "a%", "ab" like "_", "ab" like "ab_", "abc" like "%_d", "abc" like "abc%d"; 6267 END 6268 OUTPUT 6269 select 'a' like '%%b', 'a' like '%%ab', 'ab' like 'a%', 'ab' like '_', 'ab' like 'ab_', 'abc' like '%_d', 'abc' like 'abc%d' from dual 6270 END 6271 INPUT 6272 select 1 XOR 1, 1 XOR 0, 0 XOR 1, 0 XOR 0, NULL XOR 1, 1 XOR NULL, 0 XOR NULL; 6273 END 6274 OUTPUT 6275 select 1 xor 1, 1 xor 0, 0 xor 1, 0 xor 0, null xor 1, 1 xor null, 0 xor null from dual 6276 END 6277 INPUT 6278 select dayofyear("0000-00-00"),dayofyear(d),dayofyear(dt),dayofyear(t),dayofyear(c) from t1; 6279 END 6280 OUTPUT 6281 select dayofyear('0000-00-00'), dayofyear(d), dayofyear(dt), dayofyear(t), dayofyear(c) from t1 6282 END 6283 INPUT 6284 select null % 12 as 'NULL'; 6285 END 6286 OUTPUT 6287 select null % 12 as `NULL` from dual 6288 END 6289 INPUT 6290 select insert(null,2,1,'hi'),insert('txs',null,1,'hi'); 6291 END 6292 ERROR 6293 syntax error at position 14 near 'insert' 6294 END 6295 INPUT 6296 select date_add("1997-12-31",INTERVAL 1 DAY); 6297 END 6298 OUTPUT 6299 select date_add('1997-12-31', interval 1 DAY) from dual 6300 END 6301 INPUT 6302 select mbrwithin(ST_GeomFromText("linestring(1 0, 2 0)"), ST_GeomFromText("polygon((0 0, 3 0, 3 3, 0 3, 0 0))")); 6303 END 6304 OUTPUT 6305 select mbrwithin(ST_GeomFromText('linestring(1 0, 2 0)'), ST_GeomFromText('polygon((0 0, 3 0, 3 3, 0 3, 0 0))')) from dual 6306 END 6307 INPUT 6308 select ST_astext(ST_convexhull(ST_PolyFromWKB(ST_AsWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(1, 0), Point(0, 0))))))); 6309 END 6310 OUTPUT 6311 select ST_astext(ST_convexhull(ST_PolyFromWKB(ST_AsWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(1, 0), Point(0, 0))))))) from dual 6312 END 6313 INPUT 6314 select from t1 where i between 2 and 4 and v in ('def','3r4f','abc'); 6315 END 6316 ERROR 6317 syntax error at position 12 near 'from' 6318 END 6319 INPUT 6320 select a,c,sum(a) from t1 group by a; 6321 END 6322 OUTPUT 6323 select a, c, sum(a) from t1 group by a 6324 END 6325 INPUT 6326 select t1.*,t2.* from t1 left join t2 on (t1.a=t2.a) where t2.id=3; 6327 END 6328 OUTPUT 6329 select t1.*, t2.* from t1 left join t2 on t1.a = t2.a where t2.id = 3 6330 END 6331 INPUT 6332 select from information_schema.key_column_usage where TABLE_SCHEMA= "test" order by constraint_name; 6333 END 6334 ERROR 6335 syntax error at position 12 near 'from' 6336 END 6337 INPUT 6338 select ST_Length(ST_MLineFromWKB(0x0000000005000000020000000002000000035FB317E5EF3AB327E3A4B378469B67320000000000000000C0240000000000003FF05FD8ADAB9F560000000000000000000000000200000003000000000000000000000000000000000000000000000000BFF08B439581062540240000000000004341C37937E08000)) as length; 6339 END 6340 OUTPUT 6341 select ST_Length(ST_MLineFromWKB(0x0000000005000000020000000002000000035FB317E5EF3AB327E3A4B378469B67320000000000000000C0240000000000003FF05FD8ADAB9F560000000000000000000000000200000003000000000000000000000000000000000000000000000000BFF08B439581062540240000000000004341C37937E08000)) as length from dual 6342 END 6343 INPUT 6344 select host,db,user,select_priv,insert_priv from mysql.db where db="mysqltest1"; 6345 END 6346 OUTPUT 6347 select host, db, `user`, select_priv, insert_priv from mysql.db where db = 'mysqltest1' 6348 END 6349 INPUT 6350 select grp,group_concat(c separator ",") from t1 group by grp; 6351 END 6352 OUTPUT 6353 select grp, group_concat(c separator ',') from t1 group by grp 6354 END 6355 INPUT 6356 select 12%2 as '0'; 6357 END 6358 OUTPUT 6359 select 12 % 2 as `0` from dual 6360 END 6361 INPUT 6362 select from t1 where match (a) against ('aaaa'); 6363 END 6364 ERROR 6365 syntax error at position 12 near 'from' 6366 END 6367 INPUT 6368 select date_sub("1998-01-01 00:00:00",INTERVAL "1:1" DAY_HOUR); 6369 END 6370 OUTPUT 6371 select date_sub('1998-01-01 00:00:00', interval '1:1' DAY_HOUR) from dual 6372 END 6373 INPUT 6374 select bin(convert(-9223372036854775808 using ucs2)); 6375 END 6376 OUTPUT 6377 select bin(convert(-9223372036854775808 using ucs2)) from dual 6378 END 6379 INPUT 6380 select date_add(date,INTERVAL "1:1:1" HOUR_SECOND) from t1; 6381 END 6382 OUTPUT 6383 select date_add(`date`, interval '1:1:1' HOUR_SECOND) from t1 6384 END 6385 INPUT 6386 select from t1 where a <> _latin1 'B' collate latin1_bin; 6387 END 6388 ERROR 6389 syntax error at position 12 near 'from' 6390 END 6391 INPUT 6392 select b from t1 where binary b like ''; 6393 END 6394 OUTPUT 6395 select b from t1 where binary b like '' 6396 END 6397 INPUT 6398 select from t1 where str='str'; 6399 END 6400 ERROR 6401 syntax error at position 12 near 'from' 6402 END 6403 INPUT 6404 select '?' like '|%', '?' like '|%' ESCAPE '|', '%' like '|%', '%' like '|%' ESCAPE '|', '%' like '%'; 6405 END 6406 OUTPUT 6407 select '?' like '|%', '?' like '|%' escape '|', '%' like '|%', '%' like '|%' escape '|', '%' like '%' from dual 6408 END 6409 INPUT 6410 select a from t1 where right(a+0,6) = ( right(20040106123400,6) ); 6411 END 6412 OUTPUT 6413 select a from t1 where right(a + 0, 6) = right(20040106123400, 6) 6414 END 6415 INPUT 6416 select t1.*, t2.* from t1 left join t2 on t1.n = t2.n and t1.m = t2.m where t1.n = 1; 6417 END 6418 OUTPUT 6419 select t1.*, t2.* from t1 left join t2 on t1.n = t2.n and t1.m = t2.m where t1.n = 1 6420 END 6421 INPUT 6422 select from t1 where ((a between 5 and 15) and (not(a like 10))); 6423 END 6424 ERROR 6425 syntax error at position 12 near 'from' 6426 END 6427 INPUT 6428 select t1.a, dt.a from t1, lateral (select t2.a as a from t2 having t1.a) dt; 6429 END 6430 ERROR 6431 syntax error at position 37 6432 END 6433 INPUT 6434 select distinct t1.project_id as project_id, t1.project_name as project_name, t1.client_ptr as client_ptr, t1.comments as comments, sum( t3.amount_received ) + sum( t3.adjustment ) as total_budget from t2 as client_period , t2 as project_period, t3 left join t1 on (t3.project_ptr = t1.project_id and t3.date_received <= '2001-03-22 14:15:09') left join t4 on t4.client_id = t1.client_ptr where 1 and ( client_period.period_type = 'client_table' and client_period.period_key = t4.client_id and ( client_period.start_date <= '2001-03-22 14:15:09' or isnull( client_period.start_date )) and ( client_period.end_date > '2001-03-21 14:15:09' or isnull( client_period.end_date )) ) and ( project_period.period_type = 'project_table' and project_period.period_key = t1.project_id and ( project_period.start_date <= '2001-03-22 14:15:09' or isnull( project_period.start_date )) and ( project_period.end_date > '2001-03-21 14:15:09' or isnull( project_period.end_date )) ) group by client_id, project_id , client_period.period_id , project_period.period_id order by client_name asc, project_name asc; 6435 END 6436 OUTPUT 6437 select distinct t1.project_id as project_id, t1.project_name as project_name, t1.client_ptr as client_ptr, t1.comments as comments, sum(t3.amount_received) + sum(t3.adjustment) as total_budget from t2 as client_period, t2 as project_period, t3 left join t1 on t3.project_ptr = t1.project_id and t3.date_received <= '2001-03-22 14:15:09' left join t4 on t4.client_id = t1.client_ptr where 1 and (client_period.period_type = 'client_table' and client_period.period_key = t4.client_id and (client_period.start_date <= '2001-03-22 14:15:09' or isnull(client_period.start_date)) and (client_period.end_date > '2001-03-21 14:15:09' or isnull(client_period.end_date))) and (project_period.period_type = 'project_table' and project_period.period_key = t1.project_id and (project_period.start_date <= '2001-03-22 14:15:09' or isnull(project_period.start_date)) and (project_period.end_date > '2001-03-21 14:15:09' or isnull(project_period.end_date))) group by client_id, project_id, client_period.period_id, project_period.period_id order by client_name asc, project_name asc 6438 END 6439 INPUT 6440 select a1,a2,b,min(c) from t2 where b is NULL group by a1,a2; 6441 END 6442 OUTPUT 6443 select a1, a2, b, min(c) from t2 where b is null group by a1, a2 6444 END 6445 INPUT 6446 select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME='nonexisting'; 6447 END 6448 OUTPUT 6449 select count(*) from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = '' and TABLE_NAME = 'nonexisting' 6450 END 6451 INPUT 6452 select t1.*, a from t1; 6453 END 6454 OUTPUT 6455 select t1.*, a from t1 6456 END 6457 INPUT 6458 select right(_utf8 0xD0B0D0B2D0B2,1); 6459 END 6460 OUTPUT 6461 select right(_utf8 0xD0B0D0B2D0B2, 1) from dual 6462 END 6463 INPUT 6464 select 5 div 2; 6465 END 6466 OUTPUT 6467 select 5 div 2 from dual 6468 END 6469 INPUT 6470 select count(*) from t1 where id1 > 95; 6471 END 6472 OUTPUT 6473 select count(*) from t1 where id1 > 95 6474 END 6475 INPUT 6476 select timestampdiff(MONTH, '1991-03-28', '2000-02-29') as a; 6477 END 6478 OUTPUT 6479 select timestampdiff(MONTH, '1991-03-28', '2000-02-29') as a from dual 6480 END 6481 INPUT 6482 select date_format(f1, "%m") as d1, date_format(f1, "%M") as d2 from t1 order by date_format(f1, "%M"); 6483 END 6484 OUTPUT 6485 select date_format(f1, '%m') as d1, date_format(f1, '%M') as d2 from t1 order by date_format(f1, '%M') asc 6486 END 6487 INPUT 6488 select from t1 where st_a=1 and swt1a=1 and swt2a=1 and st_b=1 and swt1b=1 limit 5; 6489 END 6490 ERROR 6491 syntax error at position 12 near 'from' 6492 END 6493 INPUT 6494 select a,b from t1 order by a,b; 6495 END 6496 OUTPUT 6497 select a, b from t1 order by a asc, b asc 6498 END 6499 INPUT 6500 select 1 | (1+1),5 & 3,bit_count(7); 6501 END 6502 OUTPUT 6503 select 1 | 1 + 1, 5 & 3, bit_count(7) from dual 6504 END 6505 INPUT 6506 select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name; 6507 END 6508 OUTPUT 6509 select host, db, `user`, table_name from mysql.tables_priv where `user` like 'mysqltest_%' order by host asc, db asc, `user` asc, table_name asc 6510 END 6511 INPUT 6512 select from t1 where a=18446744073709551615; 6513 END 6514 ERROR 6515 syntax error at position 12 near 'from' 6516 END 6517 INPUT 6518 select cast(18446744073709551615 as signed); 6519 END 6520 OUTPUT 6521 select convert(18446744073709551615, signed) from dual 6522 END 6523 INPUT 6524 select monthname(str_to_date(null, '%m')), monthname(str_to_date(null, '%m')), monthname(str_to_date(1, '%m')), monthname(str_to_date(0, '%m')); 6525 END 6526 OUTPUT 6527 select monthname(str_to_date(null, '%m')), monthname(str_to_date(null, '%m')), monthname(str_to_date(1, '%m')), monthname(str_to_date(0, '%m')) from dual 6528 END 6529 INPUT 6530 select nullif(u, 1) from t1; 6531 END 6532 OUTPUT 6533 select nullif(u, 1) from t1 6534 END 6535 INPUT 6536 select timestampdiff(month,'2004-03-29','2005-03-28'); 6537 END 6538 OUTPUT 6539 select timestampdiff(month, '2004-03-29', '2005-03-28') from dual 6540 END 6541 INPUT 6542 select hex(CONVERT(@utf81 USING sjis)); 6543 END 6544 OUTPUT 6545 select hex(convert(@utf81 using sjis)) from dual 6546 END 6547 INPUT 6548 select collation(hex(130)), coercibility(hex(130)); 6549 END 6550 OUTPUT 6551 select collation(hex(130)), coercibility(hex(130)) from dual 6552 END 6553 INPUT 6554 select concat(a, if(b>10, _utf8mb4 0xC3A6, _utf8mb4 0xC3AF)) from t1; 6555 END 6556 OUTPUT 6557 select concat(a, if(b > 10, _utf8mb4 0xC3A6, _utf8mb4 0xC3AF)) from t1 6558 END 6559 INPUT 6560 select substring('hello', 18446744073709551615, 1); 6561 END 6562 OUTPUT 6563 select substr('hello', 18446744073709551615, 1) from dual 6564 END 6565 INPUT 6566 select repeat('hello', 18446744073709551617); 6567 END 6568 OUTPUT 6569 select repeat('hello', 18446744073709551617) from dual 6570 END 6571 INPUT 6572 select from t2 order by a; 6573 END 6574 ERROR 6575 syntax error at position 12 near 'from' 6576 END 6577 INPUT 6578 select a2, min(c), max(c) from t1 group by a1,a2,b; 6579 END 6580 OUTPUT 6581 select a2, min(c), max(c) from t1 group by a1, a2, b 6582 END 6583 INPUT 6584 select a, MAX(b), FIELD(MAX(b), '43', '4', '5') from t1 group by a; 6585 END 6586 OUTPUT 6587 select a, MAX(b), FIELD(MAX(b), '43', '4', '5') from t1 group by a 6588 END 6589 INPUT 6590 select min(t1.a3), max(t2.a2) from t1, t2 where t1.a2 = 0 and t2.a3 = 'CA'; 6591 END 6592 OUTPUT 6593 select min(t1.a3), max(t2.a2) from t1, t2 where t1.a2 = 0 and t2.a3 = 'CA' 6594 END 6595 INPUT 6596 select 1, min(1) from t1i where a=99; 6597 END 6598 OUTPUT 6599 select 1, min(1) from t1i where a = 99 6600 END 6601 INPUT 6602 select FIELD('b','A','B'); 6603 END 6604 OUTPUT 6605 select FIELD('b', 'A', 'B') from dual 6606 END 6607 INPUT 6608 select length(repeat("1",1024*1024*1024)) as a; 6609 END 6610 OUTPUT 6611 select length(repeat('1', 1024 * 1024 * 1024)) as a from dual 6612 END 6613 INPUT 6614 select a from t1 where a > 4 order by a; 6615 END 6616 OUTPUT 6617 select a from t1 where a > 4 order by a asc 6618 END 6619 INPUT 6620 select 'a' union select concat('a', 4 - 5); 6621 END 6622 OUTPUT 6623 select 'a' from dual union select concat('a', 4 - 5) from dual 6624 END 6625 INPUT 6626 select var_samp(o) as 'null', var_pop(o) as 'null' from bug22555; 6627 END 6628 OUTPUT 6629 select var_samp(o) as `null`, var_pop(o) as `null` from bug22555 6630 END 6631 INPUT 6632 select timestampdiff(MONTH, '2001-02-01', '2001-05-01') as a; 6633 END 6634 OUTPUT 6635 select timestampdiff(MONTH, '2001-02-01', '2001-05-01') as a from dual 6636 END 6637 INPUT 6638 select inet_aton("255.255.255.255.255"),inet_aton("255.255.1.255"),inet_aton("0.1.255"); 6639 END 6640 OUTPUT 6641 select inet_aton('255.255.255.255.255'), inet_aton('255.255.1.255'), inet_aton('0.1.255') from dual 6642 END 6643 INPUT 6644 select SQL_BIG_RESULT t1.b from t1, t2 group by t1.b order by 1; 6645 END 6646 ERROR 6647 syntax error at position 26 6648 END 6649 INPUT 6650 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_spanish_ci; 6651 END 6652 OUTPUT 6653 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_spanish_ci 6654 END 6655 INPUT 6656 select from t1,t1 as t2; 6657 END 6658 ERROR 6659 syntax error at position 12 near 'from' 6660 END 6661 INPUT 6662 select 'zвася' rlike '[[:<:]]вася[[:>:]]'; 6663 END 6664 OUTPUT 6665 select 'zвася' regexp '[[:<:]]вася[[:>:]]' from dual 6666 END 6667 INPUT 6668 select ST_NUMPOINTS(ST_EXTERIORRING(@buff)) from t1; 6669 END 6670 OUTPUT 6671 select ST_NUMPOINTS(ST_EXTERIORRING(@buff)) from t1 6672 END 6673 INPUT 6674 select fld1,fld3 FROM t2 where fld1 like "25050_"; 6675 END 6676 OUTPUT 6677 select fld1, fld3 from t2 where fld1 like '25050_' 6678 END 6679 INPUT 6680 select insert('hello', -4294967297, -4294967297, 'hi'); 6681 END 6682 ERROR 6683 syntax error at position 14 near 'insert' 6684 END 6685 INPUT 6686 select column_name as 'Field',column_type as 'Type',is_nullable as 'Null',column_key as 'Key',column_default as 'Default',extra as 'Extra' from information_schema.columns where table_schema='mysqltest_db1' and table_name='t_no_priv'; 6687 END 6688 OUTPUT 6689 select column_name as Field, column_type as Type, is_nullable as `Null`, column_key as `Key`, column_default as `Default`, extra as Extra from information_schema.`columns` where table_schema = 'mysqltest_db1' and table_name = 't_no_priv' 6690 END 6691 INPUT 6692 select id+0 as a,max(id),concat(facility) as b from t1 group by a order by b desc,a; 6693 END 6694 OUTPUT 6695 select id + 0 as a, max(id), concat(facility) as b from t1 group by a order by b desc, a asc 6696 END 6697 INPUT 6698 select hex(utf8mb4) from t1; 6699 END 6700 OUTPUT 6701 select hex(utf8mb4) from t1 6702 END 6703 INPUT 6704 select -9223372036854775808 2 as result; 6705 END 6706 ERROR 6707 syntax error at position 30 near '2' 6708 END 6709 INPUT 6710 select _koi8r 0xFF regexp _koi8r '[[:lower:]]' COLLATE koi8r_bin; 6711 END 6712 OUTPUT 6713 select _koi8r 0xFF regexp _koi8r '[[:lower:]]' collate koi8r_bin from dual 6714 END 6715 INPUT 6716 select aes_decrypt(aes_encrypt("","a"),"a"); 6717 END 6718 OUTPUT 6719 select aes_decrypt(aes_encrypt('', 'a'), 'a') from dual 6720 END 6721 INPUT 6722 select date_sub("1998-01-01 00:00:00",INTERVAL 1 HOUR); 6723 END 6724 OUTPUT 6725 select date_sub('1998-01-01 00:00:00', interval 1 HOUR) from dual 6726 END 6727 INPUT 6728 select 0, st_overlaps(t.geom, p.geom) from tbl_polygon t, tbl_polygon p where t.id = 'POLY1' and p.id = 'POLY2'; 6729 END 6730 OUTPUT 6731 select 0, st_overlaps(t.geom, p.geom) from tbl_polygon as t, tbl_polygon as p where t.id = 'POLY1' and p.id = 'POLY2' 6732 END 6733 INPUT 6734 select uncompress(compress(@test_compress_string)); 6735 END 6736 OUTPUT 6737 select uncompress(compress(@test_compress_string)) from dual 6738 END 6739 INPUT 6740 select locate('LO','hello',2); 6741 END 6742 OUTPUT 6743 select locate('LO', 'hello', 2) from dual 6744 END 6745 INPUT 6746 select a from t1 where a like "abcdefgh�"; 6747 END 6748 OUTPUT 6749 select a from t1 where a like 'abcdefgh�' 6750 END 6751 INPUT 6752 select from t1 where a=b and b=0x01; 6753 END 6754 ERROR 6755 syntax error at position 12 near 'from' 6756 END 6757 INPUT 6758 select substring_index('aaaaaaaaa1','aa',-3); 6759 END 6760 OUTPUT 6761 select substring_index('aaaaaaaaa1', 'aa', -3) from dual 6762 END 6763 INPUT 6764 select if(u=1,binary st,st) s from t1 order by s; 6765 END 6766 OUTPUT 6767 select if(u = 1, binary st, st) as s from t1 order by s asc 6768 END 6769 INPUT 6770 select from t1 where match a against ("(+aaa* +bbb1*)" in boolean mode); 6771 END 6772 ERROR 6773 syntax error at position 12 near 'from' 6774 END 6775 INPUT 6776 select from t1 where MATCH(a,b) AGAINST("+search -(support vector)" IN BOOLEAN MODE); 6777 END 6778 ERROR 6779 syntax error at position 12 near 'from' 6780 END 6781 INPUT 6782 select from t1 where match b against ('+aaaaaa bbbbbb' in boolean mode); 6783 END 6784 ERROR 6785 syntax error at position 12 near 'from' 6786 END 6787 INPUT 6788 select substring_index("1abcd; 6789 END 6790 ERROR 6791 syntax error at position 31 near '1abcd;' 6792 END 6793 INPUT 6794 select insert('hello', -4294967296, -4294967296, 'hi'); 6795 END 6796 ERROR 6797 syntax error at position 14 near 'insert' 6798 END 6799 INPUT 6800 select replace(concat(lcase(concat('THIS',' ','IS',' ','A',' ')),ucase('false'),' ','test'),'FALSE','REAL'); 6801 END 6802 OUTPUT 6803 select replace(concat(lcase(concat('THIS', ' ', 'IS', ' ', 'A', ' ')), ucase('false'), ' ', 'test'), 'FALSE', 'REAL') from dual 6804 END 6805 INPUT 6806 select space(4294967296); 6807 END 6808 OUTPUT 6809 select space(4294967296) from dual 6810 END 6811 INPUT 6812 select monthname(date) from t1 inner join t2 on t1.id = t2.id order by t1.id; 6813 END 6814 OUTPUT 6815 select monthname(`date`) from t1 join t2 on t1.id = t2.id order by t1.id asc 6816 END 6817 INPUT 6818 select from t1 where CAST(field as DATE) < '2006-11-06 04:08:36.0'; 6819 END 6820 ERROR 6821 syntax error at position 12 near 'from' 6822 END 6823 INPUT 6824 select interval(55,10,20,30,40,50,60,70,80,90,100),interval(3,1,1+1,1+1+1+1),field("IBM","NCA","ICL","SUN","IBM","DIGITAL"),field("A","B","C"),elt(2,"ONE","TWO","THREE"),interval(0,1,2,3,4),elt(1,1,2,3)|0,elt(1,1.1,1.2,1.3)+0; 6825 END 6826 ERROR 6827 syntax error at position 52 6828 END 6829 INPUT 6830 select FIELD('b',_latin2'A','B'); 6831 END 6832 OUTPUT 6833 select FIELD('b', _latin2 'A', 'B') from dual 6834 END 6835 INPUT 6836 select compress(""); 6837 END 6838 OUTPUT 6839 select compress('') from dual 6840 END 6841 INPUT 6842 select min(a3) from t1 where a2 = 2 and a3 > 'SEA'; 6843 END 6844 OUTPUT 6845 select min(a3) from t1 where a2 = 2 and a3 > 'SEA' 6846 END 6847 INPUT 6848 select i1,i2 from t1; 6849 END 6850 OUTPUT 6851 select i1, i2 from t1 6852 END 6853 INPUT 6854 select CAST(TIMESTAMP "2004-01-22 21:45:33" AS BINARY(4)); 6855 END 6856 ERROR 6857 syntax error at position 44 near '2004-01-22 21:45:33' 6858 END 6859 INPUT 6860 select st_contains(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 6861 END 6862 OUTPUT 6863 select st_contains(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 6864 END 6865 INPUT 6866 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name like 't%' and index_name = 'l' order by table_name; 6867 END 6868 OUTPUT 6869 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name like 't%' and index_name = 'l' order by table_name asc 6870 END 6871 INPUT 6872 select (round(-9223372036854775808, -4)); 6873 END 6874 OUTPUT 6875 select round(-9223372036854775808, -4) from dual 6876 END 6877 INPUT 6878 select timestamp("2001-12-01 01:01:01.000100"); 6879 END 6880 OUTPUT 6881 select timestamp('2001-12-01 01:01:01.000100') from dual 6882 END 6883 INPUT 6884 select c1,c2 from t1 group by c1,c2 order by c2; 6885 END 6886 OUTPUT 6887 select c1, c2 from t1 group by c1, c2 order by c2 asc 6888 END 6889 INPUT 6890 select distinct a,sec_to_time(sum(time_to_sec(t))) from t1 group by a,b; 6891 END 6892 OUTPUT 6893 select distinct a, sec_to_time(sum(time_to_sec(t))) from t1 group by a, b 6894 END 6895 INPUT 6896 select table_type from information_schema.tables where table_schema="mysql" and table_name="user"; 6897 END 6898 OUTPUT 6899 select table_type from information_schema.`tables` where table_schema = 'mysql' and table_name = 'user' 6900 END 6901 INPUT 6902 select min(a), max(a) from t1; 6903 END 6904 OUTPUT 6905 select min(a), max(a) from t1 6906 END 6907 INPUT 6908 select c1 as 'no index' from t1 where c1 like cast(concat(0xA4A2, '%') as char character set ujis); 6909 END 6910 OUTPUT 6911 select c1 as `no index` from t1 where c1 like convert(concat(0xA4A2, '%'), char character set ujis) 6912 END 6913 INPUT 6914 select d,a,b from t1 order by a; 6915 END 6916 OUTPUT 6917 select d, a, b from t1 order by a asc 6918 END 6919 INPUT 6920 select t1.id from t1 union select t2.id from t2; 6921 END 6922 OUTPUT 6923 select t1.id from t1 union select t2.id from t2 6924 END 6925 INPUT 6926 select unix_timestamp('1968-01-20 01:00:00'); 6927 END 6928 OUTPUT 6929 select unix_timestamp('1968-01-20 01:00:00') from dual 6930 END 6931 INPUT 6932 select visitor_id,max(ts) as mts from t1 group by visitor_id having DATE_ADD(mts,INTERVAL 3 MONTH) < NOW(); 6933 END 6934 OUTPUT 6935 select visitor_id, max(ts) as mts from t1 group by visitor_id having DATE_ADD(mts, interval 3 MONTH) < now() 6936 END 6937 INPUT 6938 select @category3_id:= 10003; 6939 END 6940 ERROR 6941 syntax error at position 22 near ':' 6942 END 6943 INPUT 6944 select c as c_a from t1 where c='a'; 6945 END 6946 OUTPUT 6947 select c as c_a from t1 where c = 'a' 6948 END 6949 INPUT 6950 select count(distinct s) from t1; 6951 END 6952 OUTPUT 6953 select count(distinct s) from t1 6954 END 6955 INPUT 6956 select t1.col1 from t1 where t1.col2 in (select t2.col2 from t2 group by t2.col1, t2.col2 having t2.col1 <= 10); 6957 END 6958 OUTPUT 6959 select t1.col1 from t1 where t1.col2 in (select t2.col2 from t2 group by t2.col1, t2.col2 having t2.col1 <= 10) 6960 END 6961 INPUT 6962 select from t1 where a like "%�%"; 6963 END 6964 ERROR 6965 syntax error at position 12 near 'from' 6966 END 6967 INPUT 6968 select coercibility(weight_string('test' collate latin1_swedish_ci)); 6969 END 6970 OUTPUT 6971 select coercibility(weight_string('test' collate latin1_swedish_ci)) from dual 6972 END 6973 INPUT 6974 select col1 as count_col1 from t1 as tmp1 group by count_col1 having col1 = 10; 6975 END 6976 OUTPUT 6977 select col1 as count_col1 from t1 as tmp1 group by count_col1 having col1 = 10 6978 END 6979 INPUT 6980 select mod(NULL, 2.0) as 'NULL'; 6981 END 6982 OUTPUT 6983 select mod(null, 2.0) as `NULL` from dual 6984 END 6985 INPUT 6986 select t1.id, t1.data, t2.data from t1, t2 where t1.id = t2.id; 6987 END 6988 OUTPUT 6989 select t1.id, t1.`data`, t2.`data` from t1, t2 where t1.id = t2.id 6990 END 6991 INPUT 6992 select _koi8r'a' = _latin1'A'; 6993 END 6994 OUTPUT 6995 select _koi8r 'a' = _latin1 'A' from dual 6996 END 6997 INPUT 6998 select from t1 where not(a != 1); 6999 END 7000 ERROR 7001 syntax error at position 12 near 'from' 7002 END 7003 INPUT 7004 select fld3 FROM t2 order by fld3 desc limit 5,5; 7005 END 7006 OUTPUT 7007 select fld3 from t2 order by fld3 desc limit 5, 5 7008 END 7009 INPUT 7010 select hex(char(0xFF using utf8mb4)); 7011 END 7012 ERROR 7013 syntax error at position 27 near 'using' 7014 END 7015 INPUT 7016 select from `information_schema`.`TABLE_CONSTRAINTS` where `TABLE_SCHEMA` = NULL; 7017 END 7018 ERROR 7019 syntax error at position 12 near 'from' 7020 END 7021 INPUT 7022 select current_user(); 7023 END 7024 OUTPUT 7025 select current_user() from dual 7026 END 7027 INPUT 7028 select format(t2.f2-t2.f1+1,0) from t1,t2 where t1.f2 = t2.f3 order by t1.f1; 7029 END 7030 OUTPUT 7031 select format(t2.f2 - t2.f1 + 1, 0) from t1, t2 where t1.f2 = t2.f3 order by t1.f1 asc 7032 END 7033 INPUT 7034 select *, MATCH(a,b) AGAINST("collections support" IN BOOLEAN MODE) as x from t1; 7035 END 7036 OUTPUT 7037 select *, match(a, b) against ('collections support' in boolean mode) as x from t1 7038 END 7039 INPUT 7040 select event_schema, event_name, definer, event_type, status from information_schema.events; 7041 END 7042 OUTPUT 7043 select event_schema, event_name, `definer`, event_type, `status` from information_schema.events 7044 END 7045 INPUT 7046 select Fld1, max(Fld2) from t1 group by Fld1 having max(Fld2) is not null; 7047 END 7048 OUTPUT 7049 select Fld1, max(Fld2) from t1 group by Fld1 having max(Fld2) is not null 7050 END 7051 INPUT 7052 select aes_decrypt("a",NULL); 7053 END 7054 OUTPUT 7055 select aes_decrypt('a', null) from dual 7056 END 7057 INPUT 7058 select from t2 left join t1 on t1.fooID = t2.fooID and t1.fooID = 30; 7059 END 7060 ERROR 7061 syntax error at position 12 near 'from' 7062 END 7063 INPUT 7064 select FIELD('b','A' COLLATE latin1_bin,'B'); 7065 END 7066 OUTPUT 7067 select FIELD('b', 'A' collate latin1_bin, 'B') from dual 7068 END 7069 INPUT 7070 select a1,a2,b from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b; 7071 END 7072 OUTPUT 7073 select a1, a2, b from t2 where (a1 >= 'c' or a2 < 'b') and b > 'a' group by a1, a2, b 7074 END 7075 INPUT 7076 select date_add("0199-12-31 23:59:59",INTERVAL 2 SECOND); 7077 END 7078 OUTPUT 7079 select date_add('0199-12-31 23:59:59', interval 2 SECOND) from dual 7080 END 7081 INPUT 7082 select a as foo, sum(b) as bar from t1 group by a having foo<10; 7083 END 7084 OUTPUT 7085 select a as foo, sum(b) as bar from t1 group by a having foo < 10 7086 END 7087 INPUT 7088 select date_sub("0200-01-01 00:00:01",INTERVAL 2 SECOND); 7089 END 7090 OUTPUT 7091 select date_sub('0200-01-01 00:00:01', interval 2 SECOND) from dual 7092 END 7093 INPUT 7094 select a,b,c from t3 force index (a) where a=1 order by a desc, b desc, c desc; 7095 END 7096 OUTPUT 7097 select a, b, c from t3 force index (a) where a = 1 order by a desc, b desc, c desc 7098 END 7099 INPUT 7100 select from t1 where a > 736494; 7101 END 7102 ERROR 7103 syntax error at position 12 near 'from' 7104 END 7105 INPUT 7106 select _latin1'B' in (_latin2'a',_latin1'b'); 7107 END 7108 OUTPUT 7109 select _latin1 'B' in (_latin2 'a', _latin1 'b') from dual 7110 END 7111 INPUT 7112 select friedrich from (select 1 as otto) as t1; 7113 END 7114 OUTPUT 7115 select friedrich from (select 1 as otto from dual) as t1 7116 END 7117 INPUT 7118 select from information_schema.tables where table_catalog = NULL; 7119 END 7120 ERROR 7121 syntax error at position 12 near 'from' 7122 END 7123 INPUT 7124 select aes_decrypt(aes_encrypt('abc','1'),1); 7125 END 7126 OUTPUT 7127 select aes_decrypt(aes_encrypt('abc', '1'), 1) from dual 7128 END 7129 INPUT 7130 select 1 from t1 group by b order by a; 7131 END 7132 OUTPUT 7133 select 1 from t1 group by b order by a asc 7134 END 7135 INPUT 7136 select SUBSTR('abcdefg',-1,5) FROM DUAL; 7137 END 7138 OUTPUT 7139 select substr('abcdefg', -1, 5) from dual 7140 END 7141 INPUT 7142 select trigger_schema, trigger_name from triggers where trigger_name='tr1'; 7143 END 7144 OUTPUT 7145 select trigger_schema, trigger_name from `triggers` where trigger_name = 'tr1' 7146 END 7147 INPUT 7148 select datediff("1997-11-30 23:59:59.000001",null); 7149 END 7150 OUTPUT 7151 select datediff('1997-11-30 23:59:59.000001', null) from dual 7152 END 7153 INPUT 7154 select f1 from t1 where cast("2006-1-1" as date) between f1 and f3; 7155 END 7156 OUTPUT 7157 select f1 from t1 where convert('2006-1-1', date) between f1 and f3 7158 END 7159 INPUT 7160 select maketime(-25,11,12); 7161 END 7162 OUTPUT 7163 select maketime(-25, 11, 12) from dual 7164 END 7165 INPUT 7166 select a,count(*) from t1 group by a; 7167 END 7168 OUTPUT 7169 select a, count(*) from t1 group by a 7170 END 7171 INPUT 7172 select c1 as 'using index' from t1 where c1 like cast(concat(0xA4A2, '%') as char character set ujis); 7173 END 7174 OUTPUT 7175 select c1 as `using index` from t1 where c1 like convert(concat(0xA4A2, '%'), char character set ujis) 7176 END 7177 INPUT 7178 select "at" as col1, "AT" as col2, "c" as col3; 7179 END 7180 OUTPUT 7181 select 'at' as col1, 'AT' as col2, 'c' as col3 from dual 7182 END 7183 INPUT 7184 select rpad('hello', 18446744073709551617, '1'); 7185 END 7186 OUTPUT 7187 select rpad('hello', 18446744073709551617, '1') from dual 7188 END 7189 INPUT 7190 select a,min(b) c,count(distinct rand()) from t1 group by a having c<a + interval 1 day; 7191 END 7192 OUTPUT 7193 select a, min(b) as c, count(distinct rand()) from t1 group by a having c < a + interval 1 day 7194 END 7195 INPUT 7196 select substring_index('the king of thethe hill','the',-2); 7197 END 7198 OUTPUT 7199 select substring_index('the king of thethe hill', 'the', -2) from dual 7200 END 7201 INPUT 7202 select (12 mod 0) is null as '1'; 7203 END 7204 OUTPUT 7205 select 12 % 0 is null as `1` from dual 7206 END 7207 INPUT 7208 select 5.0 div 2.0; 7209 END 7210 OUTPUT 7211 select 5.0 div 2.0 from dual 7212 END 7213 INPUT 7214 select distinct a from t1 group by b,a order by 1; 7215 END 7216 OUTPUT 7217 select distinct a from t1 group by b, a order by 1 asc 7218 END 7219 INPUT 7220 select userid,count(*) from t1 group by userid having 3 IN (1,COUNT(*)) order by userid desc; 7221 END 7222 OUTPUT 7223 select userid, count(*) from t1 group by userid having 3 in (1, COUNT(*)) order by userid desc 7224 END 7225 INPUT 7226 select count(distinct t) from t1; 7227 END 7228 OUTPUT 7229 select count(distinct t) from t1 7230 END 7231 INPUT 7232 select from t3 right join t2 on (t3.i=t2.i); 7233 END 7234 ERROR 7235 syntax error at position 12 near 'from' 7236 END 7237 INPUT 7238 select trace from information_schema.optimizer_trace; 7239 END 7240 OUTPUT 7241 select trace from information_schema.optimizer_trace 7242 END 7243 INPUT 7244 select collation(group_concat(a,_koi8r 0xC1C2)) from t1; 7245 END 7246 OUTPUT 7247 select collation(group_concat(a, _koi8r 0xC1C2)) from t1 7248 END 7249 INPUT 7250 select benchmark(NULL, 1+1); 7251 END 7252 OUTPUT 7253 select benchmark(null, 1 + 1) from dual 7254 END 7255 INPUT 7256 select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b; 7257 END 7258 OUTPUT 7259 select a1, a2, b, min(c), max(c) from t1 where c < 'a0' or c > 'b1' group by a1, a2, b 7260 END 7261 INPUT 7262 select from v3 where renamed=1 group by renamed; 7263 END 7264 ERROR 7265 syntax error at position 12 near 'from' 7266 END 7267 INPUT 7268 select a2 from ((t1 join t2 using (a1)) join t3 on b=c1) join t4 using (c2); 7269 END 7270 OUTPUT 7271 select a2 from ((t1 join t2 using (a1)) join t3 on b = c1) join t4 using (c2) 7272 END 7273 INPUT 7274 select date_add(date,INTERVAL 1 MINUTE) from t1; 7275 END 7276 OUTPUT 7277 select date_add(`date`, interval 1 MINUTE) from t1 7278 END 7279 INPUT 7280 select a as foo, sum(b) as bar from t1 group by a having bar>10 order by foo+10; 7281 END 7282 OUTPUT 7283 select a as foo, sum(b) as bar from t1 group by a having bar > 10 order by foo + 10 asc 7284 END 7285 INPUT 7286 select t1.a, group_concat(c order by (select c from t2 where t2.a=t1.a limit 1)) as grp from t1 group by 1; 7287 END 7288 OUTPUT 7289 select t1.a, group_concat(c order by (select c from t2 where t2.a = t1.a limit 1) asc) as grp from t1 group by 1 7290 END 7291 INPUT 7292 select a1,a2, max(c) from t1 where (b = 'b') group by a1,a2; 7293 END 7294 OUTPUT 7295 select a1, a2, max(c) from t1 where b = 'b' group by a1, a2 7296 END 7297 INPUT 7298 select a as uci2 from t1 where a like 'あいうえおかきくけこさしすせそ'; 7299 END 7300 OUTPUT 7301 select a as uci2 from t1 where a like 'あいうえおかきくけこさしすせそ' 7302 END 7303 INPUT 7304 select length('; 7305 END 7306 ERROR 7307 syntax error at position 17 near ';' 7308 END 7309 INPUT 7310 select CONVERT(_koi8r'����' USING utf8mb4) LIKE CONVERT(_koi8r'����' USING utf8mb4); 7311 END 7312 OUTPUT 7313 select convert(_koi8r '����' using utf8mb4) like convert(_koi8r '����' using utf8mb4) from dual 7314 END 7315 INPUT 7316 select date_add("1997-12-31 23:59:59",INTERVAL 1 MONTH); 7317 END 7318 OUTPUT 7319 select date_add('1997-12-31 23:59:59', interval 1 MONTH) from dual 7320 END 7321 INPUT 7322 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name like 't%' and index_name = 'w' order by table_name; 7323 END 7324 OUTPUT 7325 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name like 't%' and index_name = 'w' order by table_name asc 7326 END 7327 INPUT 7328 select /*1*/ user, host, db, command, state, info from information_schema.processlist where (user='event_scheduler') order by info; 7329 END 7330 OUTPUT 7331 select /*1*/ `user`, host, db, command, state, info from information_schema.`processlist` where `user` = 'event_scheduler' order by info asc 7332 END 7333 INPUT 7334 select rpad('hello', -4294967296, '1'); 7335 END 7336 OUTPUT 7337 select rpad('hello', -4294967296, '1') from dual 7338 END 7339 INPUT 7340 select substring(f1,1,1) from t1 group by 1; 7341 END 7342 OUTPUT 7343 select substr(f1, 1, 1) from t1 group by 1 7344 END 7345 INPUT 7346 select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; 7347 END 7348 OUTPUT 7349 select distinct a1, a2, b from t2 where a1 > 'a' and a2 > 'a' and b = 'c' group by a1, a2, b 7350 END 7351 INPUT 7352 select a.VARIABLE_VALUE - b.VARIABLE_VALUE from t0 b, performance_schema.global_status a where a.VARIABLE_NAME = b.VARIABLE_NAME; 7353 END 7354 OUTPUT 7355 select a.VARIABLE_VALUE - b.VARIABLE_VALUE from t0 as b, performance_schema.global_status as a where a.VARIABLE_NAME = b.VARIABLE_NAME 7356 END 7357 INPUT 7358 select substring('hello', -4294967296, 1); 7359 END 7360 OUTPUT 7361 select substr('hello', -4294967296, 1) from dual 7362 END 7363 INPUT 7364 select grp,group_concat(d order by a) from t1 group by grp; 7365 END 7366 OUTPUT 7367 select grp, group_concat(d order by a asc) from t1 group by grp 7368 END 7369 INPUT 7370 select from t1 where MATCH(a,b) AGAINST("support -collections" IN BOOLEAN MODE); 7371 END 7372 ERROR 7373 syntax error at position 12 near 'from' 7374 END 7375 INPUT 7376 select benchmark(-1, 1); 7377 END 7378 OUTPUT 7379 select benchmark(-1, 1) from dual 7380 END 7381 INPUT 7382 select from t1 where a=version(); 7383 END 7384 ERROR 7385 syntax error at position 12 near 'from' 7386 END 7387 INPUT 7388 select max(a) from t1i; 7389 END 7390 OUTPUT 7391 select max(a) from t1i 7392 END 7393 INPUT 7394 select fld1,fld3 FROM t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3; 7395 END 7396 OUTPUT 7397 select fld1, fld3 from t2 where fld3 = 'Colombo' or fld3 = 'nondecreasing' order by fld3 asc 7398 END 7399 INPUT 7400 select null mod 12 as 'NULL'; 7401 END 7402 OUTPUT 7403 select null % 12 as `NULL` from dual 7404 END 7405 INPUT 7406 select get_lock("test_lock2_1", 20); 7407 END 7408 OUTPUT 7409 select get_lock('test_lock2_1', 20) from dual 7410 END 7411 INPUT 7412 select st_astext(st_union(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))); 7413 END 7414 OUTPUT 7415 select st_astext(st_union(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))) from dual 7416 END 7417 INPUT 7418 select COLUMN_NAME,COLUMN_TYPE, CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH, NUMERIC_PRECISION, NUMERIC_SCALE from information_schema.columns where table_name= 't1'; 7419 END 7420 OUTPUT 7421 select COLUMN_NAME, COLUMN_TYPE, CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH, NUMERIC_PRECISION, NUMERIC_SCALE from information_schema.`columns` where table_name = 't1' 7422 END 7423 INPUT 7424 select from `information_schema`.`key_column_usage` where `TABLE_SCHEMA` = NULL; 7425 END 7426 ERROR 7427 syntax error at position 12 near 'from' 7428 END 7429 INPUT 7430 select ST_AsText(f2),ST_AsText(f3) from t1; 7431 END 7432 OUTPUT 7433 select ST_AsText(f2), ST_AsText(f3) from t1 7434 END 7435 INPUT 7436 select collation(group_concat(a,b)) from t1; 7437 END 7438 OUTPUT 7439 select collation(group_concat(a, b)) from t1 7440 END 7441 INPUT 7442 select t2.fld3 FROM t2 where fld3 LIKE 'honeysuckle_'; 7443 END 7444 OUTPUT 7445 select t2.fld3 from t2 where fld3 like 'honeysuckle_' 7446 END 7447 INPUT 7448 select from t1 where upper(a)='AAA'; 7449 END 7450 ERROR 7451 syntax error at position 12 near 'from' 7452 END 7453 INPUT 7454 select cast("A" as binary) = "a", cast(BINARY "a" as CHAR) = "A"; 7455 END 7456 OUTPUT 7457 select convert('A', binary) = 'a', convert(binary 'a', CHAR) = 'A' from dual 7458 END 7459 INPUT 7460 select from `information_schema`.`TRIGGERS` where `EVENT_OBJECT_SCHEMA` = NULL; 7461 END 7462 ERROR 7463 syntax error at position 12 near 'from' 7464 END 7465 INPUT 7466 select cast(min(ff) as decimal(5,2)) from t2; 7467 END 7468 OUTPUT 7469 select convert(min(ff), decimal(5, 2)) from t2 7470 END 7471 INPUT 7472 select from information_schema.views where TABLE_SCHEMA != 'sys' and TABLE_NAME rlike "v[0-4]{1}$" order by table_name; 7473 END 7474 ERROR 7475 syntax error at position 12 near 'from' 7476 END 7477 INPUT 7478 select group_concat(distinct a) from t1; 7479 END 7480 OUTPUT 7481 select group_concat(distinct a) from t1 7482 END 7483 INPUT 7484 select row('A' COLLATE latin1_bin,'b','c') = row('a','b','c'); 7485 END 7486 OUTPUT 7487 select row('A' collate latin1_bin, 'b', 'c') = row('a', 'b', 'c') from dual 7488 END 7489 INPUT 7490 select 1 << 32,1 << 63, 1 << 64, 4 >> 2, 4 >> 63, 1<< 63 >> 60; 7491 END 7492 OUTPUT 7493 select 1 << 32, 1 << 63, 1 << 64, 4 >> 2, 4 >> 63, 1 << 63 >> 60 from dual 7494 END 7495 INPUT 7496 select mbrwithin(ST_GeomFromText("linestring(1 1, 2 1)"), ST_GeomFromText("polygon((0 0, 3 0, 3 3, 0 3, 0 0))")); 7497 END 7498 OUTPUT 7499 select mbrwithin(ST_GeomFromText('linestring(1 1, 2 1)'), ST_GeomFromText('polygon((0 0, 3 0, 3 3, 0 3, 0 0))')) from dual 7500 END 7501 INPUT 7502 select ST_GeomFromText('linestring(7 6, 15 4)') into @l; 7503 END 7504 ERROR 7505 syntax error at position 56 near 'l' 7506 END 7507 INPUT 7508 select concat("max=",connection) 'p1'; 7509 END 7510 OUTPUT 7511 select concat('max=', `connection`) as p1 from dual 7512 END 7513 INPUT 7514 select locate('he','hello'); 7515 END 7516 OUTPUT 7517 select locate('he', 'hello') from dual 7518 END 7519 INPUT 7520 select st_equals(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 7521 END 7522 OUTPUT 7523 select st_equals(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 7524 END 7525 INPUT 7526 select table_schema, table_name, column_name from information_schema.columns where table_schema not in ('performance_schema', 'sys', 'mysql') and data_type = 'longtext' order by table_name, column_name; 7527 END 7528 OUTPUT 7529 select table_schema, table_name, column_name from information_schema.`columns` where table_schema not in ('performance_schema', 'sys', 'mysql') and data_type = 'longtext' order by table_name asc, column_name asc 7530 END 7531 INPUT 7532 select from t1 ignore key (key1) where text1='teststring' or text1 like 'teststring_%' ORDER BY text1; 7533 END 7534 ERROR 7535 syntax error at position 12 near 'from' 7536 END 7537 INPUT 7538 select from t1 where a not between 1 and 2 and b not between 3 and 4; 7539 END 7540 ERROR 7541 syntax error at position 12 near 'from' 7542 END 7543 INPUT 7544 select max(7) from t2m join t1m; 7545 END 7546 OUTPUT 7547 select max(7) from t2m join t1m 7548 END 7549 INPUT 7550 select count(not_existing_database.t1) from t1; 7551 END 7552 OUTPUT 7553 select count(not_existing_database.t1) from t1 7554 END 7555 INPUT 7556 select a+0 from t1 order by a; 7557 END 7558 OUTPUT 7559 select a + 0 from t1 order by a asc 7560 END 7561 INPUT 7562 select connection_id() > 0; 7563 END 7564 OUTPUT 7565 select connection_id() > 0 from dual 7566 END 7567 INPUT 7568 select group_concat(a1 order by (t1.a)) from t1; 7569 END 7570 OUTPUT 7571 select group_concat(a1 order by t1.a asc) from t1 7572 END 7573 INPUT 7574 select char(195 using utf8mb4); 7575 END 7576 ERROR 7577 syntax error at position 22 near 'using' 7578 END 7579 INPUT 7580 select concat(a, if(b>10, N'x', N'y')) from t1; 7581 END 7582 OUTPUT 7583 select concat(a, if(b > 10, N'x', N'y')) from t1 7584 END 7585 INPUT 7586 select sql_buffer_result max(f1) is null from t1; 7587 END 7588 ERROR 7589 syntax error at position 30 7590 END 7591 INPUT 7592 select substring('hello', -1, -1); 7593 END 7594 OUTPUT 7595 select substr('hello', -1, -1) from dual 7596 END 7597 INPUT 7598 select a, a is not false, a is not true, a is not unknown from t1; 7599 END 7600 ERROR 7601 syntax error at position 58 near 'unknown' 7602 END 7603 INPUT 7604 select cast(NULL as signed), cast(1/0 as signed); 7605 END 7606 OUTPUT 7607 select convert(null, signed), convert(1 / 0, signed) from dual 7608 END 7609 INPUT 7610 select concat(_latin1'a',_latin2'a',_latin5'a',_latin7'a'); 7611 END 7612 OUTPUT 7613 select concat(_latin1 'a', _latin2 'a', _latin5 'a', _latin7 'a') from dual 7614 END 7615 INPUT 7616 select a as d from t limit 1; 7617 END 7618 OUTPUT 7619 select a as d from t limit 1 7620 END 7621 INPUT 7622 select substring('hello', 1, 18446744073709551615); 7623 END 7624 OUTPUT 7625 select substr('hello', 1, 18446744073709551615) from dual 7626 END 7627 INPUT 7628 select a from t1 group by a; 7629 END 7630 OUTPUT 7631 select a from t1 group by a 7632 END 7633 INPUT 7634 select a, group_concat(distinct b) from t1 group by a with rollup; 7635 END 7636 ERROR 7637 syntax error at position 59 near 'with' 7638 END 7639 INPUT 7640 select quote(trim(concat(' ', 'a'))); 7641 END 7642 OUTPUT 7643 select quote(trim(concat(' ', 'a'))) from dual 7644 END 7645 INPUT 7646 select rand(999999),rand(); 7647 END 7648 OUTPUT 7649 select rand(999999), rand() from dual 7650 END 7651 INPUT 7652 select 1.1 + '1.2'; 7653 END 7654 OUTPUT 7655 select 1.1 + '1.2' from dual 7656 END 7657 INPUT 7658 select from_days(to_days("960101")),to_days(960201)-to_days("19960101"),to_days(date_add(curdate(), interval 1 day))-to_days(curdate()),weekday("1997-11-29"); 7659 END 7660 OUTPUT 7661 select from_days(to_days('960101')), to_days(960201) - to_days('19960101'), to_days(date_add(curdate(), interval 1 day)) - to_days(curdate()), weekday('1997-11-29') from dual 7662 END 7663 INPUT 7664 select c c1 from t1 where c='1'; 7665 END 7666 OUTPUT 7667 select c as c1 from t1 where c = '1' 7668 END 7669 INPUT 7670 select date_add("1997-12-31 23:59:59",INTERVAL 1 HOUR); 7671 END 7672 OUTPUT 7673 select date_add('1997-12-31 23:59:59', interval 1 HOUR) from dual 7674 END 7675 INPUT 7676 select 0x903f645a8c507dd79178 like '%-128%'; 7677 END 7678 OUTPUT 7679 select 0x903f645a8c507dd79178 like '%-128%' from dual 7680 END 7681 INPUT 7682 select date_sub("1998-01-01 00:00:00",INTERVAL "1 1:1" DAY_MINUTE); 7683 END 7684 OUTPUT 7685 select date_sub('1998-01-01 00:00:00', interval '1 1:1' DAY_MINUTE) from dual 7686 END 7687 INPUT 7688 select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b ORDER BY NULL; 7689 END 7690 OUTPUT 7691 select t1.a, t2.b from t1, t2 where t1.a = t2.a group by t1.a, t2.b order by null 7692 END 7693 INPUT 7694 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_estonian_ci; 7695 END 7696 OUTPUT 7697 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_estonian_ci 7698 END 7699 INPUT 7700 select hex(soundex(_utf8mb4 0xD091D092D093)); 7701 END 7702 OUTPUT 7703 select hex(soundex(_utf8mb4 0xD091D092D093)) from dual 7704 END 7705 INPUT 7706 select st_astext(st_symdifference(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))); 7707 END 7708 OUTPUT 7709 select st_astext(st_symdifference(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))) from dual 7710 END 7711 INPUT 7712 select mysqltest1.f1(); 7713 END 7714 OUTPUT 7715 select mysqltest1.f1() from dual 7716 END 7717 INPUT 7718 select from (select from t1 where t1.a=(select a from t2 where t2.a=t1.a)) a; 7719 END 7720 ERROR 7721 syntax error at position 12 near 'from' 7722 END 7723 INPUT 7724 select st_disjoint(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 7725 END 7726 OUTPUT 7727 select st_disjoint(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 7728 END 7729 INPUT 7730 select substring('hello', 1, -18446744073709551617); 7731 END 7732 OUTPUT 7733 select substr('hello', 1, -18446744073709551617) from dual 7734 END 7735 INPUT 7736 select concat('*',v,'*',c,'*',t,'*') from t1; 7737 END 7738 OUTPUT 7739 select concat('*', v, '*', c, '*', t, '*') from t1 7740 END 7741 INPUT 7742 select t2.isbn,city,concat(@bar:=t1.libname),count(distinct t1.libname) as a from t3 left join t1 on t3.libname=t1.libname left join t2 on t3.isbn=t2.isbn group by city having count(distinct t1.libname) > 1; 7743 END 7744 ERROR 7745 syntax error at position 33 near ':' 7746 END 7747 INPUT 7748 select ST_DISTANCE(ST_GeomFromText('polygon((0 0, 3 6, 6 3, 0 0),(2 2, 3 4, 4 3, 2 2))'), ST_GeomFromText('point(3 3)')); 7749 END 7750 OUTPUT 7751 select ST_DISTANCE(ST_GeomFromText('polygon((0 0, 3 6, 6 3, 0 0),(2 2, 3 4, 4 3, 2 2))'), ST_GeomFromText('point(3 3)')) from dual 7752 END 7753 INPUT 7754 select hex(min(binary a)),count(*) from t1 group by a; 7755 END 7756 OUTPUT 7757 select hex(min(binary a)), count(*) from t1 group by a 7758 END 7759 INPUT 7760 select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin1'd',2); 7761 END 7762 OUTPUT 7763 select SUBSTRING_INDEX(_latin1 'abcdabcdabcd', _latin1 'd', 2) from dual 7764 END 7765 INPUT 7766 select 1, max(1) from t1i where 1=99; 7767 END 7768 OUTPUT 7769 select 1, max(1) from t1i where 1 = 99 7770 END 7771 INPUT 7772 select database(); 7773 END 7774 OUTPUT 7775 select database() from dual 7776 END 7777 INPUT 7778 select REQ_ID, Group_Concat(URL) as URL, Min(t1.URL_ID) urll, Max(t1.URL_ID) urlg from t1, t2 where t2.URL_ID = t1.URL_ID group by REQ_ID; 7779 END 7780 OUTPUT 7781 select REQ_ID, group_concat(URL) as URL, Min(t1.URL_ID) as urll, Max(t1.URL_ID) as urlg from t1, t2 where t2.URL_ID = t1.URL_ID group by REQ_ID 7782 END 7783 INPUT 7784 select SUBSTR('abcdefg',0,0) FROM DUAL; 7785 END 7786 OUTPUT 7787 select substr('abcdefg', 0, 0) from dual 7788 END 7789 INPUT 7790 select user() like _utf8"%@%"; 7791 END 7792 OUTPUT 7793 select user() like _utf8 '%@%' from dual 7794 END 7795 INPUT 7796 select st_distance(linestring(point(26,87),point(13,95)), geometrycollection(point(4.297374e+307,8.433875e+307), point(1e308, 1e308))) as dist; 7797 END 7798 OUTPUT 7799 select st_distance(linestring(point(26, 87), point(13, 95)), geometrycollection(point(4.297374e+307, 8.433875e+307), point(1e308, 1e308))) as dist from dual 7800 END 7801 INPUT 7802 select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by a; 7803 END 7804 OUTPUT 7805 select group_concat(t1.b, t2.c) from t1 left join t2 using (a) group by a 7806 END 7807 INPUT 7808 select cast('9223372036854775807' as signed); 7809 END 7810 OUTPUT 7811 select convert('9223372036854775807', signed) from dual 7812 END 7813 INPUT 7814 select get_lock("test_lock2", 20); 7815 END 7816 OUTPUT 7817 select get_lock('test_lock2', 20) from dual 7818 END 7819 INPUT 7820 select schema_name from information_schema.schemata order by schema_name; 7821 END 7822 OUTPUT 7823 select schema_name from information_schema.schemata order by schema_name asc 7824 END 7825 INPUT 7826 select std(s1/s2) from bug22555 where i=3; 7827 END 7828 OUTPUT 7829 select std(s1 / s2) from bug22555 where i = 3 7830 END 7831 INPUT 7832 select from t1 where btn like "q%"; 7833 END 7834 ERROR 7835 syntax error at position 12 near 'from' 7836 END 7837 INPUT 7838 select timestampdiff(month,'2004-09-11','2006-09-11'); 7839 END 7840 OUTPUT 7841 select timestampdiff(month, '2004-09-11', '2006-09-11') from dual 7842 END 7843 INPUT 7844 select insert('hello', 1, -4294967297, 'hi'); 7845 END 7846 ERROR 7847 syntax error at position 14 near 'insert' 7848 END 7849 INPUT 7850 select @category1_id:= 10001; 7851 END 7852 ERROR 7853 syntax error at position 22 near ':' 7854 END 7855 INPUT 7856 select hex(char(0x0102 using utf32)); 7857 END 7858 ERROR 7859 syntax error at position 29 near 'using' 7860 END 7861 INPUT 7862 select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3; 7863 END 7864 OUTPUT 7865 select 5 % 3, 5 % -3, -5 % 3, -5 % -3 from dual 7866 END 7867 INPUT 7868 select branch, count(*)/max(id) from t1 group by branch having (branch<>'mumbai' OR count(*)<2) order by id desc,branch desc limit 100; 7869 END 7870 OUTPUT 7871 select branch, count(*) / max(id) from t1 group by branch having branch != 'mumbai' or count(*) < 2 order by id desc, branch desc limit 100 7872 END 7873 INPUT 7874 select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))); 7875 END 7876 OUTPUT 7877 select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))) from dual 7878 END 7879 INPUT 7880 select cast('18446744073709551616' as signed); 7881 END 7882 OUTPUT 7883 select convert('18446744073709551616', signed) from dual 7884 END 7885 INPUT 7886 select get_format(DATE, 'TEST') as a; 7887 END 7888 OUTPUT 7889 select get_format(`DATE`, 'TEST') as a from dual 7890 END 7891 INPUT 7892 select insert('hello', 1, 4294967295, 'hi'); 7893 END 7894 ERROR 7895 syntax error at position 14 near 'insert' 7896 END 7897 INPUT 7898 select t1.* from t t0 cross join (t t1 join t t2 on 100=t0.a); 7899 END 7900 OUTPUT 7901 select t1.* from t as t0 join (t as t1 join t as t2 on 100 = t0.a) 7902 END 7903 INPUT 7904 select _koi8r 0xF7 regexp _koi8r '[[:alpha:]]'; 7905 END 7906 OUTPUT 7907 select _koi8r 0xF7 regexp _koi8r '[[:alpha:]]' from dual 7908 END 7909 INPUT 7910 select userid,count(*) from t1 group by userid having (count(*)+1) IN (4,3) order by userid desc; 7911 END 7912 OUTPUT 7913 select userid, count(*) from t1 group by userid having count(*) + 1 in (4, 3) order by userid desc 7914 END 7915 INPUT 7916 select cast("2001-1-1" as date) = "2001-01-01"; 7917 END 7918 OUTPUT 7919 select convert('2001-1-1', date) = '2001-01-01' from dual 7920 END 7921 INPUT 7922 select sum(qty) as sqty from t1 group by id having count(distinct id) > 0; 7923 END 7924 OUTPUT 7925 select sum(qty) as sqty from t1 group by id having count(distinct id) > 0 7926 END 7927 INPUT 7928 select lpad('hello', 4294967297, '1'); 7929 END 7930 OUTPUT 7931 select lpad('hello', 4294967297, '1') from dual 7932 END 7933 INPUT 7934 select date_add(date,INTERVAL "1:1" MINUTE_SECOND) from t1; 7935 END 7936 OUTPUT 7937 select date_add(`date`, interval '1:1' MINUTE_SECOND) from t1 7938 END 7939 INPUT 7940 select extract(MINUTE_SECOND FROM "10:11:12"); 7941 END 7942 OUTPUT 7943 select extract(minute_second from '10:11:12') from dual 7944 END 7945 INPUT 7946 select concat(a,if(b>10,_ucs2 0x00C0,_ucs2 0x0062)) from t1; 7947 END 7948 OUTPUT 7949 select concat(a, if(b > 10, _ucs2 0x00C0, _ucs2 0x0062)) from t1 7950 END 7951 INPUT 7952 select 1, max(a) from t1m where 1=99; 7953 END 7954 OUTPUT 7955 select 1, max(a) from t1m where 1 = 99 7956 END 7957 INPUT 7958 select a as like_aaaa from t1 where a like 'aaaa%'; 7959 END 7960 OUTPUT 7961 select a as like_aaaa from t1 where a like 'aaaa%' 7962 END 7963 INPUT 7964 select insert(_utf32 0x000000610000006200000063,1,2,_utf32 0x000000640000006500000066); 7965 END 7966 ERROR 7967 syntax error at position 14 near 'insert' 7968 END 7969 INPUT 7970 select from t1 where tt like '%Aa%'; 7971 END 7972 ERROR 7973 syntax error at position 12 near 'from' 7974 END 7975 INPUT 7976 select distinct c1, c2 from t1 order by c2; 7977 END 7978 OUTPUT 7979 select distinct c1, c2 from t1 order by c2 asc 7980 END 7981 INPUT 7982 select 'a' = 'a', 'a' = 'a ', 'a ' = 'a'; 7983 END 7984 OUTPUT 7985 select 'a' = 'a', 'a' = 'a ', 'a ' = 'a' from dual 7986 END 7987 INPUT 7988 select REQ_ID, Group_Concat(URL) as URL from t1, t2 where t2.URL_ID = t1.URL_ID group by REQ_ID; 7989 END 7990 OUTPUT 7991 select REQ_ID, group_concat(URL) as URL from t1, t2 where t2.URL_ID = t1.URL_ID group by REQ_ID 7992 END 7993 INPUT 7994 select count(*) from t1 where v='a'; 7995 END 7996 OUTPUT 7997 select count(*) from t1 where v = 'a' 7998 END 7999 INPUT 8000 select concat('a', quote(NULL)); 8001 END 8002 OUTPUT 8003 select concat('a', quote(null)) from dual 8004 END 8005 INPUT 8006 select a1,a2,b, max(c) from t2 where (c > 'b1') or (c <= 'g1') group by a1,a2,b; 8007 END 8008 OUTPUT 8009 select a1, a2, b, max(c) from t2 where c > 'b1' or c <= 'g1' group by a1, a2, b 8010 END 8011 INPUT 8012 select from mysqldump_myDB.u1; 8013 END 8014 ERROR 8015 syntax error at position 12 near 'from' 8016 END 8017 INPUT 8018 select t1.id,t2.id from t2 left join t1 on t1.id>=74 and t1.id<=0 where t2.id=75 and t1.id is null; 8019 END 8020 OUTPUT 8021 select t1.id, t2.id from t2 left join t1 on t1.id >= 74 and t1.id <= 0 where t2.id = 75 and t1.id is null 8022 END 8023 INPUT 8024 select substring_index('the king of the the hill','the',1); 8025 END 8026 OUTPUT 8027 select substring_index('the king of the the hill', 'the', 1) from dual 8028 END 8029 INPUT 8030 select a1,a2,b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; 8031 END 8032 OUTPUT 8033 select a1, a2, b from t2 where a2 >= 'b' and b = 'a' group by a1, a2, b 8034 END 8035 INPUT 8036 select var_samp(o) as '0.5', var_pop(o) as '0.25' from bug22555; 8037 END 8038 OUTPUT 8039 select var_samp(o) as `0.5`, var_pop(o) as `0.25` from bug22555 8040 END 8041 INPUT 8042 select One, Two, sum(Four) from t1 group by One,Two; 8043 END 8044 OUTPUT 8045 select One, Two, sum(Four) from t1 group by One, Two 8046 END 8047 INPUT 8048 select from t1 where MATCH a,b AGAINST ('"text i"' IN BOOLEAN MODE); 8049 END 8050 ERROR 8051 syntax error at position 12 near 'from' 8052 END 8053 INPUT 8054 select column_name,data_type,CHARACTER_OCTET_LENGTH, CHARACTER_MAXIMUM_LENGTH from information_schema.columns where table_name='t1' order by column_name; 8055 END 8056 OUTPUT 8057 select column_name, data_type, CHARACTER_OCTET_LENGTH, CHARACTER_MAXIMUM_LENGTH from information_schema.`columns` where table_name = 't1' order by column_name asc 8058 END 8059 INPUT 8060 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_hungarian_ci; 8061 END 8062 OUTPUT 8063 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_hungarian_ci 8064 END 8065 INPUT 8066 select date_sub("1998-01-01 00:00:00.000001",INTERVAL "000002" MICROSECOND); 8067 END 8068 OUTPUT 8069 select date_sub('1998-01-01 00:00:00.000001', interval '000002' MICROSECOND) from dual 8070 END 8071 INPUT 8072 select concat(a1,a2),b,min(c),max(c) from t1 where a1 < 'd' group by a1,a2,b; 8073 END 8074 OUTPUT 8075 select concat(a1, a2), b, min(c), max(c) from t1 where a1 < 'd' group by a1, a2, b 8076 END 8077 INPUT 8078 select date("1997-12-31 23:59:59.000001"); 8079 END 8080 OUTPUT 8081 select date('1997-12-31 23:59:59.000001') from dual 8082 END 8083 INPUT 8084 select collation(trim(_latin2' a ')), coercibility(trim(_latin2' a ')); 8085 END 8086 OUTPUT 8087 select collation(trim(_latin2 ' a ')), coercibility(trim(_latin2 ' a ')) from dual 8088 END 8089 INPUT 8090 select count(distinct case when id<=63 then id end) from tb; 8091 END 8092 OUTPUT 8093 select count(distinct case when id <= 63 then id end) from tb 8094 END 8095 INPUT 8096 select count(*) from t2 where id2; 8097 END 8098 OUTPUT 8099 select count(*) from t2 where id2 8100 END 8101 INPUT 8102 select from t1 where match(s) against('para' in boolean mode); 8103 END 8104 ERROR 8105 syntax error at position 12 near 'from' 8106 END 8107 INPUT 8108 select -(-9223372036854775808), -(-(-9223372036854775808)); 8109 END 8110 OUTPUT 8111 select - -9223372036854775808, - - -9223372036854775808 from dual 8112 END 8113 INPUT 8114 select from t1_mrg; 8115 END 8116 ERROR 8117 syntax error at position 12 near 'from' 8118 END 8119 INPUT 8120 select from t1 where a >= '1'; 8121 END 8122 ERROR 8123 syntax error at position 12 near 'from' 8124 END 8125 INPUT 8126 select concat(b,'.') from t1; 8127 END 8128 OUTPUT 8129 select concat(b, '.') from t1 8130 END 8131 INPUT 8132 select mod(12, NULL) as 'NULL'; 8133 END 8134 OUTPUT 8135 select mod(12, null) as `NULL` from dual 8136 END 8137 INPUT 8138 select from (select from t1,t2) foo; 8139 END 8140 ERROR 8141 syntax error at position 12 near 'from' 8142 END 8143 INPUT 8144 select from t1 where MATCH a,b AGAINST ('"support now"' IN BOOLEAN MODE); 8145 END 8146 ERROR 8147 syntax error at position 12 near 'from' 8148 END 8149 INPUT 8150 select hex(inet_aton('127.1.1')); 8151 END 8152 OUTPUT 8153 select hex(inet_aton('127.1.1')) from dual 8154 END 8155 INPUT 8156 select pi(),format(sin(pi()/2),6),format(cos(pi()/2),6),format(abs(tan(pi())),6),format(cot(1),6),format(asin(1),6),format(acos(0),6),format(atan(1),6); 8157 END 8158 OUTPUT 8159 select pi(), format(sin(pi() / 2), 6), format(cos(pi() / 2), 6), format(abs(tan(pi())), 6), format(cot(1), 6), format(asin(1), 6), format(acos(0), 6), format(atan(1), 6) from dual 8160 END 8161 INPUT 8162 select least(c1,'�'), greatest(c1,'�') from t1; 8163 END 8164 OUTPUT 8165 select least(c1, '�'), greatest(c1, '�') from t1 8166 END 8167 INPUT 8168 select ST_Astext(ST_Envelope(ST_MPointFromWKB(ST_AsWKB(MultiPoint(Point('0', '0'),Point('-0', '0'), Point('0', '-0')))))) as result; 8169 END 8170 OUTPUT 8171 select ST_Astext(ST_Envelope(ST_MPointFromWKB(ST_AsWKB(MultiPoint(Point('0', '0'), Point('-0', '0'), Point('0', '-0')))))) as result from dual 8172 END 8173 INPUT 8174 select constraint_name from information_schema.table_constraints where table_schema='test' order by constraint_name; 8175 END 8176 OUTPUT 8177 select constraint_name from information_schema.table_constraints where table_schema = 'test' order by constraint_name asc 8178 END 8179 INPUT 8180 select from information_schema.partitions where table_schema="test"; 8181 END 8182 ERROR 8183 syntax error at position 12 near 'from' 8184 END 8185 INPUT 8186 select max(a2) from t1 where a2 >= 1; 8187 END 8188 OUTPUT 8189 select max(a2) from t1 where a2 >= 1 8190 END 8191 INPUT 8192 select from t6 order by b,a limit 6,3; 8193 END 8194 ERROR 8195 syntax error at position 12 near 'from' 8196 END 8197 INPUT 8198 select from t1 where a like "te_t"; 8199 END 8200 ERROR 8201 syntax error at position 12 near 'from' 8202 END 8203 INPUT 8204 select match(t1.texte,t1.sujet,t1.motsclefs) against('droit' IN BOOLEAN MODE) from t1 left join t2 on t2.id=t1.id; 8205 END 8206 OUTPUT 8207 select match(t1.texte, t1.sujet, t1.motsclefs) against ('droit' in boolean mode) from t1 left join t2 on t2.id = t1.id 8208 END 8209 INPUT 8210 select max(t1.a2),max(t2.a1) from t1 left outer join t2 on t1.a1=10; 8211 END 8212 OUTPUT 8213 select max(t1.a2), max(t2.a1) from t1 left join t2 on t1.a1 = 10 8214 END 8215 INPUT 8216 select length(repeat("",1)) as a; 8217 END 8218 OUTPUT 8219 select length(repeat('', 1)) as a from dual 8220 END 8221 INPUT 8222 select length(repeat("",1024*1024*1024)) as a; 8223 END 8224 OUTPUT 8225 select length(repeat('', 1024 * 1024 * 1024)) as a from dual 8226 END 8227 INPUT 8228 select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysql' AND TABLE_NAME=''; 8229 END 8230 OUTPUT 8231 select count(*) from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = 'mysql' and TABLE_NAME = '' 8232 END 8233 INPUT 8234 select min(a3) from t1 where a2 = 2; 8235 END 8236 OUTPUT 8237 select min(a3) from t1 where a2 = 2 8238 END 8239 INPUT 8240 select collation(format(130,10)), coercibility(format(130,10)); 8241 END 8242 OUTPUT 8243 select collation(format(130, 10)), coercibility(format(130, 10)) from dual 8244 END 8245 INPUT 8246 select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ NULL, NULL ^ 1; 8247 END 8248 OUTPUT 8249 select 3 ^ 11, 1 ^ 1, 1 ^ 0, 1 ^ null, null ^ 1 from dual 8250 END 8251 INPUT 8252 select _utf32'a' collate utf32_general_ci = 0xfffd; 8253 END 8254 OUTPUT 8255 select _utf32 'a' collate utf32_general_ci = 0xfffd from dual 8256 END 8257 INPUT 8258 select round(1.5, -2147483649), round(1.5, 2147483648); 8259 END 8260 OUTPUT 8261 select round(1.5, -2147483649), round(1.5, 2147483648) from dual 8262 END 8263 INPUT 8264 select a1,a2,b,min(c),max(c) from t2 where a1 < 'd' group by a1,a2,b; 8265 END 8266 OUTPUT 8267 select a1, a2, b, min(c), max(c) from t2 where a1 < 'd' group by a1, a2, b 8268 END 8269 INPUT 8270 select 1 where 'b_a' like '__a' escape '_'; 8271 END 8272 OUTPUT 8273 select 1 from dual where 'b_a' like '__a' escape '_' 8274 END 8275 INPUT 8276 select period_add("9602",-12),period_diff(199505,"9404"); 8277 END 8278 OUTPUT 8279 select period_add('9602', -12), period_diff(199505, '9404') from dual 8280 END 8281 INPUT 8282 select hex(@utf82:= CONVERT(@ujis2 USING utf8)); 8283 END 8284 ERROR 8285 syntax error at position 19 near ':' 8286 END 8287 INPUT 8288 select from t5 order by a,b; 8289 END 8290 ERROR 8291 syntax error at position 12 near 'from' 8292 END 8293 INPUT 8294 select 1, max(a) from t1i where a=99; 8295 END 8296 OUTPUT 8297 select 1, max(a) from t1i where a = 99 8298 END 8299 INPUT 8300 select date_add("1997-12-31 23:59:59",INTERVAL 100000 HOUR); 8301 END 8302 OUTPUT 8303 select date_add('1997-12-31 23:59:59', interval 100000 HOUR) from dual 8304 END 8305 INPUT 8306 select std(s1/s2) from bug22555 where i=2; 8307 END 8308 OUTPUT 8309 select std(s1 / s2) from bug22555 where i = 2 8310 END 8311 INPUT 8312 select count(*) from t1 where c='a'; 8313 END 8314 OUTPUT 8315 select count(*) from t1 where c = 'a' 8316 END 8317 INPUT 8318 select sqrt(cast(-2 as unsigned)), sqrt(18446744073709551614), sqrt(-2); 8319 END 8320 OUTPUT 8321 select sqrt(convert(-2, unsigned)), sqrt(18446744073709551614), sqrt(-2) from dual 8322 END 8323 INPUT 8324 select count(*) from t1 INNER JOIN (SELECT A.E1, A.E2, A.E3 FROM t1 AS A WHERE A.E3 = (SELECT MAX(B.E3) FROM t1 AS B WHERE A.E2 = B.E2)) AS themax ON t1.E1 = themax.E2 AND t1.E1 = t1.E2; 8325 END 8326 OUTPUT 8327 select count(*) from t1 join (select A.E1, A.E2, A.E3 from t1 as A where A.E3 = (select MAX(B.E3) from t1 as B where A.E2 = B.E2)) as themax on t1.E1 = themax.E2 and t1.E1 = t1.E2 8328 END 8329 INPUT 8330 select insert('hello', 1, -18446744073709551617, 'hi'); 8331 END 8332 ERROR 8333 syntax error at position 14 near 'insert' 8334 END 8335 INPUT 8336 select from t1 union all select from t2; 8337 END 8338 ERROR 8339 syntax error at position 12 near 'from' 8340 END 8341 INPUT 8342 select 'a' regexp 'A' collate latin1_general_ci; 8343 END 8344 OUTPUT 8345 select 'a' regexp 'A' collate latin1_general_ci from dual 8346 END 8347 INPUT 8348 select date_sub("1998-01-01 00:00:00.000001",INTERVAL "1.000002" SECOND_MICROSECOND); 8349 END 8350 OUTPUT 8351 select date_sub('1998-01-01 00:00:00.000001', interval '1.000002' SECOND_MICROSECOND) from dual 8352 END 8353 INPUT 8354 select if(0, 18446744073709551610, 18446744073709551610); 8355 END 8356 OUTPUT 8357 select if(0, 18446744073709551610, 18446744073709551610) from dual 8358 END 8359 INPUT 8360 select st_astext(st_difference(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))); 8361 END 8362 OUTPUT 8363 select st_astext(st_difference(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))) from dual 8364 END 8365 INPUT 8366 select date_add("1997-12-31 23:59:59",INTERVAL "1:1" DAY_HOUR); 8367 END 8368 OUTPUT 8369 select date_add('1997-12-31 23:59:59', interval '1:1' DAY_HOUR) from dual 8370 END 8371 INPUT 8372 select ST_astext(ST_Union(ST_geometryfromtext('point(1 1)'), ST_geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))'))); 8373 END 8374 OUTPUT 8375 select ST_astext(ST_Union(ST_geometryfromtext('point(1 1)'), ST_geometryfromtext('polygon((0 0, 2 0, 1 2, 0 0))'))) from dual 8376 END 8377 INPUT 8378 select hex(convert(_big5 0xC84041 using ucs2)); 8379 END 8380 OUTPUT 8381 select hex(convert(_big5 0xC84041 using ucs2)) from dual 8382 END 8383 INPUT 8384 select quote(concat('abc'', 'cba')); 8385 END 8386 ERROR 8387 syntax error at position 37 near '));' 8388 END 8389 INPUT 8390 select max(t1.a1), max(t2.a1) from t1, t2 where t2.a2=9; 8391 END 8392 OUTPUT 8393 select max(t1.a1), max(t2.a1) from t1, t2 where t2.a2 = 9 8394 END 8395 INPUT 8396 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_latvian_ci; 8397 END 8398 OUTPUT 8399 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_latvian_ci 8400 END 8401 INPUT 8402 select 1 from t1 where a like @pattern; 8403 END 8404 OUTPUT 8405 select 1 from t1 where a like @pattern 8406 END 8407 INPUT 8408 select uncompress(compress("")); 8409 END 8410 OUTPUT 8411 select uncompress(compress('')) from dual 8412 END 8413 INPUT 8414 select find_in_set('a',binary 'A,B,C'); 8415 END 8416 OUTPUT 8417 select find_in_set('a', binary 'A,B,C') from dual 8418 END 8419 INPUT 8420 select week(19981231,2), week(19981231,3), week(20000101,2), week(20000101,3); 8421 END 8422 OUTPUT 8423 select week(19981231, 2), week(19981231, 3), week(20000101, 2), week(20000101, 3) from dual 8424 END 8425 INPUT 8426 select t2.* from ((select from t1) as A inner join t2 on A.ID = t2.FID); 8427 END 8428 ERROR 8429 syntax error at position 31 near 'from' 8430 END 8431 INPUT 8432 select from information_schema.COLUMNS where table_name="t1" and column_name= "a" order by table_name; 8433 END 8434 ERROR 8435 syntax error at position 12 near 'from' 8436 END 8437 INPUT 8438 select rpad('hello', 4294967295, '1'); 8439 END 8440 OUTPUT 8441 select rpad('hello', 4294967295, '1') from dual 8442 END 8443 INPUT 8444 select substring('hello', 1, -1); 8445 END 8446 OUTPUT 8447 select substr('hello', 1, -1) from dual 8448 END 8449 INPUT 8450 select CASE when 1=0 then "true" else "false" END; 8451 END 8452 OUTPUT 8453 select case when 1 = 0 then 'true' else 'false' end from dual 8454 END 8455 INPUT 8456 select from t1 where match b against ('full*' in boolean mode); 8457 END 8458 ERROR 8459 syntax error at position 12 near 'from' 8460 END 8461 INPUT 8462 select locate(_utf8 0xD0B1, _utf8 0xD0B0D091D0B2); 8463 END 8464 OUTPUT 8465 select locate(_utf8 0xD0B1, _utf8 0xD0B0D091D0B2) from dual 8466 END 8467 INPUT 8468 select 18446744073709551615, 18446744073709551615 DIV 1, 18446744073709551615 DIV 2; 8469 END 8470 OUTPUT 8471 select 18446744073709551615, 18446744073709551615 div 1, 18446744073709551615 div 2 from dual 8472 END 8473 INPUT 8474 select from t2 where match name against ('*a*b*c*d*e*f*' in boolean mode); 8475 END 8476 ERROR 8477 syntax error at position 12 near 'from' 8478 END 8479 INPUT 8480 select hex(c) from t1; 8481 END 8482 OUTPUT 8483 select hex(c) from t1 8484 END 8485 INPUT 8486 select ' вася ' rlike '[[:<:]]вася[[:>:]]'; 8487 END 8488 OUTPUT 8489 select ' вася ' regexp '[[:<:]]вася[[:>:]]' from dual 8490 END 8491 INPUT 8492 select max(a3) from t1 where a2 = 2 and 'SEA' > a3; 8493 END 8494 OUTPUT 8495 select max(a3) from t1 where a2 = 2 and 'SEA' > a3 8496 END 8497 INPUT 8498 select inet_ntoa(inet_aton("255.255.255.255.255.255.255.255")); 8499 END 8500 OUTPUT 8501 select inet_ntoa(inet_aton('255.255.255.255.255.255.255.255')) from dual 8502 END 8503 INPUT 8504 select count(*) from t1 join ( select t1.f1 from t1 join t1 as t2 join t1 as t3) tt on t1.f1 = tt.f1; 8505 END 8506 OUTPUT 8507 select count(*) from t1 join (select t1.f1 from t1 join t1 as t2 join t1 as t3) as tt on t1.f1 = tt.f1 8508 END 8509 INPUT 8510 select collation(ltrim(_latin2' a ')), coercibility(ltrim(_latin2' a ')); 8511 END 8512 OUTPUT 8513 select collation(ltrim(_latin2 ' a ')), coercibility(ltrim(_latin2 ' a ')) from dual 8514 END 8515 INPUT 8516 select hex(weight_string('ab' as char(1))); 8517 END 8518 ERROR 8519 syntax error at position 39 8520 END 8521 INPUT 8522 select a1,a2,b,max(c),min(c) from t2 group by a1,a2,b; 8523 END 8524 OUTPUT 8525 select a1, a2, b, max(c), min(c) from t2 group by a1, a2, b 8526 END 8527 INPUT 8528 select concat(':',ltrim(' left '),':',rtrim(' right '),':'); 8529 END 8530 OUTPUT 8531 select concat(':', ltrim(' left '), ':', rtrim(' right '), ':') from dual 8532 END 8533 INPUT 8534 select c from t1 where c=0xD0B1212223D0B1D0B1D0B1D0B1D0B1; 8535 END 8536 OUTPUT 8537 select c from t1 where c = 0xD0B1212223D0B1D0B1D0B1D0B1D0B1 8538 END 8539 INPUT 8540 select (CASE "two" when "one" then 1.00 WHEN "two" then 2.00 END) +0.0; 8541 END 8542 OUTPUT 8543 select case 'two' when 'one' then 1.00 when 'two' then 2.00 end + 0.0 from dual 8544 END 8545 INPUT 8546 select count(*) from t1 where match a against ('aaayyy'); 8547 END 8548 ERROR 8549 syntax error at position 38 near 'a' 8550 END 8551 INPUT 8552 select microsecond("1997-12-31 23:59:59.000001"); 8553 END 8554 OUTPUT 8555 select microsecond('1997-12-31 23:59:59.000001') from dual 8556 END 8557 INPUT 8558 select f1 from t1 group by f1 having max(f1)=f1; 8559 END 8560 OUTPUT 8561 select f1 from t1 group by f1 having max(f1) = f1 8562 END 8563 INPUT 8564 select concat('|', text1, '|') from t1 where text1 like 'teststring_%'; 8565 END 8566 OUTPUT 8567 select concat('|', text1, '|') from t1 where text1 like 'teststring_%' 8568 END 8569 INPUT 8570 select count(*) from t1 where facility IS NULL; 8571 END 8572 OUTPUT 8573 select count(*) from t1 where facility is null 8574 END 8575 INPUT 8576 select count(b) from t1 where b >= 10; 8577 END 8578 OUTPUT 8579 select count(b) from t1 where b >= 10 8580 END 8581 INPUT 8582 select substring('hello', -18446744073709551616, -18446744073709551616); 8583 END 8584 OUTPUT 8585 select substr('hello', -18446744073709551616, -18446744073709551616) from dual 8586 END 8587 INPUT 8588 select charset(a) from t2; 8589 END 8590 OUTPUT 8591 select charset(a) from t2 8592 END 8593 INPUT 8594 select weight_string(NULL); 8595 END 8596 OUTPUT 8597 select weight_string(null) from dual 8598 END 8599 INPUT 8600 select from information_schema.TABLE_CONSTRAINTS where TABLE_SCHEMA= "test" order by TABLE_SCHEMA, TABLE_NAME, CONSTRAINT_NAME; 8601 END 8602 ERROR 8603 syntax error at position 12 near 'from' 8604 END 8605 INPUT 8606 select distinct least(1,count(distinct a)) from t1 group by a; 8607 END 8608 OUTPUT 8609 select distinct least(1, count(distinct a)) from t1 group by a 8610 END 8611 INPUT 8612 select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121'); 8613 END 8614 OUTPUT 8615 select distinct a1, a2, b, c from t1 where a2 >= 'b' and b = 'a' and c = 'i121' 8616 END 8617 INPUT 8618 select 'a ' = 'a ', 'a ' < 'a ', 'a ' > 'a '; 8619 END 8620 OUTPUT 8621 select 'a\t' = 'a ', 'a\t' < 'a ', 'a\t' > 'a ' from dual 8622 END 8623 INPUT 8624 select str_to_date("2003-....01ABCD-02 10:11:12.0012", "%Y-%.%m%@-%d %H:%i:%S.%f") as a; 8625 END 8626 OUTPUT 8627 select str_to_date('2003-....01ABCD-02 10:11:12.0012', '%Y-%.%m%@-%d %H:%i:%S.%f') as a from dual 8628 END 8629 INPUT 8630 select event_name, event_definition, status, interval_field, interval_value from information_schema.events; 8631 END 8632 OUTPUT 8633 select event_name, event_definition, `status`, interval_field, interval_value from information_schema.events 8634 END 8635 INPUT 8636 select addtime("1997-12-31 23:59:59.999999", "1998-01-01 01:01:01.999999"); 8637 END 8638 OUTPUT 8639 select addtime('1997-12-31 23:59:59.999999', '1998-01-01 01:01:01.999999') from dual 8640 END 8641 INPUT 8642 select 'a' regexp 'A' collate latin1_bin; 8643 END 8644 OUTPUT 8645 select 'a' regexp 'A' collate latin1_bin from dual 8646 END 8647 INPUT 8648 select from information_schema.views where table_schema != 'sys' order by table_name; 8649 END 8650 ERROR 8651 syntax error at position 12 near 'from' 8652 END 8653 INPUT 8654 select from t2 left outer join t1 using (n); 8655 END 8656 ERROR 8657 syntax error at position 12 near 'from' 8658 END 8659 INPUT 8660 select from t1, t2 where t1.value64= 9223372036854775807 and t2.value64=t1.value64; 8661 END 8662 ERROR 8663 syntax error at position 12 near 'from' 8664 END 8665 INPUT 8666 select makedate(1997,1); 8667 END 8668 OUTPUT 8669 select makedate(1997, 1) from dual 8670 END 8671 INPUT 8672 select a, a is false, a is true, a is unknown from t1; 8673 END 8674 ERROR 8675 syntax error at position 46 near 'unknown' 8676 END 8677 INPUT 8678 select std(e) from bug22555 group by i; 8679 END 8680 OUTPUT 8681 select std(e) from bug22555 group by i 8682 END 8683 INPUT 8684 select distinct a1,a2,b from t2; 8685 END 8686 OUTPUT 8687 select distinct a1, a2, b from t2 8688 END 8689 INPUT 8690 select mbrcovers(ST_GeomFromText("polygon((2 2, 10 2, 10 10, 2 10, 2 2))"), ST_GeomFromText("point(2 4)")); 8691 END 8692 OUTPUT 8693 select mbrcovers(ST_GeomFromText('polygon((2 2, 10 2, 10 10, 2 10, 2 2))'), ST_GeomFromText('point(2 4)')) from dual 8694 END 8695 INPUT 8696 select uncompress(b) from t1; 8697 END 8698 OUTPUT 8699 select uncompress(b) from t1 8700 END 8701 INPUT 8702 select count(*) from t1 group by col1 having col1 = 10; 8703 END 8704 OUTPUT 8705 select count(*) from t1 group by col1 having col1 = 10 8706 END 8707 INPUT 8708 select count(distinct x,y) from t1; 8709 END 8710 OUTPUT 8711 select count(distinct x, y) from t1 8712 END 8713 INPUT 8714 select coercibility(col1), collation(col1) from v2; 8715 END 8716 OUTPUT 8717 select coercibility(col1), collation(col1) from v2 8718 END 8719 INPUT 8720 select mbrwithin(ST_GeomFromText("point(2 4)"), ST_GeomFromText("linestring(2 0, 2 6)")); 8721 END 8722 OUTPUT 8723 select mbrwithin(ST_GeomFromText('point(2 4)'), ST_GeomFromText('linestring(2 0, 2 6)')) from dual 8724 END 8725 INPUT 8726 select st_astext(st_makeenvelope(st_geomfromtext('point(0 0)'), st_geomfromtext('point(-22 -11)'))); 8727 END 8728 OUTPUT 8729 select st_astext(st_makeenvelope(st_geomfromtext('point(0 0)'), st_geomfromtext('point(-22 -11)'))) from dual 8730 END 8731 INPUT 8732 select _latin1'B' collate latin1_general_ci between _latin1'a' collate latin1_bin and _latin1'b'; 8733 END 8734 OUTPUT 8735 select _latin1 'B' collate latin1_general_ci between _latin1 'a' collate latin1_bin and _latin1 'b' from dual 8736 END 8737 INPUT 8738 select sum(a), count(*) from t1 group by a; 8739 END 8740 OUTPUT 8741 select sum(a), count(*) from t1 group by a 8742 END 8743 INPUT 8744 select from t1; 8745 END 8746 ERROR 8747 syntax error at position 12 near 'from' 8748 END 8749 INPUT 8750 select makedate(03,1); 8751 END 8752 OUTPUT 8753 select makedate(03, 1) from dual 8754 END 8755 INPUT 8756 select user(), current_user(), database(); 8757 END 8758 OUTPUT 8759 select user(), current_user(), database() from dual 8760 END 8761 INPUT 8762 select hex(char(256)); 8763 END 8764 OUTPUT 8765 select hex(char(256)) from dual 8766 END 8767 INPUT 8768 select SUBSTR('abcdefg',1,-1) FROM DUAL; 8769 END 8770 OUTPUT 8771 select substr('abcdefg', 1, -1) from dual 8772 END 8773 INPUT 8774 select max(a3) from t1 where a2 = 2 and a3 < 'SEA'; 8775 END 8776 OUTPUT 8777 select max(a3) from t1 where a2 = 2 and a3 < 'SEA' 8778 END 8779 INPUT 8780 select week(20000101,0) as '0', week(20000101,1) as '1', week(20000101,2) as '2', week(20000101,3) as '3', week(20000101,4) as '4', week(20000101,5) as '5', week(20000101,6) as '6', week(20000101,7) as '7'; 8781 END 8782 OUTPUT 8783 select week(20000101, 0) as `0`, week(20000101, 1) as `1`, week(20000101, 2) as `2`, week(20000101, 3) as `3`, week(20000101, 4) as `4`, week(20000101, 5) as `5`, week(20000101, 6) as `6`, week(20000101, 7) as `7` from dual 8784 END 8785 INPUT 8786 select a as x from t1 having x=3; 8787 END 8788 OUTPUT 8789 select a as x from t1 having x = 3 8790 END 8791 INPUT 8792 select from t1 where x != 0; 8793 END 8794 ERROR 8795 syntax error at position 12 near 'from' 8796 END 8797 INPUT 8798 select locate('lo','hello',-4294967297); 8799 END 8800 OUTPUT 8801 select locate('lo', 'hello', -4294967297) from dual 8802 END 8803 INPUT 8804 select from t1 where firstname='John' and firstname like binary 'john'; 8805 END 8806 ERROR 8807 syntax error at position 12 near 'from' 8808 END 8809 INPUT 8810 select (with cte as (select t1.a) select from cte) from t1; 8811 END 8812 ERROR 8813 syntax error at position 46 near 'from' 8814 END 8815 INPUT 8816 select from v1d; 8817 END 8818 ERROR 8819 syntax error at position 12 near 'from' 8820 END 8821 INPUT 8822 select count(*) from t1, t2 where t1.p = t2.i; 8823 END 8824 OUTPUT 8825 select count(*) from t1, t2 where t1.p = t2.i 8826 END 8827 INPUT 8828 select isnull(date(NULL)), isnull(cast(NULL as DATE)); 8829 END 8830 OUTPUT 8831 select isnull(date(null)), isnull(convert(null, DATE)) from dual 8832 END 8833 INPUT 8834 select from t1 ignore index (primary) where tt like 'Aa%'; 8835 END 8836 ERROR 8837 syntax error at position 12 near 'from' 8838 END 8839 INPUT 8840 select hex(weight_string(_utf8mb4 0xF0908080 /bin /boot /cdrom /dev /etc /home /lib /lib32 /lib64 /libx32 /lost+found /media /mnt /opt /proc /root /run /sbin /snap /srv /swapfile /sys /tmp /usr /var U+10000 node_modules/ collate utf8mb4_unicode_ci)); 8841 END 8842 ERROR 8843 syntax error at position 202 8844 END 8845 INPUT 8846 select from t1 natural left join t2 natural left join t3; 8847 END 8848 ERROR 8849 syntax error at position 12 near 'from' 8850 END 8851 INPUT 8852 select collation(group_concat(a separator ',')) from t1; 8853 END 8854 OUTPUT 8855 select collation(group_concat(a separator ',')) from t1 8856 END 8857 INPUT 8858 select "hepp"; 8859 END 8860 OUTPUT 8861 select 'hepp' from dual 8862 END 8863 INPUT 8864 select from t1 where word like 'ae'; 8865 END 8866 ERROR 8867 syntax error at position 12 near 'from' 8868 END 8869 INPUT 8870 select strcmp(date_format(utc_timestamp(),"%T"), utc_time())=0; 8871 END 8872 OUTPUT 8873 select strcmp(date_format(utc_timestamp(), '%T'), utc_time()) = 0 from dual 8874 END 8875 INPUT 8876 select st_astext(st_symdifference(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))); 8877 END 8878 OUTPUT 8879 select st_astext(st_symdifference(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))) from dual 8880 END 8881 INPUT 8882 select distinct t1.a from t1,t3 where t1.a=t3.a; 8883 END 8884 OUTPUT 8885 select distinct t1.a from t1, t3 where t1.a = t3.a 8886 END 8887 INPUT 8888 select date_add('1000-01-01 00:00:00', interval '1.02' day_microsecond); 8889 END 8890 OUTPUT 8891 select date_add('1000-01-01 00:00:00', interval '1.02' day_microsecond) from dual 8892 END 8893 INPUT 8894 select from (select b from t1) as t1, (select b from t2) as t2 order by 1, 2; 8895 END 8896 ERROR 8897 syntax error at position 12 near 'from' 8898 END 8899 INPUT 8900 select "Test delimiter : from command line" as "_"; 8901 END 8902 OUTPUT 8903 select 'Test delimiter : from command line' as _ from dual 8904 END 8905 INPUT 8906 select length(uncompress(a)) from t1; 8907 END 8908 OUTPUT 8909 select length(uncompress(a)) from t1 8910 END 8911 INPUT 8912 select cast('1a' as signed); 8913 END 8914 OUTPUT 8915 select convert('1a', signed) from dual 8916 END 8917 INPUT 8918 select from t1 where a in ('4828532208463511553'); 8919 END 8920 ERROR 8921 syntax error at position 12 near 'from' 8922 END 8923 INPUT 8924 select column_name from information_schema.columns where table_schema='test' order by column_name; 8925 END 8926 OUTPUT 8927 select column_name from information_schema.`columns` where table_schema = 'test' order by column_name asc 8928 END 8929 INPUT 8930 select t1.name, t2.name, t2.id,t3.id from t2 right join t1 on (t1.id = t2.owner) left join t1 as t3 on t3.id=t2.owner; 8931 END 8932 OUTPUT 8933 select t1.`name`, t2.`name`, t2.id, t3.id from t2 right join t1 on t1.id = t2.owner left join t1 as t3 on t3.id = t2.owner 8934 END 8935 INPUT 8936 select mod(cast(-2 as unsigned), 3), mod(18446744073709551614, 3), mod(-2, 3); 8937 END 8938 OUTPUT 8939 select mod(convert(-2, unsigned), 3), mod(18446744073709551614, 3), mod(-2, 3) from dual 8940 END 8941 INPUT 8942 select a, a regexp '[a]' from t1 order by binary a; 8943 END 8944 OUTPUT 8945 select a, a regexp '[a]' from t1 order by binary a asc 8946 END 8947 INPUT 8948 select -1 -9223372036854775808 as result; 8949 END 8950 OUTPUT 8951 select -1 - 9223372036854775808 as result from dual 8952 END 8953 INPUT 8954 select ticket2.id FROM t2 as ttxt,t2 INNER JOIN t1 as ticket2 ON ticket2.id = t2.ticket WHERE ticket2.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar'); 8955 END 8956 OUTPUT 8957 select ticket2.id from t2 as ttxt, t2 join t1 as ticket2 on ticket2.id = t2.ticket where ticket2.id = ticket2.ticket and match(ttxt.inhalt) against ('foobar') 8958 END 8959 INPUT 8960 select utext from t1 where utext like '%%'; 8961 END 8962 OUTPUT 8963 select utext from t1 where utext like '%%' 8964 END 8965 INPUT 8966 select a1,a2,b, concat(min(c), max(c)) from t1 where a1 < 'd' group by a1,a2,b; 8967 END 8968 OUTPUT 8969 select a1, a2, b, concat(min(c), max(c)) from t1 where a1 < 'd' group by a1, a2, b 8970 END 8971 INPUT 8972 select i, length(a), length(b), char_length(a), char_length(b) from t1; 8973 END 8974 OUTPUT 8975 select i, length(a), length(b), char_length(a), char_length(b) from t1 8976 END 8977 INPUT 8978 select count(*) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3; 8979 END 8980 OUTPUT 8981 select count(*) as c from t1 where a > 0 order by c asc limit 3 8982 END 8983 INPUT 8984 select a1,a2,b,min(c),max(c) from t1 where ((c > 'b111') and (c <= 'g112')) or ((c > 'd000') and (c <= 'i110')) group by a1,a2,b; 8985 END 8986 OUTPUT 8987 select a1, a2, b, min(c), max(c) from t1 where c > 'b111' and c <= 'g112' or c > 'd000' and c <= 'i110' group by a1, a2, b 8988 END 8989 INPUT 8990 select *, uncompress(a), uncompress(a) is null from t1; 8991 END 8992 OUTPUT 8993 select *, uncompress(a), uncompress(a) is null from t1 8994 END 8995 INPUT 8996 select from bug15205; 8997 END 8998 ERROR 8999 syntax error at position 12 near 'from' 9000 END 9001 INPUT 9002 select case 1/0 when "a" then "true" END; 9003 END 9004 OUTPUT 9005 select case 1 / 0 when 'a' then 'true' end from dual 9006 END 9007 INPUT 9008 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_lithuanian_ci; 9009 END 9010 OUTPUT 9011 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_lithuanian_ci 9012 END 9013 INPUT 9014 select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1; 9015 END 9016 OUTPUT 9017 select collation(a), collation(b), collation(binary 'ccc') from t1 limit 1 9018 END 9019 INPUT 9020 select from t1 where a like "%U%"; 9021 END 9022 ERROR 9023 syntax error at position 12 near 'from' 9024 END 9025 INPUT 9026 select count(*) from t where id between 8894754949779693574 and 17790886498483827171; 9027 END 9028 OUTPUT 9029 select count(*) from t where id between 8894754949779693574 and 17790886498483827171 9030 END 9031 INPUT 9032 select substring('hello', 2, -1); 9033 END 9034 OUTPUT 9035 select substr('hello', 2, -1) from dual 9036 END 9037 INPUT 9038 select adddate("1997-12-31 23:59:59.000001", 10); 9039 END 9040 OUTPUT 9041 select adddate('1997-12-31 23:59:59.000001', 10) from dual 9042 END 9043 INPUT 9044 select date_add("1997-12-31 23:59:59",INTERVAL "1 1:1" DAY_MINUTE); 9045 END 9046 OUTPUT 9047 select date_add('1997-12-31 23:59:59', interval '1 1:1' DAY_MINUTE) from dual 9048 END 9049 INPUT 9050 select quote(''"test'); 9051 END 9052 ERROR 9053 syntax error at position 24 near 'test');' 9054 END 9055 INPUT 9056 select from t1 where a like '%PES%'; 9057 END 9058 ERROR 9059 syntax error at position 12 near 'from' 9060 END 9061 INPUT 9062 select ifnull(c1,'�'), ifnull(null,c1) from t1; 9063 END 9064 OUTPUT 9065 select ifnull(c1, '�'), ifnull(null, c1) from t1 9066 END 9067 INPUT 9068 select 0<=>0,0.0<=>0.0,0E0=0E0,"A"<=>"A",NULL<=>NULL; 9069 END 9070 OUTPUT 9071 select 0 <=> 0, 0.0 <=> 0.0, 0E0 = 0E0, 'A' <=> 'A', null <=> null from dual 9072 END 9073 INPUT 9074 select st_intersects(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 9075 END 9076 OUTPUT 9077 select st_intersects(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 9078 END 9079 INPUT 9080 select t1.* as 'with_alias', (select a from t2 where d > a) as 'x' from t1; 9081 END 9082 ERROR 9083 syntax error at position 15 near 'as' 9084 END 9085 INPUT 9086 select CASE concat("a","b") when concat("ab","") then "a" when "b" then "b" end; 9087 END 9088 OUTPUT 9089 select case concat('a', 'b') when concat('ab', '') then 'a' when 'b' then 'b' end from dual 9090 END 9091 INPUT 9092 select 1+1, "a",count(*) from t1 where foo in (2); 9093 END 9094 OUTPUT 9095 select 1 + 1, 'a', count(*) from t1 where foo in (2) 9096 END 9097 INPUT 9098 select make_set(3, name, upper(name)) from bug20536; 9099 END 9100 OUTPUT 9101 select make_set(3, `name`, upper(`name`)) from bug20536 9102 END 9103 INPUT 9104 select count(*),b from t1; 9105 END 9106 OUTPUT 9107 select count(*), b from t1 9108 END 9109 INPUT 9110 select distinct s from t1; 9111 END 9112 OUTPUT 9113 select distinct s from t1 9114 END 9115 INPUT 9116 select a1,a2,b,min(c) from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; 9117 END 9118 OUTPUT 9119 select a1, a2, b, min(c) from t2 where a1 > 'a' and a2 > 'a' and b = 'c' group by a1, a2, b 9120 END 9121 INPUT 9122 select var_samp(e), var_pop(e) from bug22555; 9123 END 9124 OUTPUT 9125 select var_samp(e), var_pop(e) from bug22555 9126 END 9127 INPUT 9128 select collation(left(_latin2'a',1)), coercibility(left(_latin2'a',1)); 9129 END 9130 OUTPUT 9131 select collation(left(_latin2 'a', 1)), coercibility(left(_latin2 'a', 1)) from dual 9132 END 9133 INPUT 9134 select @tlwa < @tlwb; 9135 END 9136 OUTPUT 9137 select @tlwa < @tlwb from dual 9138 END 9139 INPUT 9140 select hex(weight_string(cast(0xE0A1 as char) as char(1))); 9141 END 9142 ERROR 9143 syntax error at position 55 9144 END 9145 INPUT 9146 select group_concat(bar order by concat(bar,bar) desc) from t1; 9147 END 9148 OUTPUT 9149 select group_concat(bar order by concat(bar, bar) desc) from t1 9150 END 9151 INPUT 9152 select CAST('10x' as unsigned integer); 9153 END 9154 OUTPUT 9155 select convert('10x', unsigned) from dual 9156 END 9157 INPUT 9158 select subtime("1997-12-31 23:59:59.999999", "1998-01-01 01:01:01.999999"); 9159 END 9160 OUTPUT 9161 select subtime('1997-12-31 23:59:59.999999', '1998-01-01 01:01:01.999999') from dual 9162 END 9163 INPUT 9164 select CASE 1 when 1 then "one" WHEN 2 then "two" ELSE "more" END; 9165 END 9166 OUTPUT 9167 select case 1 when 1 then 'one' when 2 then 'two' else 'more' end from dual 9168 END 9169 INPUT 9170 select from (t1 join t2 using (b)) join (t3 join t4 using (c)) using (c); 9171 END 9172 ERROR 9173 syntax error at position 12 near 'from' 9174 END 9175 INPUT 9176 select min(7) from t1i; 9177 END 9178 OUTPUT 9179 select min(7) from t1i 9180 END 9181 INPUT 9182 select locate(_utf8 0xD0B1, _utf8 0xD0B0D0B1D0B2); 9183 END 9184 OUTPUT 9185 select locate(_utf8 0xD0B1, _utf8 0xD0B0D0B1D0B2) from dual 9186 END 9187 INPUT 9188 select from t1 where b like 'foob%'; 9189 END 9190 ERROR 9191 syntax error at position 12 near 'from' 9192 END 9193 INPUT 9194 select convert(_latin1'G�nter Andr�' using utf8mb4) like CONVERT(_latin1'G�NTER%' USING utf8mb4); 9195 END 9196 OUTPUT 9197 select convert(_latin1 'G�nter Andr�' using utf8mb4) like convert(_latin1 'G�NTER%' using utf8mb4) from dual 9198 END 9199 INPUT 9200 select 1, min(a) from t1m where 1=99; 9201 END 9202 OUTPUT 9203 select 1, min(a) from t1m where 1 = 99 9204 END 9205 INPUT 9206 select a1,a2,b,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1; 9207 END 9208 OUTPUT 9209 select a1, a2, b, max(c), min(c) from t1 where a2 = 'a' and b = 'b' group by a1 9210 END 9211 INPUT 9212 select @stamp1:=f2 from t1; 9213 END 9214 ERROR 9215 syntax error at position 16 near ':' 9216 END 9217 INPUT 9218 select t1.*,t2.* from mysqltest_2.t1,mysqltest_2.t2; 9219 END 9220 OUTPUT 9221 select t1.*, t2.* from mysqltest_2.t1, mysqltest_2.t2 9222 END 9223 INPUT 9224 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_spanish2_ci; 9225 END 9226 OUTPUT 9227 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_spanish2_ci 9228 END 9229 INPUT 9230 select date_add("1997-12-31 23:59:59",INTERVAL "-10000:1" HOUR_MINUTE); 9231 END 9232 OUTPUT 9233 select date_add('1997-12-31 23:59:59', interval '-10000:1' HOUR_MINUTE) from dual 9234 END 9235 INPUT 9236 select mod(12.0, 0) as 'NULL'; 9237 END 9238 OUTPUT 9239 select mod(12.0, 0) as `NULL` from dual 9240 END 9241 INPUT 9242 select from t1 where str <> default(str); 9243 END 9244 ERROR 9245 syntax error at position 12 near 'from' 9246 END 9247 INPUT 9248 select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysql' AND TABLE_NAME='nonexisting'; 9249 END 9250 OUTPUT 9251 select count(*) from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = 'mysql' and TABLE_NAME = 'nonexisting' 9252 END 9253 INPUT 9254 select (12%0) <=> null as '1'; 9255 END 9256 OUTPUT 9257 select 12 % 0 <=> null as `1` from dual 9258 END 9259 INPUT 9260 select @@local.profiling; 9261 END 9262 OUTPUT 9263 select @@local.profiling from dual 9264 END 9265 INPUT 9266 select 5.0 div 2; 9267 END 9268 OUTPUT 9269 select 5.0 div 2 from dual 9270 END 9271 INPUT 9272 select group_concat( distinct col1 ) as alias from t1 group by col2 having alias like '%'; 9273 END 9274 OUTPUT 9275 select group_concat(distinct col1) as alias from t1 group by col2 having alias like '%' 9276 END 9277 INPUT 9278 select strcmp('ss','�a'),strcmp('�','ssa'),strcmp('s�a','sssb'),strcmp('s','�'); 9279 END 9280 OUTPUT 9281 select strcmp('ss', '�a'), strcmp('�', 'ssa'), strcmp('s�a', 'sssb'), strcmp('s', '�') from dual 9282 END 9283 INPUT 9284 select coercibility(max(a)) from t1; 9285 END 9286 OUTPUT 9287 select coercibility(max(a)) from t1 9288 END 9289 INPUT 9290 select sysdate() into @b; 9291 END 9292 ERROR 9293 syntax error at position 25 near 'b' 9294 END 9295 INPUT 9296 select inet_ntoa(null),inet_aton(null); 9297 END 9298 OUTPUT 9299 select inet_ntoa(null), inet_aton(null) from dual 9300 END 9301 INPUT 9302 select hex(@utf82); 9303 END 9304 OUTPUT 9305 select hex(@utf82) from dual 9306 END 9307 INPUT 9308 select subtime("1997-12-31 23:59:59.000001", "1 1:1:1.000002"); 9309 END 9310 OUTPUT 9311 select subtime('1997-12-31 23:59:59.000001', '1 1:1:1.000002') from dual 9312 END 9313 INPUT 9314 select count(*) as count_col1 from t1 as tmp1 group by col1 having col1 = 10; 9315 END 9316 OUTPUT 9317 select count(*) as count_col1 from t1 as tmp1 group by col1 having col1 = 10 9318 END 9319 INPUT 9320 select ST_AsText(a) from (select f2 as a from t1 union select f3 from t1) t; 9321 END 9322 OUTPUT 9323 select ST_AsText(a) from (select f2 as a from t1 union select f3 from t1) as t 9324 END 9325 INPUT 9326 select host,db,user,table_name from mysql.tables_priv where user = 'mysqltest_1' order by host,db,user,table_name; 9327 END 9328 OUTPUT 9329 select host, db, `user`, table_name from mysql.tables_priv where `user` = 'mysqltest_1' order by host asc, db asc, `user` asc, table_name asc 9330 END 9331 INPUT 9332 select from v1a join (t3 natural join t4) on a = y; 9333 END 9334 ERROR 9335 syntax error at position 12 near 'from' 9336 END 9337 INPUT 9338 select a1,a2,b,max(c),min(c) from t1 group by a1,a2,b; 9339 END 9340 OUTPUT 9341 select a1, a2, b, max(c), min(c) from t1 group by a1, a2, b 9342 END 9343 INPUT 9344 select from information_schema.column_privileges where grantee like '%user%' order by grantee; 9345 END 9346 ERROR 9347 syntax error at position 12 near 'from' 9348 END 9349 INPUT 9350 select distinct s,t from t1; 9351 END 9352 OUTPUT 9353 select distinct s, t from t1 9354 END 9355 INPUT 9356 select from (select from t1 union all select from t1 limit 2) a; 9357 END 9358 ERROR 9359 syntax error at position 12 near 'from' 9360 END 9361 INPUT 9362 select CAST(0x8fffffffffffffff as signed); 9363 END 9364 OUTPUT 9365 select convert(0x8fffffffffffffff, signed) from dual 9366 END 9367 INPUT 9368 select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b; 9369 END 9370 OUTPUT 9371 select a1, a2, b, min(c) from t1 where (a1 > 'a' or a1 < '9') and (a2 >= 'b' and a2 < 'z') and b = 'a' and (c = 'j121' or c > 'k121' and c < 'm122' or c > 'o122' or c < 'h112' or c = 'c111') group by a1, a2, b 9372 END 9373 INPUT 9374 select count(distinct n1) from t1; 9375 END 9376 OUTPUT 9377 select count(distinct n1) from t1 9378 END 9379 INPUT 9380 select strcmp('u','�a'),strcmp('u','�'); 9381 END 9382 OUTPUT 9383 select strcmp('u', '�a'), strcmp('u', '�') from dual 9384 END 9385 INPUT 9386 select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin); 9387 END 9388 OUTPUT 9389 select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2 collate utf8mb4_bin) from dual 9390 END 9391 INPUT 9392 select lpad('hello', -4294967297, '1'); 9393 END 9394 OUTPUT 9395 select lpad('hello', -4294967297, '1') from dual 9396 END 9397 INPUT 9398 select st_astext(st_union(cast(point(1,1)as char(15)),point(1,1))) as res; 9399 END 9400 OUTPUT 9401 select st_astext(st_union(convert(point(1, 1), char(15)), point(1, 1))) as res from dual 9402 END 9403 INPUT 9404 select cast('' as signed); 9405 END 9406 OUTPUT 9407 select convert('', signed) from dual 9408 END 9409 INPUT 9410 select hex(substr(_ucs2 0x00e400e50068,-1)); 9411 END 9412 OUTPUT 9413 select hex(substr(_ucs2 0x00e400e50068, -1)) from dual 9414 END 9415 INPUT 9416 select convert(_latin1'G�nter Andr�' using utf8) like CONVERT(_latin1'G�NTER%' USING utf8); 9417 END 9418 OUTPUT 9419 select convert(_latin1 'G�nter Andr�' using utf8) like convert(_latin1 'G�NTER%' using utf8) from dual 9420 END 9421 INPUT 9422 select ST_AsText(ST_GeometryFromWKB(ST_AsWKB(GeometryCollection(POINT(0, 0), MULTIPOINT(point(0, 0), point(1, 1)), LINESTRING(point(0, 0),point(10, 10)), MULTILINESTRING(LINESTRING(point(1, 2), point(1, 3))), POLYGON(LineString(Point(10, 20), Point(1, 1), Point(2, 2), Point(1, 1), Point(10, 20))), MULTIPOLYGON(Polygon(LineString(Point(0, 0), Point(1, 0), Point(1, 1), Point(0, 0)))))))) as Result; 9423 END 9424 OUTPUT 9425 select ST_AsText(ST_GeometryFromWKB(ST_AsWKB(GeometryCollection(POINT(0, 0), MULTIPOINT(point(0, 0), point(1, 1)), LINESTRING(point(0, 0), point(10, 10)), MULTILINESTRING(LINESTRING(point(1, 2), point(1, 3))), POLYGON(LineString(Point(10, 20), Point(1, 1), Point(2, 2), Point(1, 1), Point(10, 20))), MULTIPOLYGON(Polygon(LineString(Point(0, 0), Point(1, 0), Point(1, 1), Point(0, 0)))))))) as Result from dual 9426 END 9427 INPUT 9428 select s1*0 as s1 from t1 group by s1 having s1 <> 0; 9429 END 9430 OUTPUT 9431 select s1 * 0 as s1 from t1 group by s1 having s1 != 0 9432 END 9433 INPUT 9434 select from (t3 natural join t4) natural right join (t1 natural join t2) where b + 1 = y or b + 10 = y group by b,c,a,y having min(b) < max(y) order by a, y; 9435 END 9436 ERROR 9437 syntax error at position 12 near 'from' 9438 END 9439 INPUT 9440 select st_distance_sphere(st_geomfromtext('point(-120 45)'), st_geomfromtext('point(30.24 68.37)')); 9441 END 9442 OUTPUT 9443 select st_distance_sphere(st_geomfromtext('point(-120 45)'), st_geomfromtext('point(30.24 68.37)')) from dual 9444 END 9445 INPUT 9446 select group_concat(distinct s1 order by s2) from t1; 9447 END 9448 OUTPUT 9449 select group_concat(distinct s1 order by s2 asc) from t1 9450 END 9451 INPUT 9452 select a from t2 group by a order by (select a from t1 order by t2.b limit 1); 9453 END 9454 OUTPUT 9455 select a from t2 group by a order by (select a from t1 order by t2.b asc limit 1) asc 9456 END 9457 INPUT 9458 select t1.*,t2.* from t1 left join t2 using (a); 9459 END 9460 OUTPUT 9461 select t1.*, t2.* from t1 left join t2 using (a) 9462 END 9463 INPUT 9464 select from t1, t2 where t1.value64=17156792991891826145 and t2.value64=17156792991891826145; 9465 END 9466 ERROR 9467 syntax error at position 12 near 'from' 9468 END 9469 INPUT 9470 select t from t1 where t='tttt'; 9471 END 9472 OUTPUT 9473 select t from t1 where t = 'tttt' 9474 END 9475 INPUT 9476 select from t3 where x = 1 and y < 5 order by y; 9477 END 9478 ERROR 9479 syntax error at position 12 near 'from' 9480 END 9481 INPUT 9482 select rpad(741653838,17,'0'),lpad(741653838,17,'0'); 9483 END 9484 OUTPUT 9485 select rpad(741653838, 17, '0'), lpad(741653838, 17, '0') from dual 9486 END 9487 INPUT 9488 select count(test.t1.b) from t1; 9489 END 9490 OUTPUT 9491 select count(test.t1.b) from t1 9492 END 9493 INPUT 9494 select st_difference((convert(st_polygonfromwkb(linestring(point(1,1))) using gb18030)), st_geomcollfromwkb(point(1,1))); 9495 END 9496 OUTPUT 9497 select st_difference(convert(st_polygonfromwkb(linestring(point(1, 1))) using gb18030), st_geomcollfromwkb(point(1, 1))) from dual 9498 END 9499 INPUT 9500 select convert(_koi8r'�' using utf8mb4) < convert(_koi8r'�' using utf8mb4); 9501 END 9502 OUTPUT 9503 select convert(_koi8r '�' using utf8mb4) < convert(_koi8r '�' using utf8mb4) from dual 9504 END 9505 INPUT 9506 select from t4; 9507 END 9508 ERROR 9509 syntax error at position 12 near 'from' 9510 END 9511 INPUT 9512 select ST_DISTANCE(ST_GeomFromText('polygon((0 0, 3 6, 6 3, 0 0))'), ST_GeomFromText('polygon((2 2, 3 4, 4 3, 2 2))')); 9513 END 9514 OUTPUT 9515 select ST_DISTANCE(ST_GeomFromText('polygon((0 0, 3 6, 6 3, 0 0))'), ST_GeomFromText('polygon((2 2, 3 4, 4 3, 2 2))')) from dual 9516 END 9517 INPUT 9518 select (with recursive dt as (select t1.a as a union select a+1 from dt where a<10) select concat(count(*), ' - ', avg(dt.a)) from dt ) as subq from t1; 9519 END 9520 OUTPUT 9521 select (with recursive dt as (select t1.a as a from dual union select a + 1 from dt where a < 10) select concat(count(*), ' - ', avg(dt.a)) from dt) as subq from t1 9522 END 9523 INPUT 9524 select from t1 natural left join (t4 natural join t5) where t5.z is not NULL; 9525 END 9526 ERROR 9527 syntax error at position 12 near 'from' 9528 END 9529 INPUT 9530 select distinct a1,a2,b from t2 where (a2 >= 'b') and (b = 'a'); 9531 END 9532 OUTPUT 9533 select distinct a1, a2, b from t2 where a2 >= 'b' and b = 'a' 9534 END 9535 INPUT 9536 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_unicode_520_ci; 9537 END 9538 OUTPUT 9539 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_unicode_520_ci 9540 END 9541 INPUT 9542 select c as c_a from t1 where c='ñ'; 9543 END 9544 OUTPUT 9545 select c as c_a from t1 where c = 'ñ' 9546 END 9547 INPUT 9548 select from t1 where text1='teststring' or text1 >= 'teststring '; 9549 END 9550 ERROR 9551 syntax error at position 12 near 'from' 9552 END 9553 INPUT 9554 select mbrwithin(ST_GeomFromText("point(2 4)"), ST_GeomFromText("linestring(2 0, 2 4)")); 9555 END 9556 OUTPUT 9557 select mbrwithin(ST_GeomFromText('point(2 4)'), ST_GeomFromText('linestring(2 0, 2 4)')) from dual 9558 END 9559 INPUT 9560 select ST_astext(st_symdifference(ST_GeomFromText('multipoint(2 2, 3 3)'), ST_GeomFromText('multipoint(0 0, 4 4)'))); 9561 END 9562 OUTPUT 9563 select ST_astext(st_symdifference(ST_GeomFromText('multipoint(2 2, 3 3)'), ST_GeomFromText('multipoint(0 0, 4 4)'))) from dual 9564 END 9565 INPUT 9566 select count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1; 9567 END 9568 OUTPUT 9569 select count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 9570 END 9571 INPUT 9572 select format(a, 2) from t1; 9573 END 9574 OUTPUT 9575 select format(a, 2) from t1 9576 END 9577 INPUT 9578 select strcmp(current_timestamp(),concat(current_date()," ",current_time())); 9579 END 9580 OUTPUT 9581 select strcmp(current_timestamp(), concat(current_date(), ' ', current_time())) from dual 9582 END 9583 INPUT 9584 select hex(ujis), hex(ucs2), hex(ujis2), name from t1 where ujis=ujis2 order by ujis; 9585 END 9586 OUTPUT 9587 select hex(ujis), hex(ucs2), hex(ujis2), `name` from t1 where ujis = ujis2 order by ujis asc 9588 END 9589 INPUT 9590 select hex(substr(_ucs2 0x00e400e50068,3)); 9591 END 9592 OUTPUT 9593 select hex(substr(_ucs2 0x00e400e50068, 3)) from dual 9594 END 9595 INPUT 9596 select char(0xd18f using utf8); 9597 END 9598 ERROR 9599 syntax error at position 25 near 'using' 9600 END 9601 INPUT 9602 select count(*) + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ from t1 group by MAX_REQ; 9603 END 9604 OUTPUT 9605 select count(*) + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ from t1 group by MAX_REQ 9606 END 9607 INPUT 9608 select (_utf8mb4 X'616263FF'); 9609 END 9610 OUTPUT 9611 select _utf8mb4 X'616263FF' from dual 9612 END 9613 INPUT 9614 select unix_timestamp('1970-01-01 03:00:01'); 9615 END 9616 OUTPUT 9617 select unix_timestamp('1970-01-01 03:00:01') from dual 9618 END 9619 INPUT 9620 select from v; 9621 END 9622 ERROR 9623 syntax error at position 12 near 'from' 9624 END 9625 INPUT 9626 select hex(soundex(_utf16 0x00BF00C0)); 9627 END 9628 OUTPUT 9629 select hex(soundex(_utf16 0x00BF00C0)) from dual 9630 END 9631 INPUT 9632 select timestampdiff(month,'2003-02-28','2004-02-29'); 9633 END 9634 OUTPUT 9635 select timestampdiff(month, '2003-02-28', '2004-02-29') from dual 9636 END 9637 INPUT 9638 select hex(weight_string('a' as char(-1))); 9639 END 9640 ERROR 9641 syntax error at position 38 9642 END 9643 INPUT 9644 select count(*) from t3 /bin /boot /cdrom /dev /etc /home /lib /lib32 /lib64 /libx32 /lost+found /media /mnt /opt /proc /root /run /sbin /snap /srv /swapfile /sys /tmp /usr /var must be 2 */; 9645 END 9646 ERROR 9647 syntax error at position 26 9648 END 9649 INPUT 9650 select count(*) from t1 where facility IS NOT NULL; 9651 END 9652 OUTPUT 9653 select count(*) from t1 where facility is not null 9654 END 9655 INPUT 9656 select from (t1, t2) join (t3, t4) on (a < y and t2.b < t3.c); 9657 END 9658 ERROR 9659 syntax error at position 12 near 'from' 9660 END 9661 INPUT 9662 select name from t1 where name between '�' and '�'; 9663 END 9664 OUTPUT 9665 select `name` from t1 where `name` between '�' and '�' 9666 END 9667 INPUT 9668 select from t1 where i = 1; 9669 END 9670 ERROR 9671 syntax error at position 12 near 'from' 9672 END 9673 INPUT 9674 select POSITION(_latin1'B' IN _latin1'abcd'); 9675 END 9676 ERROR 9677 syntax error at position 38 near '_latin1' 9678 END 9679 INPUT 9680 select from t1 where MATCH b AGAINST ("sear*" IN BOOLEAN MODE); 9681 END 9682 ERROR 9683 syntax error at position 12 near 'from' 9684 END 9685 INPUT 9686 select b from v1 vq1, lateral (select count(*) from v1 vq2 having vq1.b = 3) dt; 9687 END 9688 ERROR 9689 syntax error at position 32 9690 END 9691 INPUT 9692 select from t1 where not a between 2 and 3; 9693 END 9694 ERROR 9695 syntax error at position 12 near 'from' 9696 END 9697 INPUT 9698 select hex(char(0x010203 using ucs2)); 9699 END 9700 ERROR 9701 syntax error at position 31 near 'using' 9702 END 9703 INPUT 9704 select ST_astext(st_difference(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_difference(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); 9705 END 9706 OUTPUT 9707 select ST_astext(st_difference(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_difference(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual 9708 END 9709 INPUT 9710 select from information_schema.user_privileges where grantee like "'mysqltest_8'%"; 9711 END 9712 ERROR 9713 syntax error at position 12 near 'from' 9714 END 9715 INPUT 9716 select a.ROUTINE_NAME from information_schema.ROUTINES a, information_schema.SCHEMATA b where a.ROUTINE_SCHEMA = b.SCHEMA_NAME AND b.SCHEMA_NAME='test' ORDER BY a.ROUTINE_NAME; 9717 END 9718 OUTPUT 9719 select a.ROUTINE_NAME from information_schema.ROUTINES as a, information_schema.SCHEMATA as b where a.ROUTINE_SCHEMA = b.SCHEMA_NAME and b.SCHEMA_NAME = 'test' order by a.ROUTINE_NAME asc 9720 END 9721 INPUT 9722 select date_format(concat('19980131',131415),'%H|%I|%k|%l|%i|%p|%r|%S|%T| %M|%W|%D|%Y|%y|%a|%b|%j|%m|%d|%h|%s|%w'); 9723 END 9724 OUTPUT 9725 select date_format(concat('19980131', 131415), '%H|%I|%k|%l|%i|%p|%r|%S|%T| %M|%W|%D|%Y|%y|%a|%b|%j|%m|%d|%h|%s|%w') from dual 9726 END 9727 INPUT 9728 select round(1.5, 2147483640), truncate(1.5, 2147483640); 9729 END 9730 OUTPUT 9731 select round(1.5, 2147483640), truncate(1.5, 2147483640) from dual 9732 END 9733 INPUT 9734 select count(*) from t2 where id2 > 90; 9735 END 9736 OUTPUT 9737 select count(*) from t2 where id2 > 90 9738 END 9739 INPUT 9740 select from non_qualif; 9741 END 9742 ERROR 9743 syntax error at position 12 near 'from' 9744 END 9745 INPUT 9746 select _koi8r'a' COLLATE koi8r_general_ci LIKE _koi8r'A' COLLATE koi8r_bin; 9747 END 9748 OUTPUT 9749 select _koi8r 'a' collate koi8r_general_ci like _koi8r 'A' collate koi8r_bin from dual 9750 END 9751 INPUT 9752 select from renamed_general_log; 9753 END 9754 ERROR 9755 syntax error at position 12 near 'from' 9756 END 9757 INPUT 9758 select 1, 1.0, -1, "hello", NULL; 9759 END 9760 OUTPUT 9761 select 1, 1.0, -1, 'hello', null from dual 9762 END 9763 INPUT 9764 select min(a3) from t1 where 2 = a2; 9765 END 9766 OUTPUT 9767 select min(a3) from t1 where 2 = a2 9768 END 9769 INPUT 9770 select from t1 where not(a is not null); 9771 END 9772 ERROR 9773 syntax error at position 12 near 'from' 9774 END 9775 INPUT 9776 select format(pi(), (select 3 from dual)); 9777 END 9778 OUTPUT 9779 select format(pi(), (select 3 from dual)) from dual 9780 END 9781 INPUT 9782 select i, count(*), variance(o1/o2) from bug22555 group by i order by i; 9783 END 9784 OUTPUT 9785 select i, count(*), variance(o1 / o2) from bug22555 group by i order by i asc 9786 END 9787 INPUT 9788 select count(*) as count_col1 from t1 group by col1 having col1 = 10; 9789 END 9790 OUTPUT 9791 select count(*) as count_col1 from t1 group by col1 having col1 = 10 9792 END 9793 INPUT 9794 select from `information_schema`.`STATISTICS` where `TABLE_SCHEMA` = NULL; 9795 END 9796 ERROR 9797 syntax error at position 12 near 'from' 9798 END 9799 INPUT 9800 select table_name, auto_increment from information_schema.tables where table_schema = 'test' and table_name in ('t1', 't2'); 9801 END 9802 OUTPUT 9803 select table_name, `auto_increment` from information_schema.`tables` where table_schema = 'test' and table_name in ('t1', 't2') 9804 END 9805 INPUT 9806 select from t1 where uncompress(a) is null; 9807 END 9808 ERROR 9809 syntax error at position 12 near 'from' 9810 END 9811 INPUT 9812 select row('A','b','c') = row('a','b','c'); 9813 END 9814 OUTPUT 9815 select row('A', 'b', 'c') = row('a', 'b', 'c') from dual 9816 END 9817 INPUT 9818 select count(bags.a) from t1 as Bags; 9819 END 9820 OUTPUT 9821 select count(bags.a) from t1 as Bags 9822 END 9823 INPUT 9824 select repeat('hello', -4294967296); 9825 END 9826 OUTPUT 9827 select repeat('hello', -4294967296) from dual 9828 END 9829 INPUT 9830 select '^^: The above should be ~= 8 + cost(select from t1). Value less than 8 is an error' Z; 9831 END 9832 OUTPUT 9833 select '^^: The above should be ~= 8 + cost(select from t1). Value less than 8 is an error' as Z from dual 9834 END 9835 INPUT 9836 select truncate(cast(-2 as unsigned), 1), truncate(18446744073709551614, 1), truncate(-2, 1); 9837 END 9838 OUTPUT 9839 select truncate(convert(-2, unsigned), 1), truncate(18446744073709551614, 1), truncate(-2, 1) from dual 9840 END 9841 INPUT 9842 select insert('hello', -4294967296, 1, 'hi'); 9843 END 9844 ERROR 9845 syntax error at position 14 near 'insert' 9846 END 9847 INPUT 9848 select from t1 natural join t2 natural join t3 natural join t4; 9849 END 9850 ERROR 9851 syntax error at position 12 near 'from' 9852 END 9853 INPUT 9854 select a1,a2,b, max(c) from t2 where a1 < 'd' group by a1,a2,b; 9855 END 9856 OUTPUT 9857 select a1, a2, b, max(c) from t2 where a1 < 'd' group by a1, a2, b 9858 END 9859 INPUT 9860 select from t2; 9861 END 9862 ERROR 9863 syntax error at position 12 near 'from' 9864 END 9865 INPUT 9866 select truncate(4, cast(-2 as unsigned)), truncate(4, 18446744073709551614), truncate(4, -2); 9867 END 9868 OUTPUT 9869 select truncate(4, convert(-2, unsigned)), truncate(4, 18446744073709551614), truncate(4, -2) from dual 9870 END 9871 INPUT 9872 select timestampdiff(year,'2004-02-29','2005-02-28'); 9873 END 9874 OUTPUT 9875 select timestampdiff(year, '2004-02-29', '2005-02-28') from dual 9876 END 9877 INPUT 9878 select from t1 where tt like 'Aa%'; 9879 END 9880 ERROR 9881 syntax error at position 12 near 'from' 9882 END 9883 INPUT 9884 select _koi8r'a' COLLATE koi8r_general_ci LIKE _koi8r'A'; 9885 END 9886 OUTPUT 9887 select _koi8r 'a' collate koi8r_general_ci like _koi8r 'A' from dual 9888 END 9889 INPUT 9890 select hex(l), hex(r) from t1; 9891 END 9892 OUTPUT 9893 select hex(l), hex(r) from t1 9894 END 9895 INPUT 9896 select length(repeat("a",1000000)),length(concat(repeat("a",32000),repeat("a",32000),repeat("a",32000))),length(replace("aaaaa","a",concat(repeat("a",32000)))),length(insert(repeat("a",48000),1,1000,repeat("a",48000))); 9897 END 9898 ERROR 9899 syntax error at position 174 near 'insert' 9900 END 9901 INPUT 9902 select a1,a2,b,min(c),max(c) from t2 where (a2 >= 'b') and (b = 'a') and (c > 'b111') group by a1,a2,b; 9903 END 9904 OUTPUT 9905 select a1, a2, b, min(c), max(c) from t2 where a2 >= 'b' and b = 'a' and c > 'b111' group by a1, a2, b 9906 END 9907 INPUT 9908 select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a; 9909 END 9910 OUTPUT 9911 select t1.*, t2.* from t1, t1 as t2 where t1.A = t2.B order by binary t1.a asc, t2.a asc 9912 END 9913 INPUT 9914 select from information_schema.parameters where specific_schema='test'; 9915 END 9916 ERROR 9917 syntax error at position 12 near 'from' 9918 END 9919 INPUT 9920 select from t1 where firstname='john' and firstname like binary 'john'; 9921 END 9922 ERROR 9923 syntax error at position 12 near 'from' 9924 END 9925 INPUT 9926 select 2 between null and 1,2 between 3 AND NULL,NULL between 1 and 2,2 between NULL and 3, 2 between 1 AND null; 9927 END 9928 OUTPUT 9929 select 2 between null and 1, 2 between 3 and null, null between 1 and 2, 2 between null and 3, 2 between 1 and null from dual 9930 END 9931 INPUT 9932 select text1, length(text1) from t1 order by binary text1; 9933 END 9934 OUTPUT 9935 select text1, length(text1) from t1 order by binary text1 asc 9936 END 9937 INPUT 9938 select from t2 having MATCH inhalt AGAINST ('foobar'); 9939 END 9940 ERROR 9941 syntax error at position 12 near 'from' 9942 END 9943 INPUT 9944 select 0, ST_Within(ST_GeomFromText('LINESTRING(15 15, 50 50, 60 60)'), ST_GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))')); 9945 END 9946 OUTPUT 9947 select 0, ST_Within(ST_GeomFromText('LINESTRING(15 15, 50 50, 60 60)'), ST_GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))')) from dual 9948 END 9949 INPUT 9950 select a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a); 9951 END 9952 OUTPUT 9953 select a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a) 9954 END 9955 INPUT 9956 select upper(a),upper(b) from t1; 9957 END 9958 OUTPUT 9959 select upper(a), upper(b) from t1 9960 END 9961 INPUT 9962 select DATE_ADD('20071108181000', INTERVAL 1 DAY); 9963 END 9964 OUTPUT 9965 select DATE_ADD('20071108181000', interval 1 DAY) from dual 9966 END 9967 INPUT 9968 select sha('abc'); 9969 END 9970 OUTPUT 9971 select sha('abc') from dual 9972 END 9973 INPUT 9974 select st_overlaps(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))')); 9975 END 9976 OUTPUT 9977 select st_overlaps(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))')) from dual 9978 END 9979 INPUT 9980 select 1, min(1) from t1i where 1=99; 9981 END 9982 OUTPUT 9983 select 1, min(1) from t1i where 1 = 99 9984 END 9985 INPUT 9986 select left(1234, 3) + 0; 9987 END 9988 OUTPUT 9989 select left(1234, 3) + 0 from dual 9990 END 9991 INPUT 9992 select 'b' between 'a' and 'c', 'B' between 'a' and 'c'; 9993 END 9994 OUTPUT 9995 select 'b' between 'a' and 'c', 'B' between 'a' and 'c' from dual 9996 END 9997 INPUT 9998 select concat(a,if(b<10,_ucs2 0x0061,_ucs2 0x0062)) from t1; 9999 END 10000 OUTPUT 10001 select concat(a, if(b < 10, _ucs2 0x0061, _ucs2 0x0062)) from t1 10002 END 10003 INPUT 10004 select from t1 order by name; 10005 END 10006 ERROR 10007 syntax error at position 12 near 'from' 10008 END 10009 INPUT 10010 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_croatian_ci; 10011 END 10012 OUTPUT 10013 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_croatian_ci 10014 END 10015 INPUT 10016 select grp,group_concat(c order by c separator ",") from t1 group by grp; 10017 END 10018 OUTPUT 10019 select grp, group_concat(c order by c asc separator ',') from t1 group by grp 10020 END 10021 INPUT 10022 select std(o) from bug22555 group by i; 10023 END 10024 OUTPUT 10025 select std(o) from bug22555 group by i 10026 END 10027 INPUT 10028 select right('hello', 18446744073709551615); 10029 END 10030 OUTPUT 10031 select right('hello', 18446744073709551615) from dual 10032 END 10033 INPUT 10034 select create_options from information_schema.tables where table_schema="test"; 10035 END 10036 OUTPUT 10037 select create_options from information_schema.`tables` where table_schema = 'test' 10038 END 10039 INPUT 10040 select concat(a,'.') from t1 where a='a '; 10041 END 10042 OUTPUT 10043 select concat(a, '.') from t1 where a = 'a ' 10044 END 10045 INPUT 10046 select concat('|', text1, '|') from t1 order by text1; 10047 END 10048 OUTPUT 10049 select concat('|', text1, '|') from t1 order by text1 asc 10050 END 10051 INPUT 10052 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_lithuanian_ci; 10053 END 10054 OUTPUT 10055 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_lithuanian_ci 10056 END 10057 INPUT 10058 select t2 from t2; 10059 END 10060 OUTPUT 10061 select t2 from t2 10062 END 10063 INPUT 10064 select md5('hello'); 10065 END 10066 OUTPUT 10067 select md5('hello') from dual 10068 END 10069 INPUT 10070 select "Test delimiter :; 10071 END 10072 ERROR 10073 syntax error at position 26 near 'Test delimiter :;' 10074 END 10075 INPUT 10076 select space(-4294967297); 10077 END 10078 OUTPUT 10079 select space(-4294967297) from dual 10080 END 10081 INPUT 10082 select from t1 where MATCH(a,b) AGAINST ("indexes" IN NATURAL LANGUAGE MODE WITH QUERY EXPANSION); 10083 END 10084 ERROR 10085 syntax error at position 12 near 'from' 10086 END 10087 INPUT 10088 select hex(substr(_ucs2 0x00e400e50068,-2)); 10089 END 10090 OUTPUT 10091 select hex(substr(_ucs2 0x00e400e50068, -2)) from dual 10092 END 10093 INPUT 10094 select count(*) from t1 where v='a '; 10095 END 10096 OUTPUT 10097 select count(*) from t1 where v = 'a ' 10098 END 10099 INPUT 10100 select 1, ST_Intersects(ST_GeomFromText('LINESTRING(15 15, 50 50)'), ST_GeomFromText('LINESTRING(50 15, 15 50)')); 10101 END 10102 OUTPUT 10103 select 1, ST_Intersects(ST_GeomFromText('LINESTRING(15 15, 50 50)'), ST_GeomFromText('LINESTRING(50 15, 15 50)')) from dual 10104 END 10105 INPUT 10106 select UNIQUE_CONSTRAINT_NAME from information_schema.referential_constraints where constraint_schema = schema(); 10107 END 10108 OUTPUT 10109 select UNIQUE_CONSTRAINT_NAME from information_schema.referential_constraints where constraint_schema = schema() 10110 END 10111 INPUT 10112 select 1e8 sum(distinct df) from t1; 10113 END 10114 ERROR 10115 syntax error at position 16 10116 END 10117 INPUT 10118 select from t1 where soundex(a) = soundex('Test'); 10119 END 10120 ERROR 10121 syntax error at position 12 near 'from' 10122 END 10123 INPUT 10124 select count(*) from t1 where c like 'a%'; 10125 END 10126 OUTPUT 10127 select count(*) from t1 where c like 'a%' 10128 END 10129 INPUT 10130 select c cb20 from t1 where c=repeat('b',20); 10131 END 10132 OUTPUT 10133 select c as cb20 from t1 where c = repeat('b', 20) 10134 END 10135 INPUT 10136 select min(name),min(concat("*",name,"*")),max(name),max(concat("*",name,"*")) from t1; 10137 END 10138 OUTPUT 10139 select min(`name`), min(concat('*', `name`, '*')), max(`name`), max(concat('*', `name`, '*')) from t1 10140 END 10141 INPUT 10142 select from t1 where CAST(field as DATETIME) < '2006-11-06 04:08:36.0'; 10143 END 10144 ERROR 10145 syntax error at position 12 near 'from' 10146 END 10147 INPUT 10148 select hex(char(2557)); 10149 END 10150 OUTPUT 10151 select hex(char(2557)) from dual 10152 END 10153 INPUT 10154 select from t5 order by c1; 10155 END 10156 ERROR 10157 syntax error at position 12 near 'from' 10158 END 10159 INPUT 10160 select sha1(name) from bug20536; 10161 END 10162 OUTPUT 10163 select sha1(`name`) from bug20536 10164 END 10165 INPUT 10166 select concat_ws(_latin1'a',_latin2'a'); 10167 END 10168 OUTPUT 10169 select concat_ws(_latin1 'a', _latin2 'a') from dual 10170 END 10171 INPUT 10172 select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' and 'b; 10173 END 10174 ERROR 10175 syntax error at position 80 near 'b;' 10176 END 10177 INPUT 10178 select t1.*, t2.*, t1.value<=>t2.value from t1, t2 where t1.id=t2.id and t1.id=1; 10179 END 10180 OUTPUT 10181 select t1.*, t2.*, t1.value <=> t2.value from t1, t2 where t1.id = t2.id and t1.id = 1 10182 END 10183 INPUT 10184 select left('hello',null),left(null,1),left(null,null); 10185 END 10186 OUTPUT 10187 select left('hello', null), left(null, 1), left(null, null) from dual 10188 END 10189 INPUT 10190 select "abc" like "a%", "abc" not like "%d%", "a%" like "a%","abc%" like "a%%","abcd" like "a%b_%d", "a" like "%%a","abcde" like "a%_e","abc" like "abc%"; 10191 END 10192 OUTPUT 10193 select 'abc' like 'a%', 'abc' not like '%d%', 'a%' like 'a%', 'abc%' like 'a%%', 'abcd' like 'a%b_%d', 'a' like '%%a', 'abcde' like 'a%_e', 'abc' like 'abc%' from dual 10194 END 10195 INPUT 10196 select ST_Touches(ST_GeomFromText('LINESTRING(15 5,15 25)'),ST_GeomFromText('LINESTRING(15 5,15 25)')) as result; 10197 END 10198 OUTPUT 10199 select ST_Touches(ST_GeomFromText('LINESTRING(15 5,15 25)'), ST_GeomFromText('LINESTRING(15 5,15 25)')) as result from dual 10200 END 10201 INPUT 10202 select distinct a from t1 order by rand(10); 10203 END 10204 OUTPUT 10205 select distinct a from t1 order by rand(10) 10206 END 10207 INPUT 10208 select from words2; 10209 END 10210 ERROR 10211 syntax error at position 12 near 'from' 10212 END 10213 INPUT 10214 select from (t3 join (t4 natural join t5) on (b < z)) natural join (t1 natural join t2); 10215 END 10216 ERROR 10217 syntax error at position 12 near 'from' 10218 END 10219 INPUT 10220 select right(_utf8mb4 0xD0B0D0B2D0B2,1); 10221 END 10222 OUTPUT 10223 select right(_utf8mb4 0xD0B0D0B2D0B2, 1) from dual 10224 END 10225 INPUT 10226 select hex(weight_string('aa' as binary(3))); 10227 END 10228 ERROR 10229 syntax error at position 40 near 'binary' 10230 END 10231 INPUT 10232 select from information_schema.table_privileges; 10233 END 10234 ERROR 10235 syntax error at position 12 near 'from' 10236 END 10237 INPUT 10238 select min(a), min(case when 1=1 then a else NULL end), min(case when 1!=1 then NULL else a end) from t1 where b=3 group by b; 10239 END 10240 OUTPUT 10241 select min(a), min(case when 1 = 1 then a else null end), min(case when 1 != 1 then null else a end) from t1 where b = 3 group by b 10242 END 10243 INPUT 10244 select st_touches(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 10245 END 10246 OUTPUT 10247 select st_touches(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 10248 END 10249 INPUT 10250 select column_name as 'Field',column_type as 'Type',is_nullable as 'Null',column_key as 'Key',column_default as 'Default',extra as 'Extra' from information_schema.columns where table_schema='mysqltest_db1' and table_name='t_column_priv_only'; 10251 END 10252 OUTPUT 10253 select column_name as Field, column_type as Type, is_nullable as `Null`, column_key as `Key`, column_default as `Default`, extra as Extra from information_schema.`columns` where table_schema = 'mysqltest_db1' and table_name = 't_column_priv_only' 10254 END 10255 INPUT 10256 select dayname("1962-03-03"),dayname("1962-03-03")+0; 10257 END 10258 OUTPUT 10259 select dayname('1962-03-03'), dayname('1962-03-03') + 0 from dual 10260 END 10261 INPUT 10262 select from t1 left join t2 on (venue_id = entity_id and match(name) against('aberdeen' in boolean mode)) where dt = '2003-05-23 19:30:00'; 10263 END 10264 ERROR 10265 syntax error at position 12 near 'from' 10266 END 10267 INPUT 10268 select locate('HE','hello',2); 10269 END 10270 OUTPUT 10271 select locate('HE', 'hello', 2) from dual 10272 END 10273 INPUT 10274 select truncate(1.5, -9223372036854775808), truncate(1.5, 9223372036854775808); 10275 END 10276 OUTPUT 10277 select truncate(1.5, -9223372036854775808), truncate(1.5, 9223372036854775808) from dual 10278 END 10279 INPUT 10280 select {fn length("hello")}, { date "1997-10-20" }; 10281 END 10282 ERROR 10283 syntax error at position 9 near '{' 10284 END 10285 INPUT 10286 select cast(repeat('1',20) as unsigned); 10287 END 10288 OUTPUT 10289 select convert(repeat('1', 20), unsigned) from dual 10290 END 10291 INPUT 10292 select hex(conv(convert('123' using utf16), 10, 16)); 10293 END 10294 OUTPUT 10295 select hex(conv(convert('123' using utf16), 10, 16)) from dual 10296 END 10297 INPUT 10298 select unix_timestamp(@a); 10299 END 10300 OUTPUT 10301 select unix_timestamp(@a) from dual 10302 END 10303 INPUT 10304 select from information_schema.column_privileges; 10305 END 10306 ERROR 10307 syntax error at position 12 near 'from' 10308 END 10309 INPUT 10310 select from t1 where x=1; 10311 END 10312 ERROR 10313 syntax error at position 12 near 'from' 10314 END 10315 INPUT 10316 select from t3 where a = 10; 10317 END 10318 ERROR 10319 syntax error at position 12 near 'from' 10320 END 10321 INPUT 10322 select ifnull(a,'') from t1; 10323 END 10324 OUTPUT 10325 select ifnull(a, '') from t1 10326 END 10327 INPUT 10328 select fld1,fld3 FROM t2 where companynr = 37 and fld3 like 'f%'; 10329 END 10330 OUTPUT 10331 select fld1, fld3 from t2 where companynr = 37 and fld3 like 'f%' 10332 END 10333 INPUT 10334 select lpad('hello', -4294967295, '1'); 10335 END 10336 OUTPUT 10337 select lpad('hello', -4294967295, '1') from dual 10338 END 10339 INPUT 10340 select ST_astext(ST_geomfromwkb(ST_AsWKB(st_intersection(linestring(point(-59,82),point(32,29)), point(2,-5))))) as result; 10341 END 10342 OUTPUT 10343 select ST_astext(ST_geomfromwkb(ST_AsWKB(st_intersection(linestring(point(-59, 82), point(32, 29)), point(2, -5))))) as result from dual 10344 END 10345 INPUT 10346 select event_name from performance_schema.events_stages_history_long where thread_id = @con1_thread_id and event_name like '%Opening %tables' or event_name like '%Locking system tables' or event_name like '%System lock'; 10347 END 10348 OUTPUT 10349 select event_name from performance_schema.events_stages_history_long where thread_id = @con1_thread_id and event_name like '%Opening %tables' or event_name like '%Locking system tables' or event_name like '%System lock' 10350 END 10351 INPUT 10352 select from t1 where a = 736494; 10353 END 10354 ERROR 10355 syntax error at position 12 near 'from' 10356 END 10357 INPUT 10358 select @@collation_connection; 10359 END 10360 OUTPUT 10361 select @@collation_connection from dual 10362 END 10363 INPUT 10364 select substring_index('the king of the the hill',' ',-4); 10365 END 10366 OUTPUT 10367 select substring_index('the king of the the hill', ' ', -4) from dual 10368 END 10369 INPUT 10370 select _ujis 0xa1a2a1a3 like concat(_ujis'%',_ujis 0xa2a1, _ujis'%') collate ujis_bin; 10371 END 10372 OUTPUT 10373 select _ujis 0xa1a2a1a3 like concat(_ujis '%', _ujis 0xa2a1, _ujis '%') collate ujis_bin from dual 10374 END 10375 INPUT 10376 select concat(a, if(b>10, 'x' 'x', 'y' 'y')) from t1; 10377 END 10378 OUTPUT 10379 select concat(a, if(b > 10, 'x' as x, 'y' as y)) from t1 10380 END 10381 INPUT 10382 select from `information_schema`.`COLUMNS` where `TABLE_NAME` = NULL; 10383 END 10384 ERROR 10385 syntax error at position 12 near 'from' 10386 END 10387 INPUT 10388 select f1 from t1 where cast("2006-1-1" as date) between f1 and cast('zzz' as date); 10389 END 10390 OUTPUT 10391 select f1 from t1 where convert('2006-1-1', date) between f1 and convert('zzz', date) 10392 END 10393 INPUT 10394 select from t1 where a=1; 10395 END 10396 ERROR 10397 syntax error at position 12 near 'from' 10398 END 10399 INPUT 10400 select from t1, (select from t3) as t where t.a =5 order by 1, 2; 10401 END 10402 ERROR 10403 syntax error at position 12 near 'from' 10404 END 10405 INPUT 10406 select count(*) from t1 where match a against ('aaax*' in boolean mode); 10407 END 10408 ERROR 10409 syntax error at position 38 near 'a' 10410 END 10411 INPUT 10412 select extract(DAY_SECOND FROM "225 10:11:12"); 10413 END 10414 OUTPUT 10415 select extract(day_second from '225 10:11:12') from dual 10416 END 10417 INPUT 10418 select from t1 where c2 = 3; 10419 END 10420 ERROR 10421 syntax error at position 12 near 'from' 10422 END 10423 INPUT 10424 select distinct a from t1 order by a desc; 10425 END 10426 OUTPUT 10427 select distinct a from t1 order by a desc 10428 END 10429 INPUT 10430 select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POINT(20 20)'))); 10431 END 10432 OUTPUT 10433 select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POINT(20 20)'))) from dual 10434 END 10435 INPUT 10436 select group_concat(bar order by concat(bar,bar)) from t1; 10437 END 10438 OUTPUT 10439 select group_concat(bar order by concat(bar, bar) asc) from t1 10440 END 10441 INPUT 10442 select concat_ws(NULL,'a'),concat_ws(',',NULL,''); 10443 END 10444 OUTPUT 10445 select concat_ws(null, 'a'), concat_ws(',', null, '') from dual 10446 END 10447 INPUT 10448 select extract(SECOND_MICROSECOND FROM "1999-01-02 10:11:12.000123"); 10449 END 10450 OUTPUT 10451 select extract(second_microsecond from '1999-01-02 10:11:12.000123') from dual 10452 END 10453 INPUT 10454 select instr('hello','HE'), instr('hello',binary 'HE'), instr(binary 'hello','HE'); 10455 END 10456 OUTPUT 10457 select instr('hello', 'HE'), instr('hello', binary 'HE'), instr(binary 'hello', 'HE') from dual 10458 END 10459 INPUT 10460 select c1 mod 50 as result from t1; 10461 END 10462 OUTPUT 10463 select c1 % 50 as result from t1 10464 END 10465 INPUT 10466 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_spanish2_ci; 10467 END 10468 OUTPUT 10469 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_spanish2_ci 10470 END 10471 INPUT 10472 select benchmark(NULL, NULL); 10473 END 10474 OUTPUT 10475 select benchmark(null, null) from dual 10476 END 10477 INPUT 10478 select concat("-",a,"-",b,"-") from t1 where b="hello"; 10479 END 10480 OUTPUT 10481 select concat('-', a, '-', b, '-') from t1 where b = 'hello' 10482 END 10483 INPUT 10484 select from t1 union select from t2 order by 1 limit 1; 10485 END 10486 ERROR 10487 syntax error at position 12 near 'from' 10488 END 10489 INPUT 10490 select from t1 join t2 using (a1) join t3 on b=c1 join t4 using (c2); 10491 END 10492 ERROR 10493 syntax error at position 12 near 'from' 10494 END 10495 INPUT 10496 select hex(left(c,1)) from t1 group by c; 10497 END 10498 OUTPUT 10499 select hex(left(c, 1)) from t1 group by c 10500 END 10501 INPUT 10502 select substring_index(null,'the',3); 10503 END 10504 OUTPUT 10505 select substring_index(null, 'the', 3) from dual 10506 END 10507 INPUT 10508 select from t1 where s1 = 'cH' and s1 <> 'ch'; 10509 END 10510 ERROR 10511 syntax error at position 12 near 'from' 10512 END 10513 INPUT 10514 select find_in_set("abc","abc"),find_in_set("ab","abc"),find_in_set("abcd","abc"); 10515 END 10516 OUTPUT 10517 select find_in_set('abc', 'abc'), find_in_set('ab', 'abc'), find_in_set('abcd', 'abc') from dual 10518 END 10519 INPUT 10520 select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; 10521 END 10522 OUTPUT 10523 select distinct a1, a2, b from t1 where a1 > 'a' and a2 > 'a' and b = 'c' group by a1, a2, b 10524 END 10525 INPUT 10526 select t1.*, t1.* as 'with_alias' from t1; 10527 END 10528 ERROR 10529 syntax error at position 21 near 'as' 10530 END 10531 INPUT 10532 select POSITION(_latin1'B' COLLATE latin1_general_ci IN _latin1'abcd' COLLATE latin1_bin); 10533 END 10534 ERROR 10535 syntax error at position 64 near '_latin1' 10536 END 10537 INPUT 10538 select charset(user()); 10539 END 10540 OUTPUT 10541 select charset(user()) from dual 10542 END 10543 INPUT 10544 select mbrtouches(ST_GeomFromText("point(2 4)"), ST_GeomFromText("linestring(2 0, 2 6)")); 10545 END 10546 OUTPUT 10547 select mbrtouches(ST_GeomFromText('point(2 4)'), ST_GeomFromText('linestring(2 0, 2 6)')) from dual 10548 END 10549 INPUT 10550 select substring_index('aaaaaaaaa1','aa',-1); 10551 END 10552 OUTPUT 10553 select substring_index('aaaaaaaaa1', 'aa', -1) from dual 10554 END 10555 INPUT 10556 select table_name, data_type, column_type from information_schema.columns where column_name = 'numeric_precision' and table_schema = 'information_schema'; 10557 END 10558 OUTPUT 10559 select table_name, data_type, column_type from information_schema.`columns` where column_name = 'numeric_precision' and table_schema = 'information_schema' 10560 END 10561 INPUT 10562 select from `information_schema`.`TABLE_CONSTRAINTS` where `TABLE_NAME` = NULL; 10563 END 10564 ERROR 10565 syntax error at position 12 near 'from' 10566 END 10567 INPUT 10568 select md5(name) from bug20536; 10569 END 10570 OUTPUT 10571 select md5(`name`) from bug20536 10572 END 10573 INPUT 10574 select strcmp(date_format(utc_timestamp(),"%Y-%m-%d"), utc_date())=0; 10575 END 10576 OUTPUT 10577 select strcmp(date_format(utc_timestamp(), '%Y-%m-%d'), utc_date()) = 0 from dual 10578 END 10579 INPUT 10580 select count(*) from t_event3; 10581 END 10582 OUTPUT 10583 select count(*) from t_event3 10584 END 10585 INPUT 10586 select locate(0xa2a1,0xa1a2a1a3); 10587 END 10588 OUTPUT 10589 select locate(0xa2a1, 0xa1a2a1a3) from dual 10590 END 10591 INPUT 10592 select s1 as before_delete_unicode_ci from t1 where s1 like 'ペテ%'; 10593 END 10594 OUTPUT 10595 select s1 as before_delete_unicode_ci from t1 where s1 like 'ペテ%' 10596 END 10597 INPUT 10598 select 1=_latin2'1'; 10599 END 10600 OUTPUT 10601 select 1 = _latin2 '1' from dual 10602 END 10603 INPUT 10604 select from information_schema.collations order by id limit 1; 10605 END 10606 ERROR 10607 syntax error at position 12 near 'from' 10608 END 10609 INPUT 10610 select min(f2),max(f2) from t1; 10611 END 10612 OUTPUT 10613 select min(f2), max(f2) from t1 10614 END 10615 INPUT 10616 select database() = "test"; 10617 END 10618 OUTPUT 10619 select database() = 'test' from dual 10620 END 10621 INPUT 10622 select substring_index('aaaaaaaaa1','aaa',1); 10623 END 10624 OUTPUT 10625 select substring_index('aaaaaaaaa1', 'aaa', 1) from dual 10626 END 10627 INPUT 10628 select concat(a,'.') from t1; 10629 END 10630 OUTPUT 10631 select concat(a, '.') from t1 10632 END 10633 INPUT 10634 select value,description,COUNT(bug_id) from t2 left join t1 on t2.program=t1.product and t2.value=t1.component where program="AAAAA" group by value; 10635 END 10636 OUTPUT 10637 select value, description, COUNT(bug_id) from t2 left join t1 on t2.program = t1.product and t2.value = t1.component where program = 'AAAAA' group by value 10638 END 10639 INPUT 10640 select sql_big_result c,count(t) from t1 group by c order by c limit 10; 10641 END 10642 OUTPUT 10643 select `sql_big_result` as c, count(t) from t1 group by c order by c asc limit 10 10644 END 10645 INPUT 10646 select from t3 where b in (select a from t1); 10647 END 10648 ERROR 10649 syntax error at position 12 near 'from' 10650 END 10651 INPUT 10652 select right('hello', -4294967295); 10653 END 10654 OUTPUT 10655 select right('hello', -4294967295) from dual 10656 END 10657 INPUT 10658 select uuid() into @my_uuid; 10659 END 10660 ERROR 10661 syntax error at position 28 near 'my_uuid' 10662 END 10663 INPUT 10664 select NULLIF(NULL,NULL), NULLIF(NULL,1), NULLIF(NULL,1.0), NULLIF(NULL,"test"); 10665 END 10666 OUTPUT 10667 select NULLIF(null, null), NULLIF(null, 1), NULLIF(null, 1.0), NULLIF(null, 'test') from dual 10668 END 10669 INPUT 10670 select a1,a2,b,min(c),max(c) from t2 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b; 10671 END 10672 OUTPUT 10673 select a1, a2, b, min(c), max(c) from t2 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1, a2, b 10674 END 10675 INPUT 10676 select 1/*!999992*/; 10677 END 10678 OUTPUT 10679 select 1 from dual 10680 END 10681 INPUT 10682 select load_file("/proc/uptime"); 10683 END 10684 OUTPUT 10685 select load_file('/proc/uptime') from dual 10686 END 10687 INPUT 10688 select "a"<"b","a"<="b","b">="a","b">"a","a"="A","a"<>"b"; 10689 END 10690 OUTPUT 10691 select 'a' < 'b', 'a' <= 'b', 'b' >= 'a', 'b' > 'a', 'a' = 'A', 'a' != 'b' from dual 10692 END 10693 INPUT 10694 select strcmp('�','o�'),strcmp('�','u�'),strcmp('�','oeb'); 10695 END 10696 OUTPUT 10697 select strcmp('�', 'o�'), strcmp('�', 'u�'), strcmp('�', 'oeb') from dual 10698 END 10699 INPUT 10700 select from information_schema.schema_privileges where grantee like "'mysqltest_8'%"; 10701 END 10702 ERROR 10703 syntax error at position 12 near 'from' 10704 END 10705 INPUT 10706 select t1.name, t2.name, t2.id from t2 right join t1 on (t1.id = t2.owner) where t2.id is null; 10707 END 10708 OUTPUT 10709 select t1.`name`, t2.`name`, t2.id from t2 right join t1 on t1.id = t2.owner where t2.id is null 10710 END 10711 INPUT 10712 select 8 from t1; 10713 END 10714 OUTPUT 10715 select 8 from t1 10716 END 10717 INPUT 10718 select a, MAX(b), CONCAT_WS(MAX(b), '43', '4', '5') from t1 group by a; 10719 END 10720 OUTPUT 10721 select a, MAX(b), CONCAT_WS(MAX(b), '43', '4', '5') from t1 group by a 10722 END 10723 INPUT 10724 select 1, st_intersects(t.geom, p.geom) from tbl_polygon t, tbl_polygon p where t.id = 'POLY1' and p.id = 'POLY2'; 10725 END 10726 OUTPUT 10727 select 1, st_intersects(t.geom, p.geom) from tbl_polygon as t, tbl_polygon as p where t.id = 'POLY1' and p.id = 'POLY2' 10728 END 10729 INPUT 10730 select if(u=1,st,binary st) s from t1 where st like "%a%" order by s; 10731 END 10732 OUTPUT 10733 select if(u = 1, st, binary st) as s from t1 where st like '%a%' order by s asc 10734 END 10735 INPUT 10736 select name, avg(value1), std(value1), variance(value1) from t1, t2 where t1.id = t2.id group by t1.id; 10737 END 10738 OUTPUT 10739 select `name`, avg(value1), std(value1), variance(value1) from t1, t2 where t1.id = t2.id group by t1.id 10740 END 10741 INPUT 10742 select from tm_base_temp; 10743 END 10744 ERROR 10745 syntax error at position 12 near 'from' 10746 END 10747 INPUT 10748 select from t1 natural left join t2 where (t2.i is not null) is not null; 10749 END 10750 ERROR 10751 syntax error at position 12 near 'from' 10752 END 10753 INPUT 10754 select from mysql.db where user=@user123; 10755 END 10756 ERROR 10757 syntax error at position 12 near 'from' 10758 END 10759 INPUT 10760 select from t1 :; 10761 END 10762 ERROR 10763 syntax error at position 12 near 'from' 10764 END 10765 INPUT 10766 select AES_ENCRYPT(@ENCSTR, @KEYS, @IV)=AES_ENCRYPT(@ENCSTR, @KEYS, @IV1); 10767 END 10768 OUTPUT 10769 select AES_ENCRYPT(@ENCSTR, @`KEYS`, @IV) = AES_ENCRYPT(@ENCSTR, @`KEYS`, @IV1) from dual 10770 END 10771 INPUT 10772 select length(repeat("a",100000000)),length(repeat("a",1000*64)); 10773 END 10774 OUTPUT 10775 select length(repeat('a', 100000000)), length(repeat('a', 1000 * 64)) from dual 10776 END 10777 INPUT 10778 select id, sum(qty) as sqty, count(qty) as cqty from t1 group by id having sum(qty)>2 and cqty>1; 10779 END 10780 OUTPUT 10781 select id, sum(qty) as sqty, count(qty) as cqty from t1 group by id having sum(qty) > 2 and cqty > 1 10782 END 10783 INPUT 10784 select hex(s1) from t1; 10785 END 10786 OUTPUT 10787 select hex(s1) from t1 10788 END 10789 INPUT 10790 select lpad('a',4,'1'),lpad('a',4,'12'),lpad('abcd',3,'12'), lpad(11, 10 , 22); 10791 END 10792 OUTPUT 10793 select lpad('a', 4, '1'), lpad('a', 4, '12'), lpad('abcd', 3, '12'), lpad(11, 10, 22) from dual 10794 END 10795 INPUT 10796 select str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S.%f") as f1, str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S") as f2, str_to_date("2003-01-02", "%Y-%m-%d") as f3, str_to_date("02 10:11:12", "%d %H:%i:%S.%f") as f4, str_to_date("02 10:11:12", "%d %H:%i:%S") as f5, str_to_date("02 10", "%d %f") as f6; 10797 END 10798 OUTPUT 10799 select str_to_date('2003-01-02 10:11:12.0012', '%Y-%m-%d %H:%i:%S.%f') as f1, str_to_date('2003-01-02 10:11:12.0012', '%Y-%m-%d %H:%i:%S') as f2, str_to_date('2003-01-02', '%Y-%m-%d') as f3, str_to_date('02 10:11:12', '%d %H:%i:%S.%f') as f4, str_to_date('02 10:11:12', '%d %H:%i:%S') as f5, str_to_date('02 10', '%d %f') as f6 from dual 10800 END 10801 INPUT 10802 select extract(DAY_MINUTE FROM "02 10:11:12"); 10803 END 10804 OUTPUT 10805 select extract(day_minute from '02 10:11:12') from dual 10806 END 10807 INPUT 10808 select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL); 10809 END 10810 OUTPUT 10811 select ln(exp(10)), exp(ln(sqrt(10)) * 2), ln(-1), ln(0), ln(null) from dual 10812 END 10813 INPUT 10814 select 1, @empty_geom = st_geomfromtext('geometrycollection()') as equal; 10815 END 10816 OUTPUT 10817 select 1, @empty_geom = st_geomfromtext('geometrycollection()') as equal from dual 10818 END 10819 INPUT 10820 select hex(convert(char(2557 using latin1) using utf8)); 10821 END 10822 ERROR 10823 syntax error at position 35 near 'using' 10824 END 10825 INPUT 10826 select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by t1.a; 10827 END 10828 OUTPUT 10829 select group_concat(t1.b, t2.c) from t1 join t2 using (a) group by t1.a 10830 END 10831 INPUT 10832 select hex(weight_string('�' as char(1))); 10833 END 10834 ERROR 10835 syntax error at position 40 10836 END 10837 INPUT 10838 select 1, max(a) from t1i where 1=99; 10839 END 10840 OUTPUT 10841 select 1, max(a) from t1i where 1 = 99 10842 END 10843 INPUT 10844 select t2.count, t1.name from t2 natural join t1; 10845 END 10846 OUTPUT 10847 select t2.count, t1.`name` from t2 natural join t1 10848 END 10849 INPUT 10850 select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5)|0,-(1+1)*-2; 10851 END 10852 OUTPUT 10853 select 1 + 1, 1 - 1, 1 + 1 * 2, 8 / 5, 8 % 5, mod(8, 5), mod(8, 5) | 0, -(1 + 1) * -2 from dual 10854 END 10855 INPUT 10856 select lpad('hello', 18446744073709551616, '1'); 10857 END 10858 OUTPUT 10859 select lpad('hello', 18446744073709551616, '1') from dual 10860 END 10861 INPUT 10862 select date_add(time,INTERVAL 1 SECOND) from t1; 10863 END 10864 OUTPUT 10865 select date_add(`time`, interval 1 SECOND) from t1 10866 END 10867 INPUT 10868 select from v3; 10869 END 10870 ERROR 10871 syntax error at position 12 near 'from' 10872 END 10873 INPUT 10874 select from t1 natural join t2 where t1.b > t2.b; 10875 END 10876 ERROR 10877 syntax error at position 12 near 'from' 10878 END 10879 INPUT 10880 select sum(num) from t1; 10881 END 10882 OUTPUT 10883 select sum(num) from t1 10884 END 10885 INPUT 10886 select a1,a2,b,min(c) from t2 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b; 10887 END 10888 OUTPUT 10889 select a1, a2, b, min(c) from t2 where (a1 > 'a' or a1 < '9') and (a2 >= 'b' and a2 < 'z') and b = 'a' and (c = 'j121' or c > 'k121' and c < 'm122' or c > 'o122' or c < 'h112' or c = 'c111') group by a1, a2, b 10890 END 10891 INPUT 10892 select from t1 where a > 5 xor a < 10; 10893 END 10894 ERROR 10895 syntax error at position 12 near 'from' 10896 END 10897 INPUT 10898 select column_name, privileges from columns where table_name='user' and column_name like '%o%' order by column_name; 10899 END 10900 OUTPUT 10901 select column_name, `privileges` from `columns` where table_name = 'user' and column_name like '%o%' order by column_name asc 10902 END 10903 INPUT 10904 select case when 1<0 then "TRUE" else "FALSE" END; 10905 END 10906 OUTPUT 10907 select case when 1 < 0 then 'TRUE' else 'FALSE' end from dual 10908 END 10909 INPUT 10910 select t1.i,t2.i,t3.i from t2 left join t3 on (t2.i=t3.i),t1 order by t1.i,t2.i,t3.i; 10911 END 10912 OUTPUT 10913 select t1.i, t2.i, t3.i from t2 left join t3 on t2.i = t3.i, t1 order by t1.i asc, t2.i asc, t3.i asc 10914 END 10915 INPUT 10916 select a, hex(a) from t1; 10917 END 10918 OUTPUT 10919 select a, hex(a) from t1 10920 END 10921 INPUT 10922 select inet_aton("255.255.255.2551"); 10923 END 10924 OUTPUT 10925 select inet_aton('255.255.255.2551') from dual 10926 END 10927 INPUT 10928 select t1.id1 from t1 inner join (t3 left join v1 on t3.id3 = v1.id3); 10929 END 10930 OUTPUT 10931 select t1.id1 from t1 join (t3 left join v1 on t3.id3 = v1.id3) 10932 END 10933 INPUT 10934 select from t1 where find_in_set('-1', a); 10935 END 10936 ERROR 10937 syntax error at position 12 near 'from' 10938 END 10939 INPUT 10940 select _koi8r'a' LIKE _koi8r'A'; 10941 END 10942 OUTPUT 10943 select _koi8r 'a' like _koi8r 'A' from dual 10944 END 10945 INPUT 10946 select from (select from t1 union select from t1) a; 10947 END 10948 ERROR 10949 syntax error at position 12 near 'from' 10950 END 10951 INPUT 10952 select count(distinct n1,s) from t1; 10953 END 10954 OUTPUT 10955 select count(distinct n1, s) from t1 10956 END 10957 INPUT 10958 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_spanish2_ci; 10959 END 10960 OUTPUT 10961 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_spanish2_ci 10962 END 10963 INPUT 10964 select i from v1 where i = 1 into k; 10965 END 10966 ERROR 10967 syntax error at position 36 near 'k' 10968 END 10969 INPUT 10970 select a, t1.*, b from t1; 10971 END 10972 OUTPUT 10973 select a, t1.*, b from t1 10974 END 10975 INPUT 10976 select load_file(0x0A9FB76C661B409C4BEC88098C5DD71B1072F9691F2E827D7EC8F092B299868A3CE196C04F0FB18CAB4E1557EB72331D812379DE7A75CA21C32E7C722C59E5CC33EF262EF04187B0F0EE756FA984DF2EAD37B1E4ADB064C3C5038F2E3B2D661B1C1150AAEB5425512E14D7506166D92D4533872E662F4B2D1428AAB5CCA72E75AA2EF325E196A5A02E2E8278873C64375845994B0F39BE2FF7B478332A7B0AA5E48877C47B6F513E997848AF8CCB8A899F3393AB35333CF0871E36698193862D486B4B9078B70C0A0A507B8A250F3F876F5A067632D5E65193E4445A1EC3A2C9B4C6F07AC334F0F62BC33357CB502E9B1C19D2398B6972AEC2EF21630F8C9134C4F7DD662D8AD7BDC9E19C46720F334B66C22D4BF32ED275144E20E7669FFCF6FC143667C9F02A577F32960FA9F2371BE1FA90E49CBC69C01531F140556854D588DD0E55E1307D78CA38E975CD999F9AEA604266329EE62BFB5ADDA67F549E211ECFBA906C60063696352ABB82AA782D25B17E872EA587871F450446DB1BAE0123D20404A8F2D2698B371002E986C8FCB969A99FF0E150A2709E2ED7633D02ADA87D5B3C9487D27B2BD9D21E2EC3215DCC3CDCD884371281B95A2E9987AAF82EB499C058D9C3E7DC1B66635F60DB121C72F929622DD47B6B2E69F59FF2AE6B63CC2EC60FFBA20EA50569DBAB5DAEFAEB4F03966C9637AB55662EDD28439155A82D053A5299448EDB2E7BEB0F62889E2F84E6C7F34B3212C9AAC32D521D5AB8480993F1906D5450FAB342A0FA6ED223E178BAC036B81E15783604C32A961EA1EF20BE2EBB93D34ED37BC03142B7583303E4557E48551E4BD7CBDDEA146D5485A5D212C35189F0BD6497E66912D2780A59A53B532E12C0A5ED1EC0445D96E8F2DD825221CFE4A65A87AA21DC8750481B9849DD81694C3357A0ED9B78D608D8EDDE28FAFBEC17844DE5709F41E121838DB55639D77E32A259A416D7013B2EB1259FDE1B498CBB9CAEE1D601DF3C915EA91C69B44E6B72062F5F4B3C73F06F2D5AD185E1692E2E0A01E7DD5133693681C52EE13B2BE42D03BDCF48E4E133CF06662339B778E1C3034F9939A433E157449172F7969ACCE1F5D2F65A4E09E4A5D5611EBEDDDBDB0C0C0A); 10977 END 10978 OUTPUT 10979 select load_file(0x0A9FB76C661B409C4BEC88098C5DD71B1072F9691F2E827D7EC8F092B299868A3CE196C04F0FB18CAB4E1557EB72331D812379DE7A75CA21C32E7C722C59E5CC33EF262EF04187B0F0EE756FA984DF2EAD37B1E4ADB064C3C5038F2E3B2D661B1C1150AAEB5425512E14D7506166D92D4533872E662F4B2D1428AAB5CCA72E75AA2EF325E196A5A02E2E8278873C64375845994B0F39BE2FF7B478332A7B0AA5E48877C47B6F513E997848AF8CCB8A899F3393AB35333CF0871E36698193862D486B4B9078B70C0A0A507B8A250F3F876F5A067632D5E65193E4445A1EC3A2C9B4C6F07AC334F0F62BC33357CB502E9B1C19D2398B6972AEC2EF21630F8C9134C4F7DD662D8AD7BDC9E19C46720F334B66C22D4BF32ED275144E20E7669FFCF6FC143667C9F02A577F32960FA9F2371BE1FA90E49CBC69C01531F140556854D588DD0E55E1307D78CA38E975CD999F9AEA604266329EE62BFB5ADDA67F549E211ECFBA906C60063696352ABB82AA782D25B17E872EA587871F450446DB1BAE0123D20404A8F2D2698B371002E986C8FCB969A99FF0E150A2709E2ED7633D02ADA87D5B3C9487D27B2BD9D21E2EC3215DCC3CDCD884371281B95A2E9987AAF82EB499C058D9C3E7DC1B66635F60DB121C72F929622DD47B6B2E69F59FF2AE6B63CC2EC60FFBA20EA50569DBAB5DAEFAEB4F03966C9637AB55662EDD28439155A82D053A5299448EDB2E7BEB0F62889E2F84E6C7F34B3212C9AAC32D521D5AB8480993F1906D5450FAB342A0FA6ED223E178BAC036B81E15783604C32A961EA1EF20BE2EBB93D34ED37BC03142B7583303E4557E48551E4BD7CBDDEA146D5485A5D212C35189F0BD6497E66912D2780A59A53B532E12C0A5ED1EC0445D96E8F2DD825221CFE4A65A87AA21DC8750481B9849DD81694C3357A0ED9B78D608D8EDDE28FAFBEC17844DE5709F41E121838DB55639D77E32A259A416D7013B2EB1259FDE1B498CBB9CAEE1D601DF3C915EA91C69B44E6B72062F5F4B3C73F06F2D5AD185E1692E2E0A01E7DD5133693681C52EE13B2BE42D03BDCF48E4E133CF06662339B778E1C3034F9939A433E157449172F7969ACCE1F5D2F65A4E09E4A5D5611EBEDDDBDB0C0C0A) from dual 10980 END 10981 INPUT 10982 select schema_name from information_schema.schemata ORDER BY schema_name; 10983 END 10984 OUTPUT 10985 select schema_name from information_schema.schemata order by schema_name asc 10986 END 10987 INPUT 10988 select id, avg(value1), std(value1), variance(value1) from t1 group by id; 10989 END 10990 OUTPUT 10991 select id, avg(value1), std(value1), variance(value1) from t1 group by id 10992 END 10993 INPUT 10994 select from t1 where 'd' < s1 and s1 = 'CH'; 10995 END 10996 ERROR 10997 syntax error at position 12 near 'from' 10998 END 10999 INPUT 11000 select a,b,cast(a as char character set cp1251),cast(b as binary) from t1; 11001 END 11002 OUTPUT 11003 select a, b, convert(a, char character set cp1251), convert(b, binary) from t1 11004 END 11005 INPUT 11006 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_unicode_ci; 11007 END 11008 OUTPUT 11009 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_unicode_ci 11010 END 11011 INPUT 11012 select text1, length(text1) from t1 order by text1; 11013 END 11014 OUTPUT 11015 select text1, length(text1) from t1 order by text1 asc 11016 END 11017 INPUT 11018 select from t1 limit 9999999999; 11019 END 11020 ERROR 11021 syntax error at position 12 near 'from' 11022 END 11023 INPUT 11024 select from t3 natural right join t2; 11025 END 11026 ERROR 11027 syntax error at position 12 near 'from' 11028 END 11029 INPUT 11030 select word, word=cast(0xdf AS CHAR) as t from t1 having t > 0; 11031 END 11032 OUTPUT 11033 select word, word = convert(0xdf, CHAR) as t from t1 having t > 0 11034 END 11035 INPUT 11036 select max(t2.a1) from t1 left outer join t2 on t1.a2=t2.a1 and 1=0 where t2.a1='AAA'; 11037 END 11038 OUTPUT 11039 select max(t2.a1) from t1 left join t2 on t1.a2 = t2.a1 and 1 = 0 where t2.a1 = 'AAA' 11040 END 11041 INPUT 11042 select format(atan2(-2, 2), 6); 11043 END 11044 OUTPUT 11045 select format(atan2(-2, 2), 6) from dual 11046 END 11047 INPUT 11048 select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b; 11049 END 11050 OUTPUT 11051 select a1, a2, b, min(c), max(c) from t1 where c > 'b1' or c <= 'g1' group by a1, a2, b 11052 END 11053 INPUT 11054 select a, (select t2.* from t2) from t1; 11055 END 11056 OUTPUT 11057 select a, (select t2.* from t2) from t1 11058 END 11059 INPUT 11060 select 1.0<=>0E1,10<=>NULL,NULL<=>0.0, NULL<=>0E0; 11061 END 11062 OUTPUT 11063 select 1.0 <=> 0E1, 10 <=> null, null <=> 0.0, null <=> 0E0 from dual 11064 END 11065 INPUT 11066 select hex(substr(_utf32 0x000000e4000000e500000068,-1)); 11067 END 11068 OUTPUT 11069 select hex(substr(_utf32 0x000000e4000000e500000068, -1)) from dual 11070 END 11071 INPUT 11072 select cast(9223372036854775808 as unsigned)+1; 11073 END 11074 OUTPUT 11075 select convert(9223372036854775808, unsigned) + 1 from dual 11076 END 11077 INPUT 11078 select if(u=1,st,st) s from t1 order by s; 11079 END 11080 OUTPUT 11081 select if(u = 1, st, st) as s from t1 order by s asc 11082 END 11083 INPUT 11084 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name = 'tm' and index_name = 'w' order by table_name; 11085 END 11086 OUTPUT 11087 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name = 'tm' and index_name = 'w' order by table_name asc 11088 END 11089 INPUT 11090 select from t3 order by b,a limit 3; 11091 END 11092 ERROR 11093 syntax error at position 12 near 'from' 11094 END 11095 INPUT 11096 select distinct vs from t1; 11097 END 11098 OUTPUT 11099 select distinct vs from t1 11100 END 11101 INPUT 11102 select mbrwithin(ST_GeomFromText("linestring(0 1, 3 1)"), ST_GeomFromText("polygon((0 0, 3 0, 3 3, 0 3, 0 0))")); 11103 END 11104 OUTPUT 11105 select mbrwithin(ST_GeomFromText('linestring(0 1, 3 1)'), ST_GeomFromText('polygon((0 0, 3 0, 3 3, 0 3, 0 0))')) from dual 11106 END 11107 INPUT 11108 select a, count(a) from t1 group by a with rollup; 11109 END 11110 ERROR 11111 syntax error at position 43 near 'with' 11112 END 11113 INPUT 11114 select from t1,t2 left join t3 on (t2.i=t3.i) order by t1.i,t2.i,t3.i; 11115 END 11116 ERROR 11117 syntax error at position 12 near 'from' 11118 END 11119 INPUT 11120 select release_lock('test_bug16407'); 11121 END 11122 OUTPUT 11123 select release_lock('test_bug16407') from dual 11124 END 11125 INPUT 11126 select release_lock('ee_16407_5'); 11127 END 11128 OUTPUT 11129 select release_lock('ee_16407_5') from dual 11130 END 11131 INPUT 11132 select @b - @a; 11133 END 11134 OUTPUT 11135 select @b - @a from dual 11136 END 11137 INPUT 11138 select a1,a2,b,min(c) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; 11139 END 11140 OUTPUT 11141 select a1, a2, b, min(c) from t1 where a1 > 'a' and a2 > 'a' and b = 'c' group by a1, a2, b 11142 END 11143 INPUT 11144 select from t1 order by func1(a); 11145 END 11146 ERROR 11147 syntax error at position 12 near 'from' 11148 END 11149 INPUT 11150 select repeat('hello', 4294967297); 11151 END 11152 OUTPUT 11153 select repeat('hello', 4294967297) from dual 11154 END 11155 INPUT 11156 select from information_schema.triggers where trigger_schema in ('mysql', 'information_schema', 'test', 'mysqltest') order by trigger_name; 11157 END 11158 ERROR 11159 syntax error at position 12 near 'from' 11160 END 11161 INPUT 11162 select substring_index('aaaaaaaaa1','a',-1); 11163 END 11164 OUTPUT 11165 select substring_index('aaaaaaaaa1', 'a', -1) from dual 11166 END 11167 INPUT 11168 select substring_index("www.tcx.se","",3); 11169 END 11170 OUTPUT 11171 select substring_index('www.tcx.se', '', 3) from dual 11172 END 11173 INPUT 11174 select yearweek(20001231,0), yearweek(20001231,1), yearweek(20001231,2), yearweek(20001231,3), yearweek(20001231,4), yearweek(20001231,5), yearweek(20001231,6), yearweek(20001231,7); 11175 END 11176 OUTPUT 11177 select yearweek(20001231, 0), yearweek(20001231, 1), yearweek(20001231, 2), yearweek(20001231, 3), yearweek(20001231, 4), yearweek(20001231, 5), yearweek(20001231, 6), yearweek(20001231, 7) from dual 11178 END 11179 INPUT 11180 select extract(MINUTE FROM "10:11:12"); 11181 END 11182 OUTPUT 11183 select extract(minute from '10:11:12') from dual 11184 END 11185 INPUT 11186 select (_utf8 X'616263FF'); 11187 END 11188 OUTPUT 11189 select _utf8 X'616263FF' from dual 11190 END 11191 INPUT 11192 select f1, group_concat(f1+1) from t1 group by f1 with rollup; 11193 END 11194 ERROR 11195 syntax error at position 55 near 'with' 11196 END 11197 INPUT 11198 select substring('hello', -18446744073709551617, -18446744073709551617); 11199 END 11200 OUTPUT 11201 select substr('hello', -18446744073709551617, -18446744073709551617) from dual 11202 END 11203 INPUT 11204 select st_overlaps(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 11205 END 11206 OUTPUT 11207 select st_overlaps(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 11208 END 11209 INPUT 11210 select from (t4 natural join t5) natural join t1 where t4.y > 7; 11211 END 11212 ERROR 11213 syntax error at position 12 near 'from' 11214 END 11215 INPUT 11216 select hex(@a); 11217 END 11218 OUTPUT 11219 select hex(@a) from dual 11220 END 11221 INPUT 11222 select space(-1); 11223 END 11224 OUTPUT 11225 select space(-1) from dual 11226 END 11227 INPUT 11228 select from v1b join v2a on v1b.b = v2a.c; 11229 END 11230 ERROR 11231 syntax error at position 12 near 'from' 11232 END 11233 INPUT 11234 select space(4294967295); 11235 END 11236 OUTPUT 11237 select space(4294967295) from dual 11238 END 11239 INPUT 11240 select str_to_date('04 /30/2004', '%m /%d/%Y'); 11241 END 11242 OUTPUT 11243 select str_to_date('04 /30/2004', '%m /%d/%Y') from dual 11244 END 11245 INPUT 11246 select strcmp('�','af'),strcmp('a','�'),strcmp('��','aeq'),strcmp('��','aeaeq'); 11247 END 11248 OUTPUT 11249 select strcmp('�', 'af'), strcmp('a', '�'), strcmp('��', 'aeq'), strcmp('��', 'aeaeq') from dual 11250 END 11251 INPUT 11252 select from t1 where a=user(); 11253 END 11254 ERROR 11255 syntax error at position 12 near 'from' 11256 END 11257 INPUT 11258 select get_format(DATETIME, 'eur') as a; 11259 END 11260 OUTPUT 11261 select get_format(`DATETIME`, 'eur') as a from dual 11262 END 11263 INPUT 11264 select min(t1.a1), min(t2.a4) from t1,t2 where t1.a1 < 'KKK' and t2.a4 < 'KKK'; 11265 END 11266 OUTPUT 11267 select min(t1.a1), min(t2.a4) from t1, t2 where t1.a1 < 'KKK' and t2.a4 < 'KKK' 11268 END 11269 INPUT 11270 select max(7) from DUAL; 11271 END 11272 OUTPUT 11273 select max(7) from dual 11274 END 11275 INPUT 11276 select max(a3) from t1 where a2 = 2 and 'SEA' < a3; 11277 END 11278 OUTPUT 11279 select max(a3) from t1 where a2 = 2 and 'SEA' < a3 11280 END 11281 INPUT 11282 select log10(100),log10(18),log10(-4),log10(0),log10(NULL); 11283 END 11284 OUTPUT 11285 select log10(100), log10(18), log10(-4), log10(0), log10(null) from dual 11286 END 11287 INPUT 11288 select from t1 order by 1,2; 11289 END 11290 ERROR 11291 syntax error at position 12 near 'from' 11292 END 11293 INPUT 11294 select lpad(f1, 12, "-o-/") from t2; 11295 END 11296 OUTPUT 11297 select lpad(f1, 12, '-o-/') from t2 11298 END 11299 INPUT 11300 select from t1 where t1.a in (select a from t2) order by 1, 2; 11301 END 11302 ERROR 11303 syntax error at position 12 near 'from' 11304 END 11305 INPUT 11306 select locate('lo','hello',-4294967295); 11307 END 11308 OUTPUT 11309 select locate('lo', 'hello', -4294967295) from dual 11310 END 11311 INPUT 11312 select from t1 order by id; 11313 END 11314 ERROR 11315 syntax error at position 12 near 'from' 11316 END 11317 INPUT 11318 select round(sum(a)), count(*) from t1 group by a; 11319 END 11320 OUTPUT 11321 select round(sum(a)), count(*) from t1 group by a 11322 END 11323 INPUT 11324 select export_set(5, name, upper(name), ",", 5) from bug20536; 11325 END 11326 OUTPUT 11327 select export_set(5, `name`, upper(`name`), ',', 5) from bug20536 11328 END 11329 INPUT 11330 select cast("1:2:3" as TIME) = "1:02:03"; 11331 END 11332 OUTPUT 11333 select convert('1:2:3', TIME) = '1:02:03' from dual 11334 END 11335 INPUT 11336 select left('hello', -18446744073709551616); 11337 END 11338 OUTPUT 11339 select left('hello', -18446744073709551616) from dual 11340 END 11341 INPUT 11342 select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))'))); 11343 END 11344 OUTPUT 11345 select ST_astext(ST_Intersection(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))'))) from dual 11346 END 11347 INPUT 11348 select strcmp(concat(utc_date(),' ',utc_time()),utc_timestamp())=0; 11349 END 11350 OUTPUT 11351 select strcmp(concat(utc_date(), ' ', utc_time()), utc_timestamp()) = 0 from dual 11352 END 11353 INPUT 11354 select from t1 where match b against ('+aaaaaa @bbbbbb' in boolean mode); 11355 END 11356 ERROR 11357 syntax error at position 12 near 'from' 11358 END 11359 INPUT 11360 select hex(col1) from t1; 11361 END 11362 OUTPUT 11363 select hex(col1) from t1 11364 END 11365 INPUT 11366 select hex(char(1 using utf8mb4)); 11367 END 11368 ERROR 11369 syntax error at position 24 near 'using' 11370 END 11371 INPUT 11372 select left('hello',null), right('hello',null); 11373 END 11374 OUTPUT 11375 select left('hello', null), right('hello', null) from dual 11376 END 11377 INPUT 11378 select concat(':',trim(LEADING '.*' FROM '.*my'),':',trim(TRAILING '.*' FROM 'sql.*.*'),':'); 11379 END 11380 ERROR 11381 syntax error at position 41 near 'FROM' 11382 END 11383 INPUT 11384 select max(t1.a2) from t1 left outer join t2 on t1.a1=10; 11385 END 11386 OUTPUT 11387 select max(t1.a2) from t1 left join t2 on t1.a1 = 10 11388 END 11389 INPUT 11390 select a1,a2,b,min(c),max(c) from t1 where (c < 'k321') group by a1,a2,b; 11391 END 11392 OUTPUT 11393 select a1, a2, b, min(c), max(c) from t1 where c < 'k321' group by a1, a2, b 11394 END 11395 INPUT 11396 select get_lock('bug27638', 2); 11397 END 11398 OUTPUT 11399 select get_lock('bug27638', 2) from dual 11400 END 11401 INPUT 11402 select substring('hello', -4294967296, -4294967296); 11403 END 11404 OUTPUT 11405 select substr('hello', -4294967296, -4294967296) from dual 11406 END 11407 INPUT 11408 select t1.c1 as c2 from t1, t2 where t1.c2 = t2.c4 group by t1.c1; 11409 END 11410 OUTPUT 11411 select t1.c1 as c2 from t1, t2 where t1.c2 = t2.c4 group by t1.c1 11412 END 11413 INPUT 11414 select left('hello', 18446744073709551615); 11415 END 11416 OUTPUT 11417 select left('hello', 18446744073709551615) from dual 11418 END 11419 INPUT 11420 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_lithuanian_ci; 11421 END 11422 OUTPUT 11423 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_lithuanian_ci 11424 END 11425 INPUT 11426 select from t1 where id <=> value or value<=>id; 11427 END 11428 ERROR 11429 syntax error at position 12 near 'from' 11430 END 11431 INPUT 11432 select a1,a2,b, max(c) from t1 where (c > 'f123') group by a1,a2,b; 11433 END 11434 OUTPUT 11435 select a1, a2, b, max(c) from t1 where c > 'f123' group by a1, a2, b 11436 END 11437 INPUT 11438 select a1,a2,b, max(c) from t2 where (b = 'b') group by a1,a2; 11439 END 11440 OUTPUT 11441 select a1, a2, b, max(c) from t2 where b = 'b' group by a1, a2 11442 END 11443 INPUT 11444 select a, hex(a) from t1 order by a; 11445 END 11446 OUTPUT 11447 select a, hex(a) from t1 order by a asc 11448 END 11449 INPUT 11450 select t1.a as str, length(t1.a) as str_length, t2.a as pos, t2.a + 10 as length, insert(t1.a, t2.a, t2.a + 10, '1234567') as 'insert' from t1, t2; 11451 END 11452 ERROR 11453 syntax error at position 89 near 'insert' 11454 END 11455 INPUT 11456 select from mysql.slow_log; 11457 END 11458 ERROR 11459 syntax error at position 12 near 'from' 11460 END 11461 INPUT 11462 select substring('hello', -2, 1); 11463 END 11464 OUTPUT 11465 select substr('hello', -2, 1) from dual 11466 END 11467 INPUT 11468 select right('hello', 4294967296); 11469 END 11470 OUTPUT 11471 select right('hello', 4294967296) from dual 11472 END 11473 INPUT 11474 select 'Contains2'; 11475 END 11476 OUTPUT 11477 select 'Contains2' from dual 11478 END 11479 INPUT 11480 select min(a2), a1, max(a2), min(a2), a1 from t1 group by a1; 11481 END 11482 OUTPUT 11483 select min(a2), a1, max(a2), min(a2), a1 from t1 group by a1 11484 END 11485 INPUT 11486 select distinct b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; 11487 END 11488 OUTPUT 11489 select distinct b from t1 where a2 >= 'b' and b = 'a' group by a1, a2, b 11490 END 11491 INPUT 11492 select distinct a1 from t4 where pk_col not in (1,2,3,4); 11493 END 11494 OUTPUT 11495 select distinct a1 from t4 where pk_col not in (1, 2, 3, 4) 11496 END 11497 INPUT 11498 select a as 'x', t1.* as 'with_alias' from t1; 11499 END 11500 ERROR 11501 syntax error at position 25 near 'as' 11502 END 11503 INPUT 11504 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_romanian_ci; 11505 END 11506 OUTPUT 11507 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_romanian_ci 11508 END 11509 INPUT 11510 select format(atan(pi(), 0), 6); 11511 END 11512 OUTPUT 11513 select format(atan(pi(), 0), 6) from dual 11514 END 11515 INPUT 11516 select 9223372036854775807,-009223372036854775808; 11517 END 11518 OUTPUT 11519 select 9223372036854775807, -009223372036854775808 from dual 11520 END 11521 INPUT 11522 select TABLE_NAME from information_schema.tables where table_schema='test' order by TABLE_NAME; 11523 END 11524 OUTPUT 11525 select TABLE_NAME from information_schema.`tables` where table_schema = 'test' order by TABLE_NAME asc 11526 END 11527 INPUT 11528 select from ((t3 natural join (t1 natural join t2)) natural join t4) natural join t5; 11529 END 11530 ERROR 11531 syntax error at position 12 near 'from' 11532 END 11533 INPUT 11534 select t1.* from t t0 cross join t t1 join t t2 on 100=(select count(*) from t t3 left join t t4 on t4.a>t3.a-t0.a); 11535 END 11536 OUTPUT 11537 select t1.* from t as t0 join t as t1 join t as t2 on 100 = (select count(*) from t as t3 left join t as t4 on t4.a > t3.a - t0.a) 11538 END 11539 INPUT 11540 select d from (select a as d, 2*a as two from t) dt; 11541 END 11542 OUTPUT 11543 select d from (select a as d, 2 * a as two from t) as dt 11544 END 11545 INPUT 11546 select from t1 union distinct select from t2 union all select from t3; 11547 END 11548 ERROR 11549 syntax error at position 12 near 'from' 11550 END 11551 INPUT 11552 select "CASE" as "LOWER"; 11553 END 11554 OUTPUT 11555 select 'CASE' as LOWER from dual 11556 END 11557 INPUT 11558 select t1.*,t2.* from mysqltest_1.t1,mysqltest_1.t2; 11559 END 11560 OUTPUT 11561 select t1.*, t2.* from mysqltest_1.t1, mysqltest_1.t2 11562 END 11563 INPUT 11564 select unhex('5078-04-25'); 11565 END 11566 OUTPUT 11567 select unhex('5078-04-25') from dual 11568 END 11569 INPUT 11570 select ST_astext(g) from t1 where ST_Contains(ST_GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1), (5.01 3.01, 6 5, 9 5, 8 3, 5.01 3.01))'), g); 11571 END 11572 OUTPUT 11573 select ST_astext(g) from t1 where ST_Contains(ST_GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1), (5.01 3.01, 6 5, 9 5, 8 3, 5.01 3.01))'), g) 11574 END 11575 INPUT 11576 select week(19981231,0) as '0', week(19981231,1) as '1', week(19981231,2) as '2', week(19981231,3) as '3', week(19981231,4) as '4', week(19981231,5) as '5', week(19981231,6) as '6', week(19981231,7) as '7'; 11577 END 11578 OUTPUT 11579 select week(19981231, 0) as `0`, week(19981231, 1) as `1`, week(19981231, 2) as `2`, week(19981231, 3) as `3`, week(19981231, 4) as `4`, week(19981231, 5) as `5`, week(19981231, 6) as `6`, week(19981231, 7) as `7` from dual 11580 END 11581 INPUT 11582 select period_diff(-9223372036854775808,201902); 11583 END 11584 OUTPUT 11585 select period_diff(-9223372036854775808, 201902) from dual 11586 END 11587 INPUT 11588 select week(20001231),week(20001231,2),week(20001231,0); 11589 END 11590 OUTPUT 11591 select week(20001231), week(20001231, 2), week(20001231, 0) from dual 11592 END 11593 INPUT 11594 select date_add("1997-12-31 23:59:59",INTERVAL "1:1:1" HOUR_SECOND); 11595 END 11596 OUTPUT 11597 select date_add('1997-12-31 23:59:59', interval '1:1:1' HOUR_SECOND) from dual 11598 END 11599 INPUT 11600 select from v2a; 11601 END 11602 ERROR 11603 syntax error at position 12 near 'from' 11604 END 11605 INPUT 11606 select repeat('hello', -18446744073709551617); 11607 END 11608 OUTPUT 11609 select repeat('hello', -18446744073709551617) from dual 11610 END 11611 INPUT 11612 select concat(_latin1'a',_latin2'a',_latin5'a'); 11613 END 11614 OUTPUT 11615 select concat(_latin1 'a', _latin2 'a', _latin5 'a') from dual 11616 END 11617 INPUT 11618 select 1.0<=>0.0,0.0<=>NULL,NULL<=>0.0; 11619 END 11620 OUTPUT 11621 select 1.0 <=> 0.0, 0.0 <=> null, null <=> 0.0 from dual 11622 END 11623 INPUT 11624 select from t1 where a like '2004-03-11 12:00:21'; 11625 END 11626 ERROR 11627 syntax error at position 12 near 'from' 11628 END 11629 INPUT 11630 select _koi8r'a' COLLATE koi8r_general_ci = _koi8r'A'; 11631 END 11632 OUTPUT 11633 select _koi8r 'a' collate koi8r_general_ci = _koi8r 'A' from dual 11634 END 11635 INPUT 11636 select _koi8r'a' LIKE _koi8r'A' COLLATE koi8r_bin; 11637 END 11638 OUTPUT 11639 select _koi8r 'a' like _koi8r 'A' collate koi8r_bin from dual 11640 END 11641 INPUT 11642 select from t1 where str is not null order by id; 11643 END 11644 ERROR 11645 syntax error at position 12 near 'from' 11646 END 11647 INPUT 11648 select b + interval a day from t1; 11649 END 11650 OUTPUT 11651 select b + interval a day from t1 11652 END 11653 INPUT 11654 select 1, ST_Intersects(ST_GeomFromText('POLYGON((0 0,20 0,20 20,0 20,0 0))'), ST_GeomFromText('POLYGON((10 10,30 10,30 30,10 30,10 10))')); 11655 END 11656 OUTPUT 11657 select 1, ST_Intersects(ST_GeomFromText('POLYGON((0 0,20 0,20 20,0 20,0 0))'), ST_GeomFromText('POLYGON((10 10,30 10,30 30,10 30,10 10))')) from dual 11658 END 11659 INPUT 11660 select st_astext(st_union(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))); 11661 END 11662 OUTPUT 11663 select st_astext(st_union(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))) from dual 11664 END 11665 INPUT 11666 select _latin1'a' regexp _latin1'A' collate latin1_general_ci; 11667 END 11668 OUTPUT 11669 select _latin1 'a' regexp _latin1 'A' collate latin1_general_ci from dual 11670 END 11671 INPUT 11672 select timestamp("2001-12-01", "01:01:01.999999"); 11673 END 11674 OUTPUT 11675 select timestamp('2001-12-01', '01:01:01.999999') from dual 11676 END 11677 INPUT 11678 select hex(convert(0xFF using utf8mb4)); 11679 END 11680 OUTPUT 11681 select hex(convert(0xFF using utf8mb4)) from dual 11682 END 11683 INPUT 11684 select count(distinct if(f1,3,f2)) from t1; 11685 END 11686 OUTPUT 11687 select count(distinct if(f1, 3, f2)) from t1 11688 END 11689 INPUT 11690 select repeat(_utf8mb4'+',3) as h union select NULL; 11691 END 11692 OUTPUT 11693 select repeat(_utf8mb4 '+', 3) as h from dual union select null from dual 11694 END 11695 INPUT 11696 select insert('hello', -4294967295, -4294967295, 'hi'); 11697 END 11698 ERROR 11699 syntax error at position 14 near 'insert' 11700 END 11701 INPUT 11702 select strcmp('af','�'),strcmp('�','a'),strcmp('aeq','��'),strcmp('aeaeq','��'); 11703 END 11704 OUTPUT 11705 select strcmp('af', '�'), strcmp('�', 'a'), strcmp('aeq', '��'), strcmp('aeaeq', '��') from dual 11706 END 11707 INPUT 11708 select hex(_utf32 0x44); 11709 END 11710 OUTPUT 11711 select hex(_utf32 0x44) from dual 11712 END 11713 INPUT 11714 select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a; 11715 END 11716 OUTPUT 11717 select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a from dual 11718 END 11719 INPUT 11720 select a, MAX(b), INTERVAL (MAX(b), 1,3,10,30,39,40,50,60,100,1000) from t1 group by a; 11721 END 11722 ERROR 11723 syntax error at position 73 near 'from' 11724 END 11725 INPUT 11726 select d as e, two as f from v; 11727 END 11728 OUTPUT 11729 select d as e, two as f from v 11730 END 11731 INPUT 11732 select t2.fld3 FROM t2 where fld3 LIKE 'don_t_find_me_please%'; 11733 END 11734 OUTPUT 11735 select t2.fld3 from t2 where fld3 like 'don_t_find_me_please%' 11736 END 11737 INPUT 11738 select 1, max(1) from t1m where 1=99; 11739 END 11740 OUTPUT 11741 select 1, max(1) from t1m where 1 = 99 11742 END 11743 INPUT 11744 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_slovak_ci; 11745 END 11746 OUTPUT 11747 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_slovak_ci 11748 END 11749 INPUT 11750 select export_set(9,"Y","N","-",5),export_set(9,"Y","N"),export_set(9,"Y","N",""); 11751 END 11752 OUTPUT 11753 select export_set(9, 'Y', 'N', '-', 5), export_set(9, 'Y', 'N'), export_set(9, 'Y', 'N', '') from dual 11754 END 11755 INPUT 11756 select from t1 where a like '%PESKA%'; 11757 END 11758 ERROR 11759 syntax error at position 12 near 'from' 11760 END 11761 INPUT 11762 select from t1 where MATCH(a,b) AGAINST("+search" IN BOOLEAN MODE); 11763 END 11764 ERROR 11765 syntax error at position 12 near 'from' 11766 END 11767 INPUT 11768 select repeat('hello', 18446744073709551616); 11769 END 11770 OUTPUT 11771 select repeat('hello', 18446744073709551616) from dual 11772 END 11773 INPUT 11774 select a1, min(a2) from t1 group by a1; 11775 END 11776 OUTPUT 11777 select a1, min(a2) from t1 group by a1 11778 END 11779 INPUT 11780 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name = 'tm' and index_name = 'q' order by table_name; 11781 END 11782 OUTPUT 11783 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name = 'tm' and index_name = 'q' order by table_name asc 11784 END 11785 INPUT 11786 select ST_DISTANCE(ST_GeomFromText('linestring(0 0, 3 6, 6 3, 0 0)'), ST_GeomFromText('polygon((2 2, 3 4, 4 3, 2 2))')); 11787 END 11788 OUTPUT 11789 select ST_DISTANCE(ST_GeomFromText('linestring(0 0, 3 6, 6 3, 0 0)'), ST_GeomFromText('polygon((2 2, 3 4, 4 3, 2 2))')) from dual 11790 END 11791 INPUT 11792 select distinct t1_outer.a from t1 t1_outer order by (select max(t1_outer.b+t1_inner.b) from t1 t1_inner); 11793 END 11794 OUTPUT 11795 select distinct t1_outer.a from t1 as t1_outer order by (select max(t1_outer.b + t1_inner.b) from t1 as t1_inner) asc 11796 END 11797 INPUT 11798 select from slow_log; 11799 END 11800 ERROR 11801 syntax error at position 12 near 'from' 11802 END 11803 INPUT 11804 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name like 't%' and index_name = 'p' order by table_name; 11805 END 11806 OUTPUT 11807 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name like 't%' and index_name = 'p' order by table_name asc 11808 END 11809 INPUT 11810 select last_day('2000-02-05') as a, from_days(to_days("960101")) as b; 11811 END 11812 OUTPUT 11813 select last_day('2000-02-05') as a, from_days(to_days('960101')) as b from dual 11814 END 11815 INPUT 11816 select t1.*, t2.* from t1 natural join t2; 11817 END 11818 OUTPUT 11819 select t1.*, t2.* from t1 natural join t2 11820 END 11821 INPUT 11822 select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_NAME=''; 11823 END 11824 OUTPUT 11825 select count(*) from INFORMATION_SCHEMA.`TABLES` where TABLE_SCHEMA = '' and TABLE_NAME = '' 11826 END 11827 INPUT 11828 select insert('hello', 4294967297, 1, 'hi'); 11829 END 11830 ERROR 11831 syntax error at position 14 near 'insert' 11832 END 11833 INPUT 11834 select insert('hello', 18446744073709551617, 18446744073709551617, 'hi'); 11835 END 11836 ERROR 11837 syntax error at position 14 near 'insert' 11838 END 11839 INPUT 11840 select from t1 where a is null; 11841 END 11842 ERROR 11843 syntax error at position 12 near 'from' 11844 END 11845 INPUT 11846 select collation(soundex(_latin2'ab')), coercibility(soundex(_latin2'ab')); 11847 END 11848 OUTPUT 11849 select collation(soundex(_latin2 'ab')), coercibility(soundex(_latin2 'ab')) from dual 11850 END 11851 INPUT 11852 select distinct t1.a from t1, t2 where t1.b = t2.b order by 1; 11853 END 11854 OUTPUT 11855 select distinct t1.a from t1, t2 where t1.b = t2.b order by 1 asc 11856 END 11857 INPUT 11858 select ' вася' rlike '[[:<:]]вася[[:>:]]'; 11859 END 11860 OUTPUT 11861 select ' вася' regexp '[[:<:]]вася[[:>:]]' from dual 11862 END 11863 INPUT 11864 select POSITION(_latin1'B' IN _latin2'abcd'); 11865 END 11866 ERROR 11867 syntax error at position 38 near '_latin2' 11868 END 11869 INPUT 11870 select t1.id, t1.data, t2.data from t1, t2 where t1.id = t2.id order by t1.id; 11871 END 11872 OUTPUT 11873 select t1.id, t1.`data`, t2.`data` from t1, t2 where t1.id = t2.id order by t1.id asc 11874 END 11875 INPUT 11876 select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') group by a1,a2,b; 11877 END 11878 OUTPUT 11879 select a1, a2, b, min(c), max(c) from t1 where c < 'a0' group by a1, a2, b 11880 END 11881 INPUT 11882 select from t1 where not(a < 15 and a > 5); 11883 END 11884 ERROR 11885 syntax error at position 12 near 'from' 11886 END 11887 INPUT 11888 select from t1 where a=_koi8r'����'; 11889 END 11890 ERROR 11891 syntax error at position 12 near 'from' 11892 END 11893 INPUT 11894 select text1, length(text1) from t1 where text1='teststring' or text1 like 'teststring_%'; 11895 END 11896 OUTPUT 11897 select text1, length(text1) from t1 where text1 = 'teststring' or text1 like 'teststring_%' 11898 END 11899 INPUT 11900 select a1,a2,b, max(c) from t1 where (c > 'b1') group by a1,a2,b; 11901 END 11902 OUTPUT 11903 select a1, a2, b, max(c) from t1 where c > 'b1' group by a1, a2, b 11904 END 11905 INPUT 11906 select hex(weight_string('�')); 11907 END 11908 OUTPUT 11909 select hex(weight_string('�')) from dual 11910 END 11911 INPUT 11912 select CAST(0xfffffffffffffffe as signed); 11913 END 11914 OUTPUT 11915 select convert(0xfffffffffffffffe, signed) from dual 11916 END 11917 INPUT 11918 select release_lock('ee_16407_2'); 11919 END 11920 OUTPUT 11921 select release_lock('ee_16407_2') from dual 11922 END 11923 INPUT 11924 select insert('hello', 18446744073709551616, 18446744073709551616, 'hi'); 11925 END 11926 ERROR 11927 syntax error at position 14 near 'insert' 11928 END 11929 INPUT 11930 select date_add("1997-12-31 23:59:59.000002",INTERVAL "999999" MICROSECOND); 11931 END 11932 OUTPUT 11933 select date_add('1997-12-31 23:59:59.000002', interval '999999' MICROSECOND) from dual 11934 END 11935 INPUT 11936 select inet_aton("122.226."); 11937 END 11938 OUTPUT 11939 select inet_aton('122.226.') from dual 11940 END 11941 INPUT 11942 select from v1 where id=1000 group by id; 11943 END 11944 ERROR 11945 syntax error at position 12 near 'from' 11946 END 11947 INPUT 11948 select 1 from t1 order by 2; 11949 END 11950 OUTPUT 11951 select 1 from t1 order by 2 asc 11952 END 11953 INPUT 11954 select max(a) as b from t1 having b=1; 11955 END 11956 OUTPUT 11957 select max(a) as b from t1 having b = 1 11958 END 11959 INPUT 11960 select @invoked; 11961 END 11962 OUTPUT 11963 select @invoked from dual 11964 END 11965 INPUT 11966 select POSITION(_latin1'B' IN _latin1'abcd' COLLATE latin1_bin); 11967 END 11968 ERROR 11969 syntax error at position 38 near '_latin1' 11970 END 11971 INPUT 11972 select concat(a,'.') from t1 where a='aaa'; 11973 END 11974 OUTPUT 11975 select concat(a, '.') from t1 where a = 'aaa' 11976 END 11977 INPUT 11978 select from t1 where a = 2 or not(a < 5 or a > 15); 11979 END 11980 ERROR 11981 syntax error at position 12 near 'from' 11982 END 11983 INPUT 11984 select 'e'='`'; 11985 END 11986 OUTPUT 11987 select 'e' = '`' from dual 11988 END 11989 INPUT 11990 select min(7) from t2i join t1i; 11991 END 11992 OUTPUT 11993 select min(7) from t2i join t1i 11994 END 11995 INPUT 11996 select right('hello', 18446744073709551616); 11997 END 11998 OUTPUT 11999 select right('hello', 18446744073709551616) from dual 12000 END 12001 INPUT 12002 select mod(NULL, 2) as 'NULL'; 12003 END 12004 OUTPUT 12005 select mod(null, 2) as `NULL` from dual 12006 END 12007 INPUT 12008 select sql_small_result t2.id, avg(rating) from t2 group by t2.id; 12009 END 12010 ERROR 12011 syntax error at position 28 12012 END 12013 INPUT 12014 select mid('hello',1,null),mid('hello',null,1),mid(null,1,1); 12015 END 12016 OUTPUT 12017 select mid('hello', 1, null), mid('hello', null, 1), mid(null, 1, 1) from dual 12018 END 12019 INPUT 12020 select locate(_ujis 0xa2a1,_ujis 0xa1a2a1a3); 12021 END 12022 OUTPUT 12023 select locate(_ujis 0xa2a1, _ujis 0xa1a2a1a3) from dual 12024 END 12025 INPUT 12026 select a1,a2,b, max(c) from t2 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b; 12027 END 12028 OUTPUT 12029 select a1, a2, b, max(c) from t2 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1, a2, b 12030 END 12031 INPUT 12032 select min(a3) from t1 where a2 = 2 and a3 >= 'CHI'; 12033 END 12034 OUTPUT 12035 select min(a3) from t1 where a2 = 2 and a3 >= 'CHI' 12036 END 12037 INPUT 12038 select 1 as `a'b`, 2 as `a"b`; 12039 END 12040 OUTPUT 12041 select 1 as `a'b`, 2 as `a"b` from dual 12042 END 12043 INPUT 12044 select min(a) from t1m; 12045 END 12046 OUTPUT 12047 select min(a) from t1m 12048 END 12049 INPUT 12050 select ST_astext(ST_MPointFromWKB(ST_AsWKB(MultiPoint(Point('0', '0'),Point('-0', '0'), Point('0', '-0'))))) as result; 12051 END 12052 OUTPUT 12053 select ST_astext(ST_MPointFromWKB(ST_AsWKB(MultiPoint(Point('0', '0'), Point('-0', '0'), Point('0', '-0'))))) as result from dual 12054 END 12055 INPUT 12056 select IF(0,"ERROR","this"),IF(1,"is","ERROR"),IF(NULL,"ERROR","a"),IF(1,2,3)|0,IF(1,2.0,3.0)+0; 12057 END 12058 OUTPUT 12059 select if(0, 'ERROR', 'this'), if(1, 'is', 'ERROR'), if(null, 'ERROR', 'a'), if(1, 2, 3) | 0, if(1, 2.0, 3.0) + 0 from dual 12060 END 12061 INPUT 12062 select from t1 where a=if(b>10,_ucs2 0x0061,_ucs2 0x0062); 12063 END 12064 ERROR 12065 syntax error at position 12 near 'from' 12066 END 12067 INPUT 12068 select ST_Crosses(ST_GeomFromText('MULTIPOINT(1 0,15 0,10 10)'),ST_GeomFromText('MULTILINESTRING((15 0,20 0,20 20,15 0))')) as result; 12069 END 12070 OUTPUT 12071 select ST_Crosses(ST_GeomFromText('MULTIPOINT(1 0,15 0,10 10)'), ST_GeomFromText('MULTILINESTRING((15 0,20 0,20 20,15 0))')) as result from dual 12072 END 12073 INPUT 12074 select ST_AsText(a) from t1 where MBRContains(ST_GeomFromText('Polygon((0 0, 0 2, 2 2, 2 0, 0 0))'), a) or MBRContains(ST_GeomFromText('Polygon((2 2, 2 5, 5 5, 5 2, 2 2))'), a); 12075 END 12076 OUTPUT 12077 select ST_AsText(a) from t1 where MBRContains(ST_GeomFromText('Polygon((0 0, 0 2, 2 2, 2 0, 0 0))'), a) or MBRContains(ST_GeomFromText('Polygon((2 2, 2 5, 5 5, 5 2, 2 2))'), a) 12078 END 12079 INPUT 12080 select date_add("1997-12-31 23:59:59",INTERVAL "10000:1" DAY_HOUR); 12081 END 12082 OUTPUT 12083 select date_add('1997-12-31 23:59:59', interval '10000:1' DAY_HOUR) from dual 12084 END 12085 INPUT 12086 select st_contains(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 12087 END 12088 OUTPUT 12089 select st_contains(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 12090 END 12091 INPUT 12092 select hex(soundex(_ucs2 0x041004110412)); 12093 END 12094 OUTPUT 12095 select hex(soundex(_ucs2 0x041004110412)) from dual 12096 END 12097 INPUT 12098 select concat(a,if(b>10,_ucs2 0x0062,_ucs2 0x00C0)) from t1; 12099 END 12100 OUTPUT 12101 select concat(a, if(b > 10, _ucs2 0x0062, _ucs2 0x00C0)) from t1 12102 END 12103 INPUT 12104 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_slovenian_ci; 12105 END 12106 OUTPUT 12107 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_slovenian_ci 12108 END 12109 INPUT 12110 select insert('hello', 18446744073709551615, 1, 'hi'); 12111 END 12112 ERROR 12113 syntax error at position 14 near 'insert' 12114 END 12115 INPUT 12116 select (select d from t2 where d > a), t1.* as 'with_alias' from t1; 12117 END 12118 ERROR 12119 syntax error at position 47 near 'as' 12120 END 12121 INPUT 12122 select from t1,t2 natural right join t3 order by t1.i,t2.i,t3.i; 12123 END 12124 ERROR 12125 syntax error at position 12 near 'from' 12126 END 12127 INPUT 12128 select count(*) from t1 where match a against ('000000'); 12129 END 12130 ERROR 12131 syntax error at position 38 near 'a' 12132 END 12133 INPUT 12134 select hex(_utf16 0x113344); 12135 END 12136 OUTPUT 12137 select hex(_utf16 0x113344) from dual 12138 END 12139 INPUT 12140 select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b; 12141 END 12142 OUTPUT 12143 select a1, a2, b, min(c), max(c) from t1 where (a1 >= 'c' or a2 < 'b') and b > 'a' group by a1, a2, b 12144 END 12145 INPUT 12146 select concat(a, if(b>10, _utf8mb4'x', _utf8mb4'y')) from t1; 12147 END 12148 OUTPUT 12149 select concat(a, if(b > 10, _utf8mb4 'x', _utf8mb4 'y')) from t1 12150 END 12151 INPUT 12152 select make_set(0,'a','b','c'),make_set(-1,'a','b','c'),make_set(1,'a','b','c'),make_set(2,'a','b','c'),make_set(1+2,concat('a','b'),'c'); 12153 END 12154 OUTPUT 12155 select make_set(0, 'a', 'b', 'c'), make_set(-1, 'a', 'b', 'c'), make_set(1, 'a', 'b', 'c'), make_set(2, 'a', 'b', 'c'), make_set(1 + 2, concat('a', 'b'), 'c') from dual 12156 END 12157 INPUT 12158 select repeat('hello', -18446744073709551615); 12159 END 12160 OUTPUT 12161 select repeat('hello', -18446744073709551615) from dual 12162 END 12163 INPUT 12164 select t1.*, a, t1.* from t1; 12165 END 12166 OUTPUT 12167 select t1.*, a, t1.* from t1 12168 END 12169 INPUT 12170 select from ((t1 natural join t2), (t3 natural join t4)) natural join t6; 12171 END 12172 ERROR 12173 syntax error at position 12 near 'from' 12174 END 12175 INPUT 12176 select date_add("2001-01-01 23:59:59",INTERVAL -2000 YEAR); 12177 END 12178 OUTPUT 12179 select date_add('2001-01-01 23:59:59', interval (-2000) YEAR) from dual 12180 END 12181 INPUT 12182 select avg(2) from t1; 12183 END 12184 OUTPUT 12185 select avg(2) from t1 12186 END 12187 INPUT 12188 select substring_index('aaaaaaaaa1','aa',4); 12189 END 12190 OUTPUT 12191 select substring_index('aaaaaaaaa1', 'aa', 4) from dual 12192 END 12193 INPUT 12194 select st_disjoint(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 12195 END 12196 OUTPUT 12197 select st_disjoint(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 12198 END 12199 INPUT 12200 select cast(-5 as unsigned) -1, cast(-5 as unsigned) + 1; 12201 END 12202 OUTPUT 12203 select convert(-5, unsigned) - 1, convert(-5, unsigned) + 1 from dual 12204 END 12205 INPUT 12206 select hex(a) from t1; 12207 END 12208 OUTPUT 12209 select hex(a) from t1 12210 END 12211 INPUT 12212 select from t1 where MATCH a,b AGAINST ('"text search" +"now support"' IN BOOLEAN MODE); 12213 END 12214 ERROR 12215 syntax error at position 12 near 'from' 12216 END 12217 INPUT 12218 select trigger_name from information_schema.triggers where event_object_table='t1'; 12219 END 12220 OUTPUT 12221 select trigger_name from information_schema.`triggers` where event_object_table = 't1' 12222 END 12223 INPUT 12224 select group_concat(b order by b) from t1 group by a; 12225 END 12226 OUTPUT 12227 select group_concat(b order by b asc) from t1 group by a 12228 END 12229 INPUT 12230 select get_lock('mysqltest_lock', 100); 12231 END 12232 OUTPUT 12233 select get_lock('mysqltest_lock', 100) from dual 12234 END 12235 INPUT 12236 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_latvian_ci; 12237 END 12238 OUTPUT 12239 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_latvian_ci 12240 END 12241 INPUT 12242 select "a is a and less is more" as txt; 12243 END 12244 OUTPUT 12245 select 'a is a and less is more' as txt from dual 12246 END 12247 INPUT 12248 select CONVERT(_koi8r'����' USING utf8) LIKE CONVERT(_koi8r'����' USING utf8); 12249 END 12250 OUTPUT 12251 select convert(_koi8r '����' using utf8) like convert(_koi8r '����' using utf8) from dual 12252 END 12253 INPUT 12254 select - a from t1; 12255 END 12256 OUTPUT 12257 select -a from t1 12258 END 12259 INPUT 12260 select extract(DAY FROM "1999-01-02"); 12261 END 12262 OUTPUT 12263 select extract(day from '1999-01-02') from dual 12264 END 12265 INPUT 12266 select from t1, t2; 12267 END 12268 ERROR 12269 syntax error at position 12 near 'from' 12270 END 12271 INPUT 12272 select hex(_utf16 0x44); 12273 END 12274 OUTPUT 12275 select hex(_utf16 0x44) from dual 12276 END 12277 INPUT 12278 select ROUTINE_NAME from information_schema.routines where routine_schema='test'; 12279 END 12280 OUTPUT 12281 select ROUTINE_NAME from information_schema.routines where routine_schema = 'test' 12282 END 12283 INPUT 12284 select count(distinct n1,n2) from t1; 12285 END 12286 OUTPUT 12287 select count(distinct n1, n2) from t1 12288 END 12289 INPUT 12290 select date_sub("1998-01-01 00:00:00",INTERVAL "1:1:1" HOUR_SECOND); 12291 END 12292 OUTPUT 12293 select date_sub('1998-01-01 00:00:00', interval '1:1:1' HOUR_SECOND) from dual 12294 END 12295 INPUT 12296 select round(std(s1/s2), 17) from bug22555; 12297 END 12298 OUTPUT 12299 select round(std(s1 / s2), 17) from bug22555 12300 END 12301 INPUT 12302 select from t1 where MATCH(a,b) AGAINST("support collections" IN BOOLEAN MODE); 12303 END 12304 ERROR 12305 syntax error at position 12 near 'from' 12306 END 12307 INPUT 12308 select distinct t_00.a1 from t1 t_00 where exists ( select from t2 where a1 = t_00.a1 ); 12309 END 12310 ERROR 12311 syntax error at position 64 near 'from' 12312 END 12313 INPUT 12314 select locate('LO','hello' collate utf8mb4_bin,2); 12315 END 12316 OUTPUT 12317 select locate('LO', 'hello' collate utf8mb4_bin, 2) from dual 12318 END 12319 INPUT 12320 select table_name, column_name, data_type from information_schema.columns where table_schema = 'test' and table_name in ('t1', 't2'); 12321 END 12322 OUTPUT 12323 select table_name, column_name, data_type from information_schema.`columns` where table_schema = 'test' and table_name in ('t1', 't2') 12324 END 12325 INPUT 12326 select substring_index('aaaaaaaaa1','aa',3); 12327 END 12328 OUTPUT 12329 select substring_index('aaaaaaaaa1', 'aa', 3) from dual 12330 END 12331 INPUT 12332 select from information_schema.views where table_schema != 'sys' order by table_schema, table_name; 12333 END 12334 ERROR 12335 syntax error at position 12 near 'from' 12336 END 12337 INPUT 12338 select straight_join from t1,t2 force index (primary) where t1.a=t2.a; 12339 END 12340 ERROR 12341 syntax error at position 26 near 'from' 12342 END 12343 INPUT 12344 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_esperanto_ci; 12345 END 12346 OUTPUT 12347 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_esperanto_ci 12348 END 12349 INPUT 12350 select from t1,t2,t3 where t1.a=t2.a AND t2.b=t3.a and t1.b=t3.b order by t1.a,t1.b; 12351 END 12352 ERROR 12353 syntax error at position 12 near 'from' 12354 END 12355 INPUT 12356 select from t1 where btn like " %"; 12357 END 12358 ERROR 12359 syntax error at position 12 near 'from' 12360 END 12361 INPUT 12362 select hex(substr(_utf16 0x00e400e50068,1)); 12363 END 12364 OUTPUT 12365 select hex(substr(_utf16 0x00e400e50068, 1)) from dual 12366 END 12367 INPUT 12368 select concat(a, if(b>10, _utf8 0x78, _utf8 0x79)) from t1; 12369 END 12370 OUTPUT 12371 select concat(a, if(b > 10, _utf8 0x78, _utf8 0x79)) from t1 12372 END 12373 INPUT 12374 select cast(19999999999999999999 as signed); 12375 END 12376 OUTPUT 12377 select convert(19999999999999999999, signed) from dual 12378 END 12379 INPUT 12380 select group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a) desc) as grp from t1; 12381 END 12382 OUTPUT 12383 select group_concat(c order by (select mid(group_concat(c order by a asc), 1, 5) from t2 where t2.a = t1.a) desc) as grp from t1 12384 END 12385 INPUT 12386 select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join t1 c on b.id = c.thread where match(b.betreff) against ('+abc' in boolean mode) union select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join t1 c on b.id = c.thread where match(c.beitrag) against ('+abc' in boolean mode) order by match(betreff) against ('+abc' in boolean mode) desc; 12387 END 12388 OUTPUT 12389 select a.`text`, b.id, b.betreff from t2 as a join t3 as b on a.id = b.forum join t1 as c on b.id = c.thread where match(b.betreff) against ('+abc' in boolean mode) union select a.`text`, b.id, b.betreff from t2 as a join t3 as b on a.id = b.forum join t1 as c on b.id = c.thread where match(c.beitrag) against ('+abc' in boolean mode) order by match(betreff) against ('+abc' in boolean mode) desc 12390 END 12391 INPUT 12392 select @a; 12393 END 12394 OUTPUT 12395 select @a from dual 12396 END 12397 INPUT 12398 select left('hello', 0); 12399 END 12400 OUTPUT 12401 select left('hello', 0) from dual 12402 END 12403 INPUT 12404 select date,format,DATE(str_to_date(date, format)) as date2 from t1; 12405 END 12406 OUTPUT 12407 select `date`, `format`, DATE(str_to_date(`date`, `format`)) as date2 from t1 12408 END 12409 INPUT 12410 select FIND_IN_SET(_latin1'B' COLLATE latin1_bin,_latin1'a,b,c,d'); 12411 END 12412 OUTPUT 12413 select FIND_IN_SET(_latin1 'B' collate latin1_bin, _latin1 'a,b,c,d') from dual 12414 END 12415 INPUT 12416 select position(binary 'll' in 'hello'),position('a' in binary 'hello'); 12417 END 12418 ERROR 12419 syntax error at position 39 near 'hello' 12420 END 12421 INPUT 12422 select CAST('10 ' as unsigned integer); 12423 END 12424 OUTPUT 12425 select convert('10 ', unsigned) from dual 12426 END 12427 INPUT 12428 select a,c,(select group_concat(c order by a) from t2 where a=t1.a) as grp from t1 order by grp; 12429 END 12430 OUTPUT 12431 select a, c, (select group_concat(c order by a asc) from t2 where a = t1.a) as grp from t1 order by grp asc 12432 END 12433 INPUT 12434 select cast('a10' as unsigned integer); 12435 END 12436 OUTPUT 12437 select convert('a10', unsigned) from dual 12438 END 12439 INPUT 12440 select a as like_llll from t1 where a like 'llll%'; 12441 END 12442 OUTPUT 12443 select a as like_llll from t1 where a like 'llll%' 12444 END 12445 INPUT 12446 select format(col2,6) from t1 where col1=7; 12447 END 12448 OUTPUT 12449 select format(col2, 6) from t1 where col1 = 7 12450 END 12451 INPUT 12452 select locate("a","b",2),locate("","a",1); 12453 END 12454 OUTPUT 12455 select locate('a', 'b', 2), locate('', 'a', 1) from dual 12456 END 12457 INPUT 12458 select from t3 right join t2 on (t3.i=t2.i) right join t1 on (t2.i=t1.i); 12459 END 12460 ERROR 12461 syntax error at position 12 near 'from' 12462 END 12463 INPUT 12464 select db, table_name, table_priv from mysql.tables_priv where user='mysqluser10' and host='localhost'; 12465 END 12466 OUTPUT 12467 select db, table_name, table_priv from mysql.tables_priv where `user` = 'mysqluser10' and host = 'localhost' 12468 END 12469 INPUT 12470 select std(o1/o2) from bug22555; 12471 END 12472 OUTPUT 12473 select std(o1 / o2) from bug22555 12474 END 12475 INPUT 12476 select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('polygon((1 1, 1 0, 2 0, 1 1))')); 12477 END 12478 OUTPUT 12479 select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('polygon((1 1, 1 0, 2 0, 1 1))')) from dual 12480 END 12481 INPUT 12482 select t1.* as 'with_alias', (select a from t2 where d > a) from t1; 12483 END 12484 ERROR 12485 syntax error at position 15 near 'as' 12486 END 12487 INPUT 12488 select hex(weight_string(_utf32 0x10000 collate utf32_unicode_ci)); 12489 END 12490 OUTPUT 12491 select hex(weight_string(_utf32 0x10000 collate utf32_unicode_ci)) from dual 12492 END 12493 INPUT 12494 select mbrcoveredby(ST_GeomFromText("point(2 4)"), ST_GeomFromText("polygon((2 2, 10 2, 10 10, 2 10, 2 2))")); 12495 END 12496 OUTPUT 12497 select mbrcoveredby(ST_GeomFromText('point(2 4)'), ST_GeomFromText('polygon((2 2, 10 2, 10 10, 2 10, 2 2))')) from dual 12498 END 12499 INPUT 12500 select date,format,str_to_date(date, format) as str_to_date from t1; 12501 END 12502 OUTPUT 12503 select `date`, `format`, str_to_date(`date`, `format`) as str_to_date from t1 12504 END 12505 INPUT 12506 select ST_astext(st_symdifference(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_difference(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); 12507 END 12508 OUTPUT 12509 select ST_astext(st_symdifference(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_difference(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual 12510 END 12511 INPUT 12512 select user() like _latin1"%@%"; 12513 END 12514 OUTPUT 12515 select user() like _latin1 '%@%' from dual 12516 END 12517 INPUT 12518 select table_name from tables where table_name='user'; 12519 END 12520 OUTPUT 12521 select table_name from `tables` where table_name = 'user' 12522 END 12523 INPUT 12524 select rpad('abcd',7,'ab'),lpad('abcd',7,'ab'); 12525 END 12526 OUTPUT 12527 select rpad('abcd', 7, 'ab'), lpad('abcd', 7, 'ab') from dual 12528 END 12529 INPUT 12530 select from t1 where soundex(a) = soundex('TEST'); 12531 END 12532 ERROR 12533 syntax error at position 12 near 'from' 12534 END 12535 INPUT 12536 select hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)); 12537 END 12538 OUTPUT 12539 select hex(soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)) from dual 12540 END 12541 INPUT 12542 select count(*) from t1 where facility = NULL; 12543 END 12544 OUTPUT 12545 select count(*) from t1 where facility = null 12546 END 12547 INPUT 12548 select distinct b.id, b.betreff from t3 b order by match(betreff) against ('+abc' in boolean mode) desc; 12549 END 12550 OUTPUT 12551 select distinct b.id, b.betreff from t3 as b order by match(betreff) against ('+abc' in boolean mode) desc 12552 END 12553 INPUT 12554 select _latin1 0xF7 regexp _latin1 '[[:alpha:]]'; 12555 END 12556 OUTPUT 12557 select _latin1 0xF7 regexp _latin1 '[[:alpha:]]' from dual 12558 END 12559 INPUT 12560 select reverse(""); 12561 END 12562 OUTPUT 12563 select reverse('') from dual 12564 END 12565 INPUT 12566 select t2.fld3 FROM t2 where fld3 LIKE 'hon_ysuckl_'; 12567 END 12568 OUTPUT 12569 select t2.fld3 from t2 where fld3 like 'hon_ysuckl_' 12570 END 12571 INPUT 12572 select count(*) from information_schema.ROUTINES where routine_schema='test'; 12573 END 12574 OUTPUT 12575 select count(*) from information_schema.ROUTINES where routine_schema = 'test' 12576 END 12577 INPUT 12578 select from ((t3 join (t1 join t2 on c > a) on t3.b < t2.a) join t4 on y > t1.c) join t5 on z = t1.b + 3; 12579 END 12580 ERROR 12581 syntax error at position 12 near 'from' 12582 END 12583 INPUT 12584 select cast(_latin1'test' as char character set latin2); 12585 END 12586 OUTPUT 12587 select convert(_latin1 'test', char character set latin2) from dual 12588 END 12589 INPUT 12590 select ST_DISTANCE(ST_GeomFromText('polygon((0 0, 1 2, 2 1, 0 0))'), ST_GeomFromText('polygon((2 2, 3 4, 4 3, 2 2))')); 12591 END 12592 OUTPUT 12593 select ST_DISTANCE(ST_GeomFromText('polygon((0 0, 1 2, 2 1, 0 0))'), ST_GeomFromText('polygon((2 2, 3 4, 4 3, 2 2))')) from dual 12594 END 12595 INPUT 12596 select p from t1; 12597 END 12598 OUTPUT 12599 select p from t1 12600 END 12601 INPUT 12602 select @arg00 FROM t1 where a=1 union distinct select 1 FROM t1 where a=1; 12603 END 12604 OUTPUT 12605 select @arg00 from t1 where a = 1 union select 1 from t1 where a = 1 12606 END 12607 INPUT 12608 select @@max_sort_length; 12609 END 12610 OUTPUT 12611 select @@max_sort_length from dual 12612 END 12613 INPUT 12614 select routine_name, routine_type from information_schema.routines where routine_schema = 'test'; 12615 END 12616 OUTPUT 12617 select routine_name, routine_type from information_schema.routines where routine_schema = 'test' 12618 END 12619 INPUT 12620 select insert(_utf16 0x006100620063,1,2,_utf16 0x006400650066); 12621 END 12622 ERROR 12623 syntax error at position 14 near 'insert' 12624 END 12625 INPUT 12626 select length(_utf8 0xD0B1), bit_length(_utf8 0xD0B1), char_length(_utf8 0xD0B1); 12627 END 12628 OUTPUT 12629 select length(_utf8 0xD0B1), bit_length(_utf8 0xD0B1), char_length(_utf8 0xD0B1) from dual 12630 END 12631 INPUT 12632 select @@keycache1.key_buffer_size; 12633 END 12634 OUTPUT 12635 select @@keycache1.key_buffer_size from dual 12636 END 12637 INPUT 12638 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_polish_ci; 12639 END 12640 OUTPUT 12641 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_polish_ci 12642 END 12643 INPUT 12644 select make_set(NULL,'a','b','c'),make_set(1|4,'a',NULL,'c'),make_set(1+2,'a',NULL,'c'); 12645 END 12646 OUTPUT 12647 select make_set(null, 'a', 'b', 'c'), make_set(1 | 4, 'a', null, 'c'), make_set(1 + 2, 'a', null, 'c') from dual 12648 END 12649 INPUT 12650 select log10(-1); 12651 END 12652 OUTPUT 12653 select log10(-1) from dual 12654 END 12655 INPUT 12656 select a from t1 where mid(a+0,6,3) = ( mid(20040106123400,6,3) ); 12657 END 12658 OUTPUT 12659 select a from t1 where mid(a + 0, 6, 3) = mid(20040106123400, 6, 3) 12660 END 12661 INPUT 12662 select concat('',str_to_date('8:11:2.123456 03-01-02','%H:%i:%S.%f %y-%m-%d')); 12663 END 12664 OUTPUT 12665 select concat('', str_to_date('8:11:2.123456 03-01-02', '%H:%i:%S.%f %y-%m-%d')) from dual 12666 END 12667 INPUT 12668 select locate('he','hello'),locate('he','hello',2),locate('lo','hello',2); 12669 END 12670 OUTPUT 12671 select locate('he', 'hello'), locate('he', 'hello', 2), locate('lo', 'hello', 2) from dual 12672 END 12673 INPUT 12674 select format(pi(), @dec); 12675 END 12676 OUTPUT 12677 select format(pi(), @`dec`) from dual 12678 END 12679 INPUT 12680 select strcmp(localtime(),concat(current_date()," ",current_time())); 12681 END 12682 OUTPUT 12683 select strcmp(localtime(), concat(current_date(), ' ', current_time())) from dual 12684 END 12685 INPUT 12686 select from t1 a, t1 b group by a.s1 having s1 is null; 12687 END 12688 ERROR 12689 syntax error at position 12 near 'from' 12690 END 12691 INPUT 12692 select benchmark(10, pi()); 12693 END 12694 OUTPUT 12695 select benchmark(10, pi()) from dual 12696 END 12697 INPUT 12698 select "Test 'go' command(vertical output) G" as "_"; 12699 END 12700 OUTPUT 12701 select 'Test \'go\' command(vertical output) G' as _ from dual 12702 END 12703 INPUT 12704 select ifnull(load_file("lkjlkj"),"it is null"); 12705 END 12706 OUTPUT 12707 select ifnull(load_file('lkjlkj'), 'it is null') from dual 12708 END 12709 INPUT 12710 select "a "="A", "A "="a", "a " <= "A b"; 12711 END 12712 OUTPUT 12713 select 'a ' = 'A', 'A ' = 'a', 'a ' <= 'A b' from dual 12714 END 12715 INPUT 12716 select a1,a2, max(c) from t2 where (b = 'b') group by a1,a2; 12717 END 12718 OUTPUT 12719 select a1, a2, max(c) from t2 where b = 'b' group by a1, a2 12720 END 12721 INPUT 12722 select t1.*,t2.* from t1 left join t2 using (c); 12723 END 12724 OUTPUT 12725 select t1.*, t2.* from t1 left join t2 using (c) 12726 END 12727 INPUT 12728 select into outfile 'test/t1.txt' from t1; 12729 END 12730 ERROR 12731 syntax error at position 12 near 'into' 12732 END 12733 INPUT 12734 select a.f1 as a, b.f4 as b, a.f1 > b.f4 as gt, a.f1 < b.f4 as lt, a.f1<=>b.f4 as eq from t1 a, t1 b; 12735 END 12736 OUTPUT 12737 select a.f1 as a, b.f4 as b, a.f1 > b.f4 as gt, a.f1 < b.f4 as lt, a.f1 <=> b.f4 as eq from t1 as a, t1 as b 12738 END 12739 INPUT 12740 select v,count(*) from t1 group by v order by v limit 9; 12741 END 12742 OUTPUT 12743 select v, count(*) from t1 group by v order by v asc limit 9 12744 END 12745 INPUT 12746 select t1.* as 'with_alias', a, t1.* as 'alias2' from t1; 12747 END 12748 ERROR 12749 syntax error at position 15 near 'as' 12750 END 12751 INPUT 12752 select locate('LO','hello' collate ujis_bin,2); 12753 END 12754 OUTPUT 12755 select locate('LO', 'hello' collate ujis_bin, 2) from dual 12756 END 12757 INPUT 12758 select from t1 where f1='test' and (f2= sha("TEST") or f2= sha("test")); 12759 END 12760 ERROR 12761 syntax error at position 12 near 'from' 12762 END 12763 INPUT 12764 select hex(substr(_utf16 0x00e400e50068,3)); 12765 END 12766 OUTPUT 12767 select hex(substr(_utf16 0x00e400e50068, 3)) from dual 12768 END 12769 INPUT 12770 select @@sql_mode into @full_mode; 12771 END 12772 ERROR 12773 syntax error at position 34 near 'full_mode' 12774 END 12775 INPUT 12776 select @a, @b; 12777 END 12778 OUTPUT 12779 select @a, @b from dual 12780 END 12781 INPUT 12782 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_czech_ci; 12783 END 12784 OUTPUT 12785 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_czech_ci 12786 END 12787 INPUT 12788 select var_samp(o), var_pop(o) from bug22555; 12789 END 12790 OUTPUT 12791 select var_samp(o), var_pop(o) from bug22555 12792 END 12793 INPUT 12794 select version()>=_utf8"3.23.29"; 12795 END 12796 OUTPUT 12797 select version() >= _utf8 '3.23.29' from dual 12798 END 12799 INPUT 12800 select table_name, column_name, privileges from information_schema.columns where table_schema = 'mysqltest' and table_name = 'v1' order by table_name, column_name; 12801 END 12802 OUTPUT 12803 select table_name, column_name, `privileges` from information_schema.`columns` where table_schema = 'mysqltest' and table_name = 'v1' order by table_name asc, column_name asc 12804 END 12805 INPUT 12806 select from t1 order by a,b; 12807 END 12808 ERROR 12809 syntax error at position 12 near 'from' 12810 END 12811 INPUT 12812 select date_add("1997-12-31 23:59:59",INTERVAL -100000 DAY); 12813 END 12814 OUTPUT 12815 select date_add('1997-12-31 23:59:59', interval (-100000) DAY) from dual 12816 END 12817 INPUT 12818 select dummy1,count(distinct id) from t1 group by dummy1; 12819 END 12820 OUTPUT 12821 select dummy1, count(distinct id) from t1 group by dummy1 12822 END 12823 INPUT 12824 select distinct sum(b) from t1 group by a; 12825 END 12826 OUTPUT 12827 select distinct sum(b) from t1 group by a 12828 END 12829 INPUT 12830 select t1.* as 'with_alias' from t1; 12831 END 12832 ERROR 12833 syntax error at position 15 near 'as' 12834 END 12835 INPUT 12836 select round(1.5, -9223372036854775808), round(1.5, 9223372036854775808); 12837 END 12838 OUTPUT 12839 select round(1.5, -9223372036854775808), round(1.5, 9223372036854775808) from dual 12840 END 12841 INPUT 12842 select t1.*,t2.* from t1 left join t2 using (a,c); 12843 END 12844 OUTPUT 12845 select t1.*, t2.* from t1 left join t2 using (a, c) 12846 END 12847 INPUT 12848 select substring('hello', -4294967297, 1); 12849 END 12850 OUTPUT 12851 select substr('hello', -4294967297, 1) from dual 12852 END 12853 INPUT 12854 select a1,a2,b,min(c),max(c) from t2 where ((c > 'b111') and (c <= 'g112')) or ((c > 'd000') and (c <= 'i110')) group by a1,a2,b; 12855 END 12856 OUTPUT 12857 select a1, a2, b, min(c), max(c) from t2 where c > 'b111' and c <= 'g112' or c > 'd000' and c <= 'i110' group by a1, a2, b 12858 END 12859 INPUT 12860 select _latin1'B' in (_latin1'a',_latin1'b' collate latin1_bin); 12861 END 12862 OUTPUT 12863 select _latin1 'B' in (_latin1 'a', _latin1 'b' collate latin1_bin) from dual 12864 END 12865 INPUT 12866 select from t1 where a is null and b=2; 12867 END 12868 ERROR 12869 syntax error at position 12 near 'from' 12870 END 12871 INPUT 12872 select a, left(a,1) as b from t1 group by a; 12873 END 12874 OUTPUT 12875 select a, left(a, 1) as b from t1 group by a 12876 END 12877 INPUT 12878 select @@keycache2.key_buffer_size; 12879 END 12880 OUTPUT 12881 select @@keycache2.key_buffer_size from dual 12882 END 12883 INPUT 12884 select from t1 where MATCH(a,b) AGAINST ("indexes collections"); 12885 END 12886 ERROR 12887 syntax error at position 12 near 'from' 12888 END 12889 INPUT 12890 select _latin2'B' between _latin1'a' and _latin1'b'; 12891 END 12892 OUTPUT 12893 select _latin2 'B' between _latin1 'a' and _latin1 'b' from dual 12894 END 12895 INPUT 12896 select release_lock('bug27638'); 12897 END 12898 OUTPUT 12899 select release_lock('bug27638') from dual 12900 END 12901 INPUT 12902 select hex(weight_string('s')); 12903 END 12904 OUTPUT 12905 select hex(weight_string('s')) from dual 12906 END 12907 INPUT 12908 select locate('lo','hello',-18446744073709551616); 12909 END 12910 OUTPUT 12911 select locate('lo', 'hello', -18446744073709551616) from dual 12912 END 12913 INPUT 12914 select collation(cast('a' as char(2))), collation(cast('a' as char(2) binary)); 12915 END 12916 ERROR 12917 syntax error at position 77 near 'binary' 12918 END 12919 INPUT 12920 select from v1d join v2a on v1d.a = v2a.c; 12921 END 12922 ERROR 12923 syntax error at position 12 near 'from' 12924 END 12925 INPUT 12926 select t2.isbn,city,t1.libname,count(distinct t1.libname) as a from t3 left join t1 on t3.libname=t1.libname left join t2 on t3.isbn=t2.isbn group by city having count(distinct concat(t1.libname,'a')) > 1; 12927 END 12928 OUTPUT 12929 select t2.isbn, city, t1.libname, count(distinct t1.libname) as a from t3 left join t1 on t3.libname = t1.libname left join t2 on t3.isbn = t2.isbn group by city having count(distinct concat(t1.libname, 'a')) > 1 12930 END 12931 INPUT 12932 select concat("a",NULL),replace(NULL,"a","b"),replace("string","i",NULL),replace("string",NULL,"i"),insert("abc",1,1,NULL),left(NULL,1); 12933 END 12934 ERROR 12935 syntax error at position 107 near 'insert' 12936 END 12937 INPUT 12938 select substring_index('aaaaaaaaa1','1',1); 12939 END 12940 OUTPUT 12941 select substring_index('aaaaaaaaa1', '1', 1) from dual 12942 END 12943 INPUT 12944 select distinct n1 from t1; 12945 END 12946 OUTPUT 12947 select distinct n1 from t1 12948 END 12949 INPUT 12950 select c1,c2,c3,c4,hex(c5) from t1; 12951 END 12952 OUTPUT 12953 select c1, c2, c3, c4, hex(c5) from t1 12954 END 12955 INPUT 12956 select from t2 where MATCH inhalt AGAINST (NULL); 12957 END 12958 ERROR 12959 syntax error at position 12 near 'from' 12960 END 12961 INPUT 12962 select table_name from information_schema.tables where table_schema = 'test' and table_name not in (select table_name from information_schema.columns where table_schema = 'test' and column_name = 'f3') order by table_name; 12963 END 12964 OUTPUT 12965 select table_name from information_schema.`tables` where table_schema = 'test' and table_name not in (select table_name from information_schema.`columns` where table_schema = 'test' and column_name = 'f3') order by table_name asc 12966 END 12967 INPUT 12968 select (select t2.* as 'x' from t2) from t1; 12969 END 12970 ERROR 12971 syntax error at position 23 near 'as' 12972 END 12973 INPUT 12974 select group_concat(b) from t1 group by a; 12975 END 12976 OUTPUT 12977 select group_concat(b) from t1 group by a 12978 END 12979 INPUT 12980 select from (select from t1 where t1.a=(select t2.a from t2 where t2.a=t1.a) union select t1.a, t1.b from t1) a; 12981 END 12982 ERROR 12983 syntax error at position 12 near 'from' 12984 END 12985 INPUT 12986 select @@character_set_client; 12987 END 12988 OUTPUT 12989 select @@character_set_client from dual 12990 END 12991 INPUT 12992 select from t1 limit 0; 12993 END 12994 ERROR 12995 syntax error at position 12 near 'from' 12996 END 12997 INPUT 12998 select uncompressed_length(compress(@test_compress_string))=length(@test_compress_string); 12999 END 13000 OUTPUT 13001 select uncompressed_length(compress(@test_compress_string)) = length(@test_compress_string) from dual 13002 END 13003 INPUT 13004 select from t1 natural join (t4 natural join t5) where t4.y > 7; 13005 END 13006 ERROR 13007 syntax error at position 12 near 'from' 13008 END 13009 INPUT 13010 select a1,a2,b,max(c) from t2 where (a2 = 'a') and b is NULL group by a1; 13011 END 13012 OUTPUT 13013 select a1, a2, b, max(c) from t2 where a2 = 'a' and b is null group by a1 13014 END 13015 INPUT 13016 select round(999999999, -9); 13017 END 13018 OUTPUT 13019 select round(999999999, -9) from dual 13020 END 13021 INPUT 13022 select from_unixtime(unix_timestamp("1994-03-02 10:11:12")),from_unixtime(unix_timestamp("1994-03-02 10:11:12"),"%Y-%m-%d %h:%i:%s"),from_unixtime(unix_timestamp("1994-03-02 10:11:12"))+0; 13023 END 13024 OUTPUT 13025 select from_unixtime(unix_timestamp('1994-03-02 10:11:12')), from_unixtime(unix_timestamp('1994-03-02 10:11:12'), '%Y-%m-%d %h:%i:%s'), from_unixtime(unix_timestamp('1994-03-02 10:11:12')) + 0 from dual 13026 END 13027 INPUT 13028 select event_schema, event_name, sql_mode from information_schema.events order by event_schema, event_name; 13029 END 13030 OUTPUT 13031 select event_schema, event_name, sql_mode from information_schema.events order by event_schema asc, event_name asc 13032 END 13033 INPUT 13034 select char(0xff,0x8f using utf8mb4); 13035 END 13036 ERROR 13037 syntax error at position 28 near 'using' 13038 END 13039 INPUT 13040 select a, group_concat(b) from t1 group by a with rollup; 13041 END 13042 ERROR 13043 syntax error at position 50 near 'with' 13044 END 13045 INPUT 13046 select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es'); 13047 END 13048 ERROR 13049 syntax error at position 14 near 'insert' 13050 END 13051 INPUT 13052 select ifnull(A, 'N') as A, ifnull(B, 'N') as B, ifnull(not A, 'N') as nA, ifnull(not B, 'N') as nB, ifnull(A and B, 'N') as AB, ifnull(not (A and B), 'N') as `n(AB)`, ifnull((not A or not B), 'N') as nAonB, ifnull(A or B, 'N') as AoB, ifnull(not(A or B), 'N') as `n(AoB)`, ifnull(not A and not B, 'N') as nAnB from t1; 13053 END 13054 OUTPUT 13055 select ifnull(A, 'N') as A, ifnull(B, 'N') as B, ifnull(not A, 'N') as nA, ifnull(not B, 'N') as nB, ifnull(A and B, 'N') as AB, ifnull(not (A and B), 'N') as `n(AB)`, ifnull(not A or not B, 'N') as nAonB, ifnull(A or B, 'N') as AoB, ifnull(not (A or B), 'N') as `n(AoB)`, ifnull(not A and not B, 'N') as nAnB from t1 13056 END 13057 INPUT 13058 select *, uncompress(a) from t1; 13059 END 13060 OUTPUT 13061 select *, uncompress(a) from t1 13062 END 13063 INPUT 13064 select extract(MINUTE_MICROSECOND FROM "1999-01-02 10:11:12.000123"); 13065 END 13066 OUTPUT 13067 select extract(minute_microsecond from '1999-01-02 10:11:12.000123') from dual 13068 END 13069 INPUT 13070 select charset(max(a)), coercibility(max(a)), charset(min(a)), coercibility(min(a)) from t1; 13071 END 13072 OUTPUT 13073 select charset(max(a)), coercibility(max(a)), charset(min(a)), coercibility(min(a)) from t1 13074 END 13075 INPUT 13076 select collation(trim(LEADING _latin2' ' FROM _latin2'a')), coercibility(trim(LEADING _latin2'a' FROM _latin2'a')); 13077 END 13078 ERROR 13079 syntax error at position 38 near '_latin2' 13080 END 13081 INPUT 13082 select from t1 AS m LEFT JOIN t2 AS c1 ON m.c1id = c1.id AND c1.active = 'Yes' LEFT JOIN t3 AS c2 ON m.c2id = c2.id AND c2.active = 'Yes' WHERE m.pid=1 AND (c1.id IS NOT NULL OR c2.id IS NOT NULL); 13083 END 13084 ERROR 13085 syntax error at position 12 near 'from' 13086 END 13087 INPUT 13088 select id, stddev_pop(value1), var_pop(value1), stddev_samp(value1), var_samp(value1) from t1 group by id; 13089 END 13090 OUTPUT 13091 select id, stddev_pop(value1), var_pop(value1), stddev_samp(value1), var_samp(value1) from t1 group by id 13092 END 13093 INPUT 13094 select extract(YEAR FROM "1999-01-02 10:11:12"); 13095 END 13096 OUTPUT 13097 select extract(year from '1999-01-02 10:11:12') from dual 13098 END 13099 INPUT 13100 select c,table_name from v1 inner join information_schema.TABLES v2 on (v1.c=v2.table_name) where v1.c rlike "t[1-5]{1}$" order by c; 13101 END 13102 OUTPUT 13103 select c, table_name from v1 join information_schema.`TABLES` as v2 on v1.c = v2.table_name where v1.c regexp 't[1-5]{1}$' order by c asc 13104 END 13105 INPUT 13106 select from t1 natural join t2 where t1.b > 0; 13107 END 13108 ERROR 13109 syntax error at position 12 near 'from' 13110 END 13111 INPUT 13112 select 0x00b25278956e0044683dfc180cd886aeff2f5bc3fc18 like '%-122%'; 13113 END 13114 OUTPUT 13115 select 0x00b25278956e0044683dfc180cd886aeff2f5bc3fc18 like '%-122%' from dual 13116 END 13117 INPUT 13118 select HEX(0x19c9bbcce9e0a88f5212572b0c5b9e6d0 | _binary 0x13c19e5cfdf03b19518cbe3d65faf10d2), HEX(0x19c9bbcce9e0a88f5212572b0c5b9e6d0 ^ _binary 0x13c19e5cfdf03b19518cbe3d65faf10d2), HEX(0x19c9bbcce9e0a88f5212572b0c5b9e6d0 & _binary 0x13c19e5cfdf03b19518cbe3d65faf10d2), HEX(~ _binary 0x19c9bbcce9e0a88f5212572b0c5b9e6d0), HEX(~ _binary 0x13c19e5cfdf03b19518cbe3d65faf10d2); 13119 END 13120 OUTPUT 13121 select HEX(0x19c9bbcce9e0a88f5212572b0c5b9e6d0 | _binary 0x13c19e5cfdf03b19518cbe3d65faf10d2), HEX(0x19c9bbcce9e0a88f5212572b0c5b9e6d0 ^ _binary 0x13c19e5cfdf03b19518cbe3d65faf10d2), HEX(0x19c9bbcce9e0a88f5212572b0c5b9e6d0 & _binary 0x13c19e5cfdf03b19518cbe3d65faf10d2), HEX(~_binary 0x19c9bbcce9e0a88f5212572b0c5b9e6d0), HEX(~_binary 0x13c19e5cfdf03b19518cbe3d65faf10d2) from dual 13122 END 13123 INPUT 13124 select min(a3) from t1 where a2 = 2 and a3 >= 'CHI' and a3 = 'MIN'; 13125 END 13126 OUTPUT 13127 select min(a3) from t1 where a2 = 2 and a3 >= 'CHI' and a3 = 'MIN' 13128 END 13129 INPUT 13130 select group_concat(distinct a, c order by a, c) from t1; 13131 END 13132 OUTPUT 13133 select group_concat(distinct a, c order by a asc, c asc) from t1 13134 END 13135 INPUT 13136 select char_length('; 13137 END 13138 ERROR 13139 syntax error at position 22 near ';' 13140 END 13141 INPUT 13142 select ST_geomfromtext(col9,col89) as a from t1; 13143 END 13144 OUTPUT 13145 select ST_geomfromtext(col9, col89) as a from t1 13146 END 13147 INPUT 13148 select from t4 order by b,a limit 3; 13149 END 13150 ERROR 13151 syntax error at position 12 near 'from' 13152 END 13153 INPUT 13154 select @@key_buffer_size; 13155 END 13156 OUTPUT 13157 select @@key_buffer_size from dual 13158 END 13159 INPUT 13160 select from t1 where not(a < 5 or a > 15); 13161 END 13162 ERROR 13163 syntax error at position 12 near 'from' 13164 END 13165 INPUT 13166 select from t1 where not(NULL and a > 5); 13167 END 13168 ERROR 13169 syntax error at position 12 near 'from' 13170 END 13171 INPUT 13172 select period FROM t1; 13173 END 13174 OUTPUT 13175 select period from t1 13176 END 13177 INPUT 13178 select from `information_schema`.`PARTITIONS` where `TABLE_NAME` = NULL; 13179 END 13180 ERROR 13181 syntax error at position 12 near 'from' 13182 END 13183 INPUT 13184 select from (t1 cross join t2) join (t3 cross join t4) on (a < y and t2.b < t3.c); 13185 END 13186 ERROR 13187 syntax error at position 12 near 'from' 13188 END 13189 INPUT 13190 select t2.fld3 FROM t2 where fld3 LIKE 'honeysuckl_'; 13191 END 13192 OUTPUT 13193 select t2.fld3 from t2 where fld3 like 'honeysuckl_' 13194 END 13195 INPUT 13196 select mbrtouches(ST_GeomFromText("point(2 4)"), ST_GeomFromText("polygon((2 2, 6 2, 6 6, 2 6, 2 2))")); 13197 END 13198 OUTPUT 13199 select mbrtouches(ST_GeomFromText('point(2 4)'), ST_GeomFromText('polygon((2 2, 6 2, 6 6, 2 6, 2 2))')) from dual 13200 END 13201 INPUT 13202 select from t1, t2 where t1.start between t2.ctime1 and t2.ctime2; 13203 END 13204 ERROR 13205 syntax error at position 12 near 'from' 13206 END 13207 INPUT 13208 select a, MAX(b), ELT(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f') from t1 group by a; 13209 END 13210 OUTPUT 13211 select a, MAX(b), ELT(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f') from t1 group by a 13212 END 13213 INPUT 13214 select avg ( (select (select sum(outr.a + innr.a) from t1 as innr limit 1) as tt from t1 as outr order by outr.a limit 1)) from t1 as most_outer; 13215 END 13216 OUTPUT 13217 select avg((select (select sum(outr.a + innr.a) from t1 as innr limit 1) as tt from t1 as outr order by outr.a asc limit 1)) from t1 as most_outer 13218 END 13219 INPUT 13220 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_spanish_ci; 13221 END 13222 OUTPUT 13223 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_spanish_ci 13224 END 13225 INPUT 13226 select substring('hello', 4294967297, 4294967297); 13227 END 13228 OUTPUT 13229 select substr('hello', 4294967297, 4294967297) from dual 13230 END 13231 INPUT 13232 select 0x003c8793403032 like '%-112%'; 13233 END 13234 OUTPUT 13235 select 0x003c8793403032 like '%-112%' from dual 13236 END 13237 INPUT 13238 select from t3; 13239 END 13240 ERROR 13241 syntax error at position 12 near 'from' 13242 END 13243 INPUT 13244 select concat(a,ifnull(min(date_format(now(), '%Y-%m-%d')),' ull')) from t1; 13245 END 13246 OUTPUT 13247 select concat(a, ifnull(min(date_format(now(), '%Y-%m-%d')), ' ull')) from t1 13248 END 13249 INPUT 13250 select conv(1,10,16),conv((1<<2)-1,10,16),conv((1<<10)-2,10,16),conv((1<<16)-3,10,16),conv((1<<25)-4,10,16),conv((1<<31)-5,10,16),conv((1<<36)-6,10,16),conv((1<<47)-7,10,16),conv((1<<48)-8,10,16),conv((1<<55)-9,10,16),conv((1<<56)-10,10,16),conv((1<<63)-11,10,16); 13251 END 13252 OUTPUT 13253 select conv(1, 10, 16), conv((1 << 2) - 1, 10, 16), conv((1 << 10) - 2, 10, 16), conv((1 << 16) - 3, 10, 16), conv((1 << 25) - 4, 10, 16), conv((1 << 31) - 5, 10, 16), conv((1 << 36) - 6, 10, 16), conv((1 << 47) - 7, 10, 16), conv((1 << 48) - 8, 10, 16), conv((1 << 55) - 9, 10, 16), conv((1 << 56) - 10, 10, 16), conv((1 << 63) - 11, 10, 16) from dual 13254 END 13255 INPUT 13256 select from t1 where f1='test' and (f2= md5("TEST") or f2= md5("test")); 13257 END 13258 ERROR 13259 syntax error at position 12 near 'from' 13260 END 13261 INPUT 13262 select hex(char(0x01020304 using ucs2)); 13263 END 13264 ERROR 13265 syntax error at position 33 near 'using' 13266 END 13267 INPUT 13268 select 'a' union select concat('a', -0.0000); 13269 END 13270 OUTPUT 13271 select 'a' from dual union select concat('a', -0.0000) from dual 13272 END 13273 INPUT 13274 select locate('lo','hello',-4294967296); 13275 END 13276 OUTPUT 13277 select locate('lo', 'hello', -4294967296) from dual 13278 END 13279 INPUT 13280 select from events_test.events_smode_test order by ev_name, a; 13281 END 13282 ERROR 13283 syntax error at position 12 near 'from' 13284 END 13285 INPUT 13286 select insert(_utf16 0x006100620063,10,2,_utf16 0x006400650066); 13287 END 13288 ERROR 13289 syntax error at position 14 near 'insert' 13290 END 13291 INPUT 13292 select FIELD('1',_latin2'3','2',1); 13293 END 13294 OUTPUT 13295 select FIELD('1', _latin2 '3', '2', 1) from dual 13296 END 13297 INPUT 13298 select date_format(d,"%d") from t1 order by 1; 13299 END 13300 OUTPUT 13301 select date_format(d, '%d') from t1 order by 1 asc 13302 END 13303 INPUT 13304 select LEAST(NULL,'HARRY','HARRIOT',NULL,'HAROLD'),GREATEST(NULL,'HARRY','HARRIOT',NULL,'HAROLD'); 13305 END 13306 OUTPUT 13307 select LEAST(null, 'HARRY', 'HARRIOT', null, 'HAROLD'), GREATEST(null, 'HARRY', 'HARRIOT', null, 'HAROLD') from dual 13308 END 13309 INPUT 13310 select a1,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1; 13311 END 13312 OUTPUT 13313 select a1, max(c), min(c) from t1 where a2 = 'a' and b = 'b' group by a1 13314 END 13315 INPUT 13316 select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'MIN' and t2.a3 = 'CA'; 13317 END 13318 OUTPUT 13319 select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'MIN' and t2.a3 = 'CA' 13320 END 13321 INPUT 13322 select from information_schema.schema_privileges order by grantee; 13323 END 13324 ERROR 13325 syntax error at position 12 near 'from' 13326 END 13327 INPUT 13328 select @@autocommit; 13329 END 13330 OUTPUT 13331 select @@autocommit from dual 13332 END 13333 INPUT 13334 select hex(substr(_ucs2 0x00e400e50068,-3)); 13335 END 13336 OUTPUT 13337 select hex(substr(_ucs2 0x00e400e50068, -3)) from dual 13338 END 13339 INPUT 13340 select -1,-11,-101,-1001,-10001,-100001,-1000001,-10000001,-100000001,-1000000001,-10000000001,-100000000001,-1000000000001,-10000000000001,-100000000000001,-1000000000000001,-10000000000000001,-100000000000000001,-1000000000000000001,-10000000000000000001; 13341 END 13342 OUTPUT 13343 select -1, -11, -101, -1001, -10001, -100001, -1000001, -10000001, -100000001, -1000000001, -10000000001, -100000000001, -1000000000001, -10000000000001, -100000000000001, -1000000000000001, -10000000000000001, -100000000000000001, -1000000000000000001, -10000000000000000001 from dual 13344 END 13345 INPUT 13346 select a from t1 order by a desc,b; 13347 END 13348 OUTPUT 13349 select a from t1 order by a desc, b asc 13350 END 13351 INPUT 13352 select db, table_name, table_priv from mysql.tables_priv where user='mysqluser1' and host='localhost'; 13353 END 13354 OUTPUT 13355 select db, table_name, table_priv from mysql.tables_priv where `user` = 'mysqluser1' and host = 'localhost' 13356 END 13357 INPUT 13358 select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') group by a1,a2,b; 13359 END 13360 OUTPUT 13361 select a1, a2, b, min(c), max(c) from t1 where c > 'b1' group by a1, a2, b 13362 END 13363 INPUT 13364 select distinct t1_outer.a from t1 t1_outer order by t1_outer.b; 13365 END 13366 OUTPUT 13367 select distinct t1_outer.a from t1 as t1_outer order by t1_outer.b asc 13368 END 13369 INPUT 13370 select std(s1/s2) from bug22555; 13371 END 13372 OUTPUT 13373 select std(s1 / s2) from bug22555 13374 END 13375 INPUT 13376 select substring('hello', 1, 4294967295); 13377 END 13378 OUTPUT 13379 select substr('hello', 1, 4294967295) from dual 13380 END 13381 INPUT 13382 select lpad('hello', 18446744073709551615, '1'); 13383 END 13384 OUTPUT 13385 select lpad('hello', 18446744073709551615, '1') from dual 13386 END 13387 INPUT 13388 select t1.*,t2.* from t1 as t0,{ oj t2 left outer join t1 on (t1.a=t2.a) } WHERE t0.a=2; 13389 END 13390 ERROR 13391 syntax error at position 33 near '{' 13392 END 13393 INPUT 13394 select length(s1),char_length(s1) from t1; 13395 END 13396 OUTPUT 13397 select length(s1), char_length(s1) from t1 13398 END 13399 INPUT 13400 select @@global.key_buffer_size; 13401 END 13402 OUTPUT 13403 select @@global.key_buffer_size from dual 13404 END 13405 INPUT 13406 select stddev(2) from t1; 13407 END 13408 OUTPUT 13409 select stddev(2) from t1 13410 END 13411 INPUT 13412 select field(NULL,1,2,NULL), field(NULL,1,2,0); 13413 END 13414 OUTPUT 13415 select field(null, 1, 2, null), field(null, 1, 2, 0) from dual 13416 END 13417 INPUT 13418 select CAST(CAST(1-2 AS UNSIGNED) AS SIGNED INTEGER); 13419 END 13420 OUTPUT 13421 select convert(convert(1 - 2, UNSIGNED), SIGNED) from dual 13422 END 13423 INPUT 13424 select a1,a2,b,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1; 13425 END 13426 OUTPUT 13427 select a1, a2, b, max(c), min(c) from t3 where a2 = 'a' and b = 'b' group by a1 13428 END 13429 INPUT 13430 select insert('hello', 4294967295, 4294967295, 'hi'); 13431 END 13432 ERROR 13433 syntax error at position 14 near 'insert' 13434 END 13435 INPUT 13436 select INDEX_NAME from information_schema.statistics where table_schema='test' order by INDEX_NAME; 13437 END 13438 OUTPUT 13439 select INDEX_NAME from information_schema.statistics where table_schema = 'test' order by INDEX_NAME asc 13440 END 13441 INPUT 13442 select substring('hello', 1, -18446744073709551616); 13443 END 13444 OUTPUT 13445 select substr('hello', 1, -18446744073709551616) from dual 13446 END 13447 INPUT 13448 select table_name from information_schema.TABLES where table_schema = "mysqltest" and table_name rlike "t[1-5]{1}$" order by table_name; 13449 END 13450 OUTPUT 13451 select table_name from information_schema.`TABLES` where table_schema = 'mysqltest' and table_name regexp 't[1-5]{1}$' order by table_name asc 13452 END 13453 INPUT 13454 select count(*) from T1; 13455 END 13456 OUTPUT 13457 select count(*) from T1 13458 END 13459 INPUT 13460 select get_lock('ee_22830', 60); 13461 END 13462 OUTPUT 13463 select get_lock('ee_22830', 60) from dual 13464 END 13465 INPUT 13466 select date_format('2004-01-01','%W (%a), %e %M (%b) %Y'); 13467 END 13468 OUTPUT 13469 select date_format('2004-01-01', '%W (%a), %e %M (%b) %Y') from dual 13470 END 13471 INPUT 13472 select from t1 where bigint_col=17666000000000000000; 13473 END 13474 ERROR 13475 syntax error at position 12 near 'from' 13476 END 13477 INPUT 13478 select v,count(c) from t1 group by v order by v limit 10; 13479 END 13480 OUTPUT 13481 select v, count(c) from t1 group by v order by v asc limit 10 13482 END 13483 INPUT 13484 select nullif(1,'test'); 13485 END 13486 OUTPUT 13487 select nullif(1, 'test') from dual 13488 END 13489 INPUT 13490 select date_sub("1998-01-02",INTERVAL 31 DAY); 13491 END 13492 OUTPUT 13493 select date_sub('1998-01-02', interval 31 DAY) from dual 13494 END 13495 INPUT 13496 select from db where user = 'mysqltest_1'; 13497 END 13498 ERROR 13499 syntax error at position 12 near 'from' 13500 END 13501 INPUT 13502 select time_format(19980131000000,'%H|%I|%k|%l|%i|%p|%r|%S|%T'); 13503 END 13504 OUTPUT 13505 select time_format(19980131000000, '%H|%I|%k|%l|%i|%p|%r|%S|%T') from dual 13506 END 13507 INPUT 13508 select c1 as 'no index' from t1 where c1 like cast(concat('%',0xA4A2, '%') as char character set ujis); 13509 END 13510 OUTPUT 13511 select c1 as `no index` from t1 where c1 like convert(concat('%', 0xA4A2, '%'), char character set ujis) 13512 END 13513 INPUT 13514 select date_add("1997-12-31 23:59:59.000002",INTERVAL "10000:99:99.999999" HOUR_MICROSECOND); 13515 END 13516 OUTPUT 13517 select date_add('1997-12-31 23:59:59.000002', interval '10000:99:99.999999' HOUR_MICROSECOND) from dual 13518 END 13519 INPUT 13520 select @@event_scheduler; 13521 END 13522 OUTPUT 13523 select @@event_scheduler from dual 13524 END 13525 INPUT 13526 select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from information_schema.columns where table_schema='test' and table_name = 't1'; 13527 END 13528 OUTPUT 13529 select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from information_schema.`columns` where table_schema = 'test' and table_name = 't1' 13530 END 13531 INPUT 13532 select st_touches(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')); 13533 END 13534 OUTPUT 13535 select st_touches(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')) from dual 13536 END 13537 INPUT 13538 select left(_utf8 0xD0B0D0B1D0B2,1); 13539 END 13540 OUTPUT 13541 select left(_utf8 0xD0B0D0B1D0B2, 1) from dual 13542 END 13543 INPUT 13544 select from information_schema.SCHEMA_PRIVILEGES where grantee like '%mysqltest_1%'; 13545 END 13546 ERROR 13547 syntax error at position 12 near 'from' 13548 END 13549 INPUT 13550 select from имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48; 13551 END 13552 ERROR 13553 syntax error at position 12 near 'from' 13554 END 13555 INPUT 13556 select i, count(*) from bug22555 group by i; 13557 END 13558 OUTPUT 13559 select i, count(*) from bug22555 group by i 13560 END 13561 INPUT 13562 select t2.fld3 FROM t2 where fld3 LIKE 'h%le'; 13563 END 13564 OUTPUT 13565 select t2.fld3 from t2 where fld3 like 'h%le' 13566 END 13567 INPUT 13568 select compress(a) is null from t1; 13569 END 13570 OUTPUT 13571 select compress(a) is null from t1 13572 END 13573 INPUT 13574 select 5.9 div 2, 1.23456789e3 DIV 2, 1.23456789e9 DIV 2, 1.23456789e19 DIV 2; 13575 END 13576 OUTPUT 13577 select 5.9 div 2, 1.23456789e3 div 2, 1.23456789e9 div 2, 1.23456789e19 div 2 from dual 13578 END 13579 INPUT 13580 select 0, ST_Intersects(ST_GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), ST_GeomFromText('POLYGON((10 40, 40 50, 20 70, 10 40))')); 13581 END 13582 OUTPUT 13583 select 0, ST_Intersects(ST_GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), ST_GeomFromText('POLYGON((10 40, 40 50, 20 70, 10 40))')) from dual 13584 END 13585 INPUT 13586 select a, group_concat(distinct b order by b) from t1 group by a with rollup; 13587 END 13588 ERROR 13589 syntax error at position 70 near 'with' 13590 END 13591 INPUT 13592 select 4|||| delimiter 'abcd'|||| select 5; 13593 END 13594 ERROR 13595 syntax error at position 13 13596 END 13597 INPUT 13598 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_german2_ci; 13599 END 13600 OUTPUT 13601 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_german2_ci 13602 END 13603 INPUT 13604 select str_to_date( 1, NULL ); 13605 END 13606 OUTPUT 13607 select str_to_date(1, null) from dual 13608 END 13609 INPUT 13610 select "A"<=>"B","A"<=>NULL,NULL<=>"A"; 13611 END 13612 OUTPUT 13613 select 'A' <=> 'B', 'A' <=> null, null <=> 'A' from dual 13614 END 13615 INPUT 13616 select format(1.5555,0),format(123.5555,1),format(1234.5555,2),format(12345.55555,3),format(123456.5555,4),format(1234567.5555,5),format("12345.2399",2); 13617 END 13618 OUTPUT 13619 select format(1.5555, 0), format(123.5555, 1), format(1234.5555, 2), format(12345.55555, 3), format(123456.5555, 4), format(1234567.5555, 5), format('12345.2399', 2) from dual 13620 END 13621 INPUT 13622 select length(compress(@test_compress_string))<length(@test_compress_string); 13623 END 13624 OUTPUT 13625 select length(compress(@test_compress_string)) < length(@test_compress_string) from dual 13626 END 13627 INPUT 13628 select a as like_aaa from t1 where a like 'aaa%'; 13629 END 13630 OUTPUT 13631 select a as like_aaa from t1 where a like 'aaa%' 13632 END 13633 INPUT 13634 select 0xf0be117400d02a20b8e049da3e74 like '%-123%'; 13635 END 13636 OUTPUT 13637 select 0xf0be117400d02a20b8e049da3e74 like '%-123%' from dual 13638 END 13639 INPUT 13640 select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),MULTIPOINT(0 14,-9 -11),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20)),MULTIPOINT(16 1,-9 -17,-16 6,-17 3),POINT(-18 13))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(7 0),MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17),MULTIPOINT(-9 -5,5 15,12 -11,12 11))'))) as result; 13641 END 13642 OUTPUT 13643 select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),MULTIPOINT(0 14,-9 -11),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20)),MULTIPOINT(16 1,-9 -17,-16 6,-17 3),POINT(-18 13))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(7 0),MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17),MULTIPOINT(-9 -5,5 15,12 -11,12 11))'))) as result from dual 13644 END 13645 INPUT 13646 select 1 from t1 group by b; 13647 END 13648 OUTPUT 13649 select 1 from t1 group by b 13650 END 13651 INPUT 13652 select a from t1 where a > 2 order by a; 13653 END 13654 OUTPUT 13655 select a from t1 where a > 2 order by a asc 13656 END 13657 INPUT 13658 select AUTO_INCREMENT from information_schema.tables where table_name = 't1'; 13659 END 13660 OUTPUT 13661 select `AUTO_INCREMENT` from information_schema.`tables` where table_name = 't1' 13662 END 13663 INPUT 13664 select from mysql.slow_log where sql_text NOT LIKE '%slow_log%'; 13665 END 13666 ERROR 13667 syntax error at position 12 near 'from' 13668 END 13669 INPUT 13670 select from t3 order by a,b; 13671 END 13672 ERROR 13673 syntax error at position 12 near 'from' 13674 END 13675 INPUT 13676 select SUBSTR('abcdefg',3,2); 13677 END 13678 OUTPUT 13679 select substr('abcdefg', 3, 2) from dual 13680 END 13681 INPUT 13682 select collation(rpad(_latin2'a',4,_latin2'b')), coercibility(rpad(_latin2'a',4,_latin2'b')); 13683 END 13684 OUTPUT 13685 select collation(rpad(_latin2 'a', 4, _latin2 'b')), coercibility(rpad(_latin2 'a', 4, _latin2 'b')) from dual 13686 END 13687 INPUT 13688 select right('hello', 4294967297); 13689 END 13690 OUTPUT 13691 select right('hello', 4294967297) from dual 13692 END 13693 INPUT 13694 select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id order by one.id; 13695 END 13696 OUTPUT 13697 select one.id, elt(two.val, 'one', 'two') from t1 as one, t2 as two where two.id = one.id order by one.id asc 13698 END 13699 INPUT 13700 select sec_to_time(9001),sec_to_time(9001)+0,time_to_sec("15:12:22"), sec_to_time(time_to_sec("0:30:47")/6.21); 13701 END 13702 OUTPUT 13703 select sec_to_time(9001), sec_to_time(9001) + 0, time_to_sec('15:12:22'), sec_to_time(time_to_sec('0:30:47') / 6.21) from dual 13704 END 13705 INPUT 13706 select lpad('hello', -4294967296, '1'); 13707 END 13708 OUTPUT 13709 select lpad('hello', -4294967296, '1') from dual 13710 END 13711 INPUT 13712 select case a when 1 then 2 when 2 then 3 else 0 end as fcase, count(*) from t1 group by fcase; 13713 END 13714 OUTPUT 13715 select case a when 1 then 2 when 2 then 3 else 0 end as fcase, count(*) from t1 group by fcase 13716 END 13717 INPUT 13718 select variance(2) from t1; 13719 END 13720 OUTPUT 13721 select variance(2) from t1 13722 END 13723 INPUT 13724 select last_day("1997-12-1")+0; 13725 END 13726 OUTPUT 13727 select last_day('1997-12-1') + 0 from dual 13728 END 13729 INPUT 13730 select fld3 FROM t2 where fld3 like "L%" and fld3 = "ok"; 13731 END 13732 OUTPUT 13733 select fld3 from t2 where fld3 like 'L%' and fld3 = 'ok' 13734 END 13735 INPUT 13736 select date_add('1000-01-01 00:00:00', interval '1.03:02:01.05' day_microsecond); 13737 END 13738 OUTPUT 13739 select date_add('1000-01-01 00:00:00', interval '1.03:02:01.05' day_microsecond) from dual 13740 END 13741 INPUT 13742 select from t1 where a=database(); 13743 END 13744 ERROR 13745 syntax error at position 12 near 'from' 13746 END 13747 INPUT 13748 select ST_Crosses(ST_GeomFromText('MULTIPOINT(1 0,15 0,10 10)'),ST_GeomFromText('LINESTRING(15 0,20 0,10 10,20 20)')) as result; 13749 END 13750 OUTPUT 13751 select ST_Crosses(ST_GeomFromText('MULTIPOINT(1 0,15 0,10 10)'), ST_GeomFromText('LINESTRING(15 0,20 0,10 10,20 20)')) as result from dual 13752 END 13753 INPUT 13754 select date_sub("0000-00-00 00:00:00",INTERVAL 1 SECOND); 13755 END 13756 OUTPUT 13757 select date_sub('0000-00-00 00:00:00', interval 1 SECOND) from dual 13758 END 13759 INPUT 13760 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name = 'tm' and index_name = 'v' order by table_name; 13761 END 13762 OUTPUT 13763 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name = 'tm' and index_name = 'v' order by table_name asc 13764 END 13765 INPUT 13766 select v; 13767 END 13768 OUTPUT 13769 select v from dual 13770 END 13771 INPUT 13772 select null % null as 'NULL'; 13773 END 13774 OUTPUT 13775 select null % null as `NULL` from dual 13776 END 13777 INPUT 13778 select t1.* FROM t1; 13779 END 13780 OUTPUT 13781 select t1.* from t1 13782 END 13783 INPUT 13784 select hex(a) a, hex(@u:=convert(a using utf8)) b, hex(convert(@u using big5)) c from t1 order by a; 13785 END 13786 ERROR 13787 syntax error at position 25 near ':' 13788 END 13789 INPUT 13790 select t,count(t) from t1 group by t order by t limit 10; 13791 END 13792 OUTPUT 13793 select t, count(t) from t1 group by t order by t asc limit 10 13794 END 13795 INPUT 13796 select cast(NULL as DATE); 13797 END 13798 OUTPUT 13799 select convert(null, DATE) from dual 13800 END 13801 INPUT 13802 select substring('hello', 1, -18446744073709551615); 13803 END 13804 OUTPUT 13805 select substr('hello', 1, -18446744073709551615) from dual 13806 END 13807 INPUT 13808 select c cx from t1 where c='x'; 13809 END 13810 OUTPUT 13811 select c as cx from t1 where c = 'x' 13812 END 13813 INPUT 13814 select date_sub("1998-01-01 00:00:00.000001",INTERVAL "1 1:1:1.000002" DAY_MICROSECOND); 13815 END 13816 OUTPUT 13817 select date_sub('1998-01-01 00:00:00.000001', interval '1 1:1:1.000002' DAY_MICROSECOND) from dual 13818 END 13819 INPUT 13820 select date_add(date,INTERVAL "1 1:1" DAY_MINUTE) from t1; 13821 END 13822 OUTPUT 13823 select date_add(`date`, interval '1 1:1' DAY_MINUTE) from t1 13824 END 13825 INPUT 13826 select hex(char(0xFF using utf8)); 13827 END 13828 ERROR 13829 syntax error at position 27 near 'using' 13830 END 13831 INPUT 13832 select date_add("1997-12-31 23:59:59",INTERVAL -100000 YEAR); 13833 END 13834 OUTPUT 13835 select date_add('1997-12-31 23:59:59', interval (-100000) YEAR) from dual 13836 END 13837 INPUT 13838 select substring_index('the king of the the hill',' ',-2); 13839 END 13840 OUTPUT 13841 select substring_index('the king of the the hill', ' ', -2) from dual 13842 END 13843 INPUT 13844 select "a" as a; 13845 END 13846 OUTPUT 13847 select 'a' as a from dual 13848 END 13849 INPUT 13850 select a1, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b; 13851 END 13852 OUTPUT 13853 select a1, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1, a2, b 13854 END 13855 INPUT 13856 select st_astext(geometrycollection()) as result; 13857 END 13858 OUTPUT 13859 select st_astext(geometrycollection()) as result from dual 13860 END 13861 INPUT 13862 select event_definition, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from information_schema.events; 13863 END 13864 OUTPUT 13865 select event_definition, `definer`, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from information_schema.events 13866 END 13867 INPUT 13868 select uncompressed_length(compress(@test_compress_string)); 13869 END 13870 OUTPUT 13871 select uncompressed_length(compress(@test_compress_string)) from dual 13872 END 13873 INPUT 13874 select a from t1 having a=1; 13875 END 13876 OUTPUT 13877 select a from t1 having a = 1 13878 END 13879 INPUT 13880 select a as 'x', t1.* as 'with_alias', b as 'x' from t1; 13881 END 13882 ERROR 13883 syntax error at position 25 near 'as' 13884 END 13885 INPUT 13886 select yearweek("2000-01-06",0) as '2000', yearweek("2001-01-06",0) as '2001', yearweek("2002-01-06",0) as '2002',yearweek("2003-01-06",0) as '2003', yearweek("2004-01-06",0) as '2004', yearweek("2005-01-06",0) as '2005', yearweek("2006-01-06",0) as '2006'; 13887 END 13888 OUTPUT 13889 select yearweek('2000-01-06', 0) as `2000`, yearweek('2001-01-06', 0) as `2001`, yearweek('2002-01-06', 0) as `2002`, yearweek('2003-01-06', 0) as `2003`, yearweek('2004-01-06', 0) as `2004`, yearweek('2005-01-06', 0) as `2005`, yearweek('2006-01-06', 0) as `2006` from dual 13890 END 13891 INPUT 13892 select a, t1.* from t1; 13893 END 13894 OUTPUT 13895 select a, t1.* from t1 13896 END 13897 INPUT 13898 select CASE "c" when "a" then 1 when "b" then 2 ELSE 3 END; 13899 END 13900 OUTPUT 13901 select case 'c' when 'a' then 1 when 'b' then 2 else 3 end from dual 13902 END 13903 INPUT 13904 select substring_index('the king of the the hill','the',-2); 13905 END 13906 OUTPUT 13907 select substring_index('the king of the the hill', 'the', -2) from dual 13908 END 13909 INPUT 13910 select 'abc' like '%c','abcabc' like '%c', "ab" like "", "ab" like "a", "ab" like "ab"; 13911 END 13912 OUTPUT 13913 select 'abc' like '%c', 'abcabc' like '%c', 'ab' like '', 'ab' like 'a', 'ab' like 'ab' from dual 13914 END 13915 INPUT 13916 select (select sum(outr.a + t1.a) from t1 limit 1) as tt from t1 as outr order by outr.a; 13917 END 13918 OUTPUT 13919 select (select sum(outr.a + t1.a) from t1 limit 1) as tt from t1 as outr order by outr.a asc 13920 END 13921 INPUT 13922 select a from t1 where left(a+0,6) in ( left(20040106,6) ); 13923 END 13924 OUTPUT 13925 select a from t1 where left(a + 0, 6) in (left(20040106, 6)) 13926 END 13927 INPUT 13928 select from t1, t2, t3 where t3.a=t1.a and t2.a=t1.b; 13929 END 13930 ERROR 13931 syntax error at position 12 near 'from' 13932 END 13933 INPUT 13934 select from t1 as x1, (select from t1) as x2; 13935 END 13936 ERROR 13937 syntax error at position 12 near 'from' 13938 END 13939 INPUT 13940 select hex(soundex(_utf16 0x041004110412)); 13941 END 13942 OUTPUT 13943 select hex(soundex(_utf16 0x041004110412)) from dual 13944 END 13945 INPUT 13946 select hex(s1), hex(convert(s1 using utf8)) from t1 order by binary s1; 13947 END 13948 OUTPUT 13949 select hex(s1), hex(convert(s1 using utf8)) from t1 order by binary s1 asc 13950 END 13951 INPUT 13952 select "Test delimiter without arg" as " "; 13953 END 13954 OUTPUT 13955 select 'Test delimiter without arg' as ` ` from dual 13956 END 13957 INPUT 13958 select t1.*, (select t2.* as 'x' from t2) from t1; 13959 END 13960 ERROR 13961 syntax error at position 29 near 'as' 13962 END 13963 INPUT 13964 select hex(weight_string(_utf16 0xD800DC00 collate utf16_unicode_ci)); 13965 END 13966 OUTPUT 13967 select hex(weight_string(_utf16 0xD800DC00 collate utf16_unicode_ci)) from dual 13968 END 13969 INPUT 13970 select from information_schema.tables where table_name = NULL; 13971 END 13972 ERROR 13973 syntax error at position 12 near 'from' 13974 END 13975 INPUT 13976 select max(7) from t1i; 13977 END 13978 OUTPUT 13979 select max(7) from t1i 13980 END 13981 INPUT 13982 select fld3 from t2 order by fld3 desc limit 5,5; 13983 END 13984 OUTPUT 13985 select fld3 from t2 order by fld3 desc limit 5, 5 13986 END 13987 INPUT 13988 select pow(10,log10(10)),power(2,4); 13989 END 13990 OUTPUT 13991 select pow(10, log10(10)), power(2, 4) from dual 13992 END 13993 INPUT 13994 select strcmp('�a','ss'),strcmp('ssa','�'),strcmp('sssb','s�a'),strcmp('�','s'); 13995 END 13996 OUTPUT 13997 select strcmp('�a', 'ss'), strcmp('ssa', '�'), strcmp('sssb', 's�a'), strcmp('�', 's') from dual 13998 END 13999 INPUT 14000 select round(match(t1.texte,t1.sujet,t1.motsclefs) against('droit'),5) from t1 left join t2 on t2.id=t1.id; 14001 END 14002 OUTPUT 14003 select round(match(t1.texte, t1.sujet, t1.motsclefs) against ('droit'), 5) from t1 left join t2 on t2.id = t1.id 14004 END 14005 INPUT 14006 select grp,group_concat(c order by c desc) from t1 group by grp; 14007 END 14008 OUTPUT 14009 select grp, group_concat(c order by c desc) from t1 group by grp 14010 END 14011 INPUT 14012 select u.gender as gender, count(distinct u.id) as dist_count, (count(distinct u.id)/5*100) as percentage from t1 u, t2 l where l.user_id = u.id group by u.gender; 14013 END 14014 OUTPUT 14015 select u.gender as gender, count(distinct u.id) as dist_count, count(distinct u.id) / 5 * 100 as percentage from t1 as u, t2 as l where l.user_id = u.id group by u.gender 14016 END 14017 INPUT 14018 select charset(a), charset(b), charset(binary 'ccc') from t1 limit 1; 14019 END 14020 OUTPUT 14021 select charset(a), charset(b), charset(binary 'ccc') from t1 limit 1 14022 END 14023 INPUT 14024 select FIND_IN_SET(_latin1'B' COLLATE latin1_general_ci,_latin1'a,b,c,d' COLLATE latin1_bin); 14025 END 14026 OUTPUT 14027 select FIND_IN_SET(_latin1 'B' collate latin1_general_ci, _latin1 'a,b,c,d' collate latin1_bin) from dual 14028 END 14029 INPUT 14030 select ifnull(a, 'xyz') from t1 group by a; 14031 END 14032 OUTPUT 14033 select ifnull(a, 'xyz') from t1 group by a 14034 END 14035 INPUT 14036 select a1,a2,b,min(c),max(c) from t2 where (c > 'b111') and (c <= 'g112') group by a1,a2,b; 14037 END 14038 OUTPUT 14039 select a1, a2, b, min(c), max(c) from t2 where c > 'b111' and c <= 'g112' group by a1, a2, b 14040 END 14041 INPUT 14042 select from t1 where a in (869751,736494,226312,802616); 14043 END 14044 ERROR 14045 syntax error at position 12 near 'from' 14046 END 14047 INPUT 14048 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name ='tm' order by table_name; 14049 END 14050 OUTPUT 14051 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name = 'tm' order by table_name asc 14052 END 14053 INPUT 14054 select count(*) from t1 where id1 > 90; 14055 END 14056 OUTPUT 14057 select count(*) from t1 where id1 > 90 14058 END 14059 INPUT 14060 select n,d,unix_timestamp(t) from t1; 14061 END 14062 OUTPUT 14063 select n, d, unix_timestamp(t) from t1 14064 END 14065 INPUT 14066 select str_to_date('15-01-2001 12:59:59', GET_FORMAT(DATE,'USA')); 14067 END 14068 OUTPUT 14069 select str_to_date('15-01-2001 12:59:59', GET_FORMAT(`DATE`, 'USA')) from dual 14070 END 14071 INPUT 14072 select substring('hello', 18446744073709551617, 1); 14073 END 14074 OUTPUT 14075 select substr('hello', 18446744073709551617, 1) from dual 14076 END 14077 INPUT 14078 select mbrtouches(ST_GeomFromText("point (2 4)"), ST_GeomFromText("point (2 4)")); 14079 END 14080 OUTPUT 14081 select mbrtouches(ST_GeomFromText('point (2 4)'), ST_GeomFromText('point (2 4)')) from dual 14082 END 14083 INPUT 14084 select distinct t1.a1,t2.a1 from t1,t2; 14085 END 14086 OUTPUT 14087 select distinct t1.a1, t2.a1 from t1, t2 14088 END 14089 INPUT 14090 select HOUR("1997-03-03 23:03:22"), MINUTE("23:03:22"), SECOND(230322); 14091 END 14092 OUTPUT 14093 select HOUR('1997-03-03 23:03:22'), MINUTE('23:03:22'), SECOND(230322) from dual 14094 END 14095 INPUT 14096 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name like 't%' and index_name = 'v' order by table_name; 14097 END 14098 OUTPUT 14099 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name like 't%' and index_name = 'v' order by table_name asc 14100 END 14101 INPUT 14102 select timestamp("2001-13-01", "01:01:01.000001"); 14103 END 14104 OUTPUT 14105 select timestamp('2001-13-01', '01:01:01.000001') from dual 14106 END 14107 INPUT 14108 select a1,a2,b, max(c) from t1 where (c < 'a0') group by a1,a2,b; 14109 END 14110 OUTPUT 14111 select a1, a2, b, max(c) from t1 where c < 'a0' group by a1, a2, b 14112 END 14113 INPUT 14114 select hex(_utf16 0x3344); 14115 END 14116 OUTPUT 14117 select hex(_utf16 0x3344) from dual 14118 END 14119 INPUT 14120 select round(-5000111000111000155,-1); 14121 END 14122 OUTPUT 14123 select round(-5000111000111000155, -1) from dual 14124 END 14125 INPUT 14126 select interval(null, 1, 10, 100); 14127 END 14128 ERROR 14129 syntax error at position 35 14130 END 14131 INPUT 14132 select TABLE_ROWS from information_schema.tables where table_schema="information_schema" and table_name="COLUMNS"; 14133 END 14134 OUTPUT 14135 select TABLE_ROWS from information_schema.`tables` where table_schema = 'information_schema' and table_name = 'COLUMNS' 14136 END 14137 INPUT 14138 select hex(ujis), hex(ucs2), hex(ujis2), name from t1; 14139 END 14140 OUTPUT 14141 select hex(ujis), hex(ucs2), hex(ujis2), `name` from t1 14142 END 14143 INPUT 14144 select from t1 LEFT JOIN t1 t2 ON (t1.id=t2.pid) AND t2.rep_del IS NULL; 14145 END 14146 ERROR 14147 syntax error at position 12 near 'from' 14148 END 14149 INPUT 14150 select benchmark(5+5, pi()); 14151 END 14152 OUTPUT 14153 select benchmark(5 + 5, pi()) from dual 14154 END 14155 INPUT 14156 select from t2 left join t1 ignore index(primary) on t1.fooID = t2.fooID and t1.fooID = 30; 14157 END 14158 ERROR 14159 syntax error at position 12 near 'from' 14160 END 14161 INPUT 14162 select locate('lo','hello',4294967296); 14163 END 14164 OUTPUT 14165 select locate('lo', 'hello', 4294967296) from dual 14166 END 14167 INPUT 14168 select t1.* from t1 inner join t2 where t1.a = t2.a group by t1.a order by 1, 2; 14169 END 14170 OUTPUT 14171 select t1.* from t1 join t2 where t1.a = t2.a group by t1.a order by 1 asc, 2 asc 14172 END 14173 INPUT 14174 select 10E+0+'10'; 14175 END 14176 OUTPUT 14177 select 10E+0 + '10' from dual 14178 END 14179 INPUT 14180 select _latin1'B' collate latin1_bin in (_latin1'a',_latin1'b'); 14181 END 14182 OUTPUT 14183 select _latin1 'B' collate latin1_bin in (_latin1 'a', _latin1 'b') from dual 14184 END 14185 INPUT 14186 select from t1 where field = '2006-11-06 04:08:36.0'; 14187 END 14188 ERROR 14189 syntax error at position 12 near 'from' 14190 END 14191 INPUT 14192 select t2.fld3 FROM t2 where fld3 LIKE 'honeysuckle%'; 14193 END 14194 OUTPUT 14195 select t2.fld3 from t2 where fld3 like 'honeysuckle%' 14196 END 14197 INPUT 14198 select min(a3) from t1 where a2 = 2 and a3 < 'SEA'; 14199 END 14200 OUTPUT 14201 select min(a3) from t1 where a2 = 2 and a3 < 'SEA' 14202 END 14203 INPUT 14204 select _koi8r'a' COLLATE koi8r_bin = _koi8r'A'; 14205 END 14206 OUTPUT 14207 select _koi8r 'a' collate koi8r_bin = _koi8r 'A' from dual 14208 END 14209 INPUT 14210 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_danish_ci; 14211 END 14212 OUTPUT 14213 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_danish_ci 14214 END 14215 INPUT 14216 select group_concat(c order by (select concat(5-t1.c,group_concat(c order by a)) from t2 where t2.a=t1.a)) as grp from t1; 14217 END 14218 OUTPUT 14219 select group_concat(c order by (select concat(5 - t1.c, group_concat(c order by a asc)) from t2 where t2.a = t1.a) asc) as grp from t1 14220 END 14221 INPUT 14222 select _latin1 0xFF regexp _latin1 '[[:upper:]]' COLLATE latin1_bin; 14223 END 14224 OUTPUT 14225 select _latin1 0xFF regexp _latin1 '[[:upper:]]' collate latin1_bin from dual 14226 END 14227 INPUT 14228 select from ((t1 natural join t2) cross join (t3 natural join t4)) natural join t5; 14229 END 14230 ERROR 14231 syntax error at position 12 near 'from' 14232 END 14233 INPUT 14234 select dayofmonth("0000-00-00"),dayofmonth(d),dayofmonth(dt),dayofmonth(t),dayofmonth(c) from t1; 14235 END 14236 OUTPUT 14237 select dayofmonth('0000-00-00'), dayofmonth(d), dayofmonth(dt), dayofmonth(t), dayofmonth(c) from t1 14238 END 14239 INPUT 14240 select date_add("1997-12-31",INTERVAL 1 SECOND); 14241 END 14242 OUTPUT 14243 select date_add('1997-12-31', interval 1 SECOND) from dual 14244 END 14245 INPUT 14246 select 'a' = 'a ', 'a' < 'a ', 'a' > 'a '; 14247 END 14248 OUTPUT 14249 select 'a' = 'a\t', 'a' < 'a\t', 'a' > 'a\t' from dual 14250 END 14251 INPUT 14252 select field(NULL,"a","b","c"); 14253 END 14254 OUTPUT 14255 select field(null, 'a', 'b', 'c') from dual 14256 END 14257 INPUT 14258 select round(10000000000000000000, -19), truncate(10000000000000000000, -19); 14259 END 14260 OUTPUT 14261 select round(10000000000000000000, -19), truncate(10000000000000000000, -19) from dual 14262 END 14263 INPUT 14264 select 1.1 + '1.2xxx'; 14265 END 14266 OUTPUT 14267 select 1.1 + '1.2xxx' from dual 14268 END 14269 INPUT 14270 select @@optimizer_search_depth; 14271 END 14272 OUTPUT 14273 select @@optimizer_search_depth from dual 14274 END 14275 INPUT 14276 select a,b,c from t3 force index (a) where a=1 order by a,b,c; 14277 END 14278 OUTPUT 14279 select a, b, c from t3 force index (a) where a = 1 order by a asc, b asc, c asc 14280 END 14281 INPUT 14282 select date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND); 14283 END 14284 OUTPUT 14285 select date_sub('0050-01-01 00:00:01', interval 2 SECOND) from dual 14286 END 14287 INPUT 14288 select t1.f1,count(distinct t2.f2),count(distinct 1,NULL) from t1 left join t2 on t1.f1=t2.f1 group by t1.f1; 14289 END 14290 OUTPUT 14291 select t1.f1, count(distinct t2.f2), count(distinct 1, null) from t1 left join t2 on t1.f1 = t2.f1 group by t1.f1 14292 END 14293 INPUT 14294 select a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a); 14295 END 14296 OUTPUT 14297 select a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) 14298 END 14299 INPUT 14300 select _koi8r'a' COLLATE koi8r_bin = _koi8r'A' COLLATE koi8r_general_ci; 14301 END 14302 OUTPUT 14303 select _koi8r 'a' collate koi8r_bin = _koi8r 'A' collate koi8r_general_ci from dual 14304 END 14305 INPUT 14306 select from t1 where MATCH(a,b) AGAINST ("indexes" IN NATURAL LANGUAGE MODE); 14307 END 14308 ERROR 14309 syntax error at position 12 near 'from' 14310 END 14311 INPUT 14312 select @my_uuid_date - @my_uuid_synthetic; 14313 END 14314 OUTPUT 14315 select @my_uuid_date - @my_uuid_synthetic from dual 14316 END 14317 INPUT 14318 select i, count(*), variance(e1/e2) from bug22555 group by i order by i; 14319 END 14320 OUTPUT 14321 select i, count(*), variance(e1 / e2) from bug22555 group by i order by i asc 14322 END 14323 INPUT 14324 select substring_index('aaaaaaaaa1','aaa',-4); 14325 END 14326 OUTPUT 14327 select substring_index('aaaaaaaaa1', 'aaa', -4) from dual 14328 END 14329 INPUT 14330 select 1 and 0 or 2, 2 or 1 and 0; 14331 END 14332 OUTPUT 14333 select 1 and 0 or 2, 2 or 1 and 0 from dual 14334 END 14335 INPUT 14336 select from t1 where a like '%PESA %'; 14337 END 14338 ERROR 14339 syntax error at position 12 near 'from' 14340 END 14341 INPUT 14342 select length(data) from t1; 14343 END 14344 OUTPUT 14345 select length(`data`) from t1 14346 END 14347 INPUT 14348 select table_schema, table_name, table_comment from information_schema.tables where table_schema = 'test' and table_name like 't_bug44738_%'; 14349 END 14350 OUTPUT 14351 select table_schema, table_name, table_comment from information_schema.`tables` where table_schema = 'test' and table_name like 't_bug44738_%' 14352 END 14353 INPUT 14354 select count(*) from t3 where id3 > 90; 14355 END 14356 OUTPUT 14357 select count(*) from t3 where id3 > 90 14358 END 14359 INPUT 14360 select (select dt.a from (select 1 as a, 3 as b from t2 having t1.a) dt where dt.b=t1.a) as subq from t1; 14361 END 14362 OUTPUT 14363 select (select dt.a from (select 1 as a, 3 as b from t2 having t1.a) as dt where dt.b = t1.a) as subq from t1 14364 END 14365 INPUT 14366 select ST_Touches(ST_GeomFromText('POLYGON((0 0,5 0,5 5,0 5,0 0),(1 1,3 1,3 3,1 3,1 1))'),ST_GeomFromText('LINESTRING(3 3,10 10)')) as result; 14367 END 14368 OUTPUT 14369 select ST_Touches(ST_GeomFromText('POLYGON((0 0,5 0,5 5,0 5,0 0),(1 1,3 1,3 3,1 3,1 1))'), ST_GeomFromText('LINESTRING(3 3,10 10)')) as result from dual 14370 END 14371 INPUT 14372 select strcmp(_koi8r'a', _koi8r'A' COLLATE koi8r_general_ci); 14373 END 14374 OUTPUT 14375 select strcmp(_koi8r 'a', _koi8r 'A' collate koi8r_general_ci) from dual 14376 END 14377 INPUT 14378 select substring_index('aaaaaaaaa1','aaa',-3); 14379 END 14380 OUTPUT 14381 select substring_index('aaaaaaaaa1', 'aaa', -3) from dual 14382 END 14383 INPUT 14384 select a1,a2,b, max(c) from t2 where (c > 'b1') group by a1,a2,b; 14385 END 14386 OUTPUT 14387 select a1, a2, b, max(c) from t2 where c > 'b1' group by a1, a2, b 14388 END 14389 INPUT 14390 select if(1,c1,'�'), if(0,c1,'�') from t1; 14391 END 14392 OUTPUT 14393 select if(1, c1, '�'), if(0, c1, '�') from t1 14394 END 14395 INPUT 14396 select from v2b; 14397 END 14398 ERROR 14399 syntax error at position 12 near 'from' 14400 END 14401 INPUT 14402 select "123456789012345678901234567890.123456789012345678901234567890" div 1 as x; 14403 END 14404 OUTPUT 14405 select '123456789012345678901234567890.123456789012345678901234567890' div 1 as x from dual 14406 END 14407 INPUT 14408 select concat("-",a,"-",b,"-") from t1 where a="hello "; 14409 END 14410 OUTPUT 14411 select concat('-', a, '-', b, '-') from t1 where a = 'hello ' 14412 END 14413 INPUT 14414 select a, (select t2.* as 'x' from t2) from t1; 14415 END 14416 ERROR 14417 syntax error at position 26 near 'as' 14418 END 14419 INPUT 14420 select max(a3) from t1 where a3 = 'DEN' and a2 = 2; 14421 END 14422 OUTPUT 14423 select max(a3) from t1 where a3 = 'DEN' and a2 = 2 14424 END 14425 INPUT 14426 select i from t1 where a=repeat(_utf8 'a',200); 14427 END 14428 OUTPUT 14429 select i from t1 where a = repeat(_utf8 'a', 200) 14430 END 14431 INPUT 14432 select time_format('100:00:00', '%H %k %h %I %l'); 14433 END 14434 OUTPUT 14435 select time_format('100:00:00', '%H %k %h %I %l') from dual 14436 END 14437 INPUT 14438 select t1.*, t2.* from t1, t2 where t2.id=t1.t2_id limit 2; 14439 END 14440 OUTPUT 14441 select t1.*, t2.* from t1, t2 where t2.id = t1.t2_id limit 2 14442 END 14443 INPUT 14444 select 24 60 60 1000 1000 10 into @my_uuid_one_day; 14445 END 14446 ERROR 14447 syntax error at position 13 near '60' 14448 END 14449 INPUT 14450 select count(*) from t2 where t = "bbb"; 14451 END 14452 OUTPUT 14453 select count(*) from t2 where t = 'bbb' 14454 END 14455 INPUT 14456 select upper('abcd'), lower('ABCD'); 14457 END 14458 OUTPUT 14459 select upper('abcd'), lower('ABCD') from dual 14460 END 14461 INPUT 14462 select max(a3) from t1 where a3 < 'SEA' and a2 = 2 and a3 <= 'MIN'; 14463 END 14464 OUTPUT 14465 select max(a3) from t1 where a3 < 'SEA' and a2 = 2 and a3 <= 'MIN' 14466 END 14467 INPUT 14468 select t1.*, t1.* from t1; 14469 END 14470 OUTPUT 14471 select t1.*, t1.* from t1 14472 END 14473 INPUT 14474 select strcmp(date_sub(localtimestamp(), interval 3 hour), utc_timestamp())=0; 14475 END 14476 OUTPUT 14477 select strcmp(date_sub(localtimestamp(), interval 3 hour), utc_timestamp()) = 0 from dual 14478 END 14479 INPUT 14480 select a1 from t1 where a2 = 'b' group by a1; 14481 END 14482 OUTPUT 14483 select a1 from t1 where a2 = 'b' group by a1 14484 END 14485 INPUT 14486 select from (select a as d, 2*a as two from t) dt; 14487 END 14488 ERROR 14489 syntax error at position 12 near 'from' 14490 END 14491 INPUT 14492 select concat(a1,min(c)),b,max(c) from t1 where a1 < 'd' group by a1,a2,b; 14493 END 14494 OUTPUT 14495 select concat(a1, min(c)), b, max(c) from t1 where a1 < 'd' group by a1, a2, b 14496 END 14497 INPUT 14498 select _latin1'B' between _latin1'a' and _latin1'c'; 14499 END 14500 OUTPUT 14501 select _latin1 'B' between _latin1 'a' and _latin1 'c' from dual 14502 END 14503 INPUT 14504 select from t_bug25347; 14505 END 14506 ERROR 14507 syntax error at position 12 near 'from' 14508 END 14509 INPUT 14510 select from information_schema.SCHEMATA where schema_name > 'm' ORDER BY SCHEMA_NAME; 14511 END 14512 ERROR 14513 syntax error at position 12 near 'from' 14514 END 14515 INPUT 14516 select cast(ltrim(' 20.06 ') as decimal(19,2)); 14517 END 14518 OUTPUT 14519 select convert(ltrim(' 20.06 '), decimal(19, 2)) from dual 14520 END 14521 INPUT 14522 select strcmp('�','ae'),strcmp('ae','�'),strcmp('aeq','�q'),strcmp('�q','aeq'); 14523 END 14524 OUTPUT 14525 select strcmp('�', 'ae'), strcmp('ae', '�'), strcmp('aeq', '�q'), strcmp('�q', 'aeq') from dual 14526 END 14527 INPUT 14528 select collation(reverse(_latin2'ab')), coercibility(reverse(_latin2'ab')); 14529 END 14530 OUTPUT 14531 select collation(reverse(_latin2 'ab')), coercibility(reverse(_latin2 'ab')) from dual 14532 END 14533 INPUT 14534 select cast(-2 as unsigned), 18446744073709551614, -2; 14535 END 14536 OUTPUT 14537 select convert(-2, unsigned), 18446744073709551614, -2 from dual 14538 END 14539 INPUT 14540 select timestampdiff(month,'2004-02-28','2005-02-28'); 14541 END 14542 OUTPUT 14543 select timestampdiff(month, '2004-02-28', '2005-02-28') from dual 14544 END 14545 INPUT 14546 select count(*), f1,if(1,'',f1) from t1 group by 2,3; 14547 END 14548 OUTPUT 14549 select count(*), f1, if(1, '', f1) from t1 group by 2, 3 14550 END 14551 INPUT 14552 select str_to_date('04/30/2004 ', '%m/%d/%Y '); 14553 END 14554 OUTPUT 14555 select str_to_date('04/30/2004 ', '%m/%d/%Y ') from dual 14556 END 14557 INPUT 14558 select c ca10 from t1 where c='aaaaaaaaaa'; 14559 END 14560 OUTPUT 14561 select c as ca10 from t1 where c = 'aaaaaaaaaa' 14562 END 14563 INPUT 14564 select concat(':',trim(LEADING FROM ' left'),':',trim(TRAILING FROM ' right '),':'); 14565 END 14566 ERROR 14567 syntax error at position 36 near 'FROM' 14568 END 14569 INPUT 14570 select ST_AsText(ST_PolygonFromText('POLYGON((10 10,20 10,20 20,10 20, 10 10))')); 14571 END 14572 OUTPUT 14573 select ST_AsText(ST_PolygonFromText('POLYGON((10 10,20 10,20 20,10 20, 10 10))')) from dual 14574 END 14575 INPUT 14576 select 10.0+'10'; 14577 END 14578 OUTPUT 14579 select 10.0 + '10' from dual 14580 END 14581 INPUT 14582 select round(1.12e1, 4294967296), truncate(1.12e1, 4294967296); 14583 END 14584 OUTPUT 14585 select round(1.12e1, 4294967296), truncate(1.12e1, 4294967296) from dual 14586 END 14587 INPUT 14588 select a1,a2,b,min(c),max(c) from t2 where (c < 'c5') or (c = 'g412') or (c = 'k421') group by a1,a2,b; 14589 END 14590 OUTPUT 14591 select a1, a2, b, min(c), max(c) from t2 where c < 'c5' or c = 'g412' or c = 'k421' group by a1, a2, b 14592 END 14593 INPUT 14594 select microsecond("1997-12-31 23:59:59.01") as a; 14595 END 14596 OUTPUT 14597 select microsecond('1997-12-31 23:59:59.01') as a from dual 14598 END 14599 INPUT 14600 select count(*) from t1 where c='a '; 14601 END 14602 OUTPUT 14603 select count(*) from t1 where c = 'a ' 14604 END 14605 INPUT 14606 select std(e1/e2) from bug22555; 14607 END 14608 OUTPUT 14609 select std(e1 / e2) from bug22555 14610 END 14611 INPUT 14612 select 'вася' rlike '[[:<:]]вася[[:>:]]'; 14613 END 14614 OUTPUT 14615 select 'вася' regexp '[[:<:]]вася[[:>:]]' from dual 14616 END 14617 INPUT 14618 select insert('hello', -18446744073709551617, -18446744073709551617, 'hi'); 14619 END 14620 ERROR 14621 syntax error at position 14 near 'insert' 14622 END 14623 INPUT 14624 select from t1 where word=CAST(0xDF as CHAR); 14625 END 14626 ERROR 14627 syntax error at position 12 near 'from' 14628 END 14629 INPUT 14630 select datediff("1997-12-31 23:59:59.000001","1997-12-30"); 14631 END 14632 OUTPUT 14633 select datediff('1997-12-31 23:59:59.000001', '1997-12-30') from dual 14634 END 14635 INPUT 14636 select left('hello', -18446744073709551615); 14637 END 14638 OUTPUT 14639 select left('hello', -18446744073709551615) from dual 14640 END 14641 INPUT 14642 select lpad('hello', -1, '1'); 14643 END 14644 OUTPUT 14645 select lpad('hello', -1, '1') from dual 14646 END 14647 INPUT 14648 select (12%0) is null as '1'; 14649 END 14650 OUTPUT 14651 select 12 % 0 is null as `1` from dual 14652 END 14653 INPUT 14654 select hex(_utf8mb4 B'001111111111'); 14655 END 14656 OUTPUT 14657 select hex(_utf8mb4 B'001111111111') from dual 14658 END 14659 INPUT 14660 select NULLIF(1,NULL), NULLIF(1.0, NULL), NULLIF("test", NULL); 14661 END 14662 OUTPUT 14663 select NULLIF(1, null), NULLIF(1.0, null), NULLIF('test', null) from dual 14664 END 14665 INPUT 14666 select 1 -9223372036854775808 as result; 14667 END 14668 OUTPUT 14669 select 1 - 9223372036854775808 as result from dual 14670 END 14671 INPUT 14672 select ST_contains(ST_GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)), ((6 6, 6 11, 11 11, 11 6, 6 6)))'), ST_GeomFromText('POINT(5 10)')); 14673 END 14674 OUTPUT 14675 select ST_contains(ST_GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)), ((6 6, 6 11, 11 11, 11 6, 6 6)))'), ST_GeomFromText('POINT(5 10)')) from dual 14676 END 14677 INPUT 14678 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_unicode_520_ci; 14679 END 14680 OUTPUT 14681 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_unicode_520_ci 14682 END 14683 INPUT 14684 select collation(charset(_utf8'a')), collation(collation(_utf8'a')); 14685 END 14686 OUTPUT 14687 select collation(charset(_utf8 'a')), collation(collation(_utf8 'a')) from dual 14688 END 14689 INPUT 14690 select last_day('2000-02-05') as f1, last_day('2002-12-31') as f2, last_day('2003-03-32') as f3, last_day('2003-04-01') as f4, last_day('2001-01-01 01:01:01') as f5, last_day(NULL), last_day('2001-02-12'); 14691 END 14692 OUTPUT 14693 select last_day('2000-02-05') as f1, last_day('2002-12-31') as f2, last_day('2003-03-32') as f3, last_day('2003-04-01') as f4, last_day('2001-01-01 01:01:01') as f5, last_day(null), last_day('2001-02-12') from dual 14694 END 14695 INPUT 14696 select hex(CONVERT(@utf83 USING sjis)); 14697 END 14698 OUTPUT 14699 select hex(convert(@utf83 using sjis)) from dual 14700 END 14701 INPUT 14702 select min(a2) from t1; 14703 END 14704 OUTPUT 14705 select min(a2) from t1 14706 END 14707 INPUT 14708 select _latin1'1'=_latin2'1'; 14709 END 14710 OUTPUT 14711 select _latin1 '1' = _latin2 '1' from dual 14712 END 14713 INPUT 14714 select insert('hello', -18446744073709551616, -18446744073709551616, 'hi'); 14715 END 14716 ERROR 14717 syntax error at position 14 near 'insert' 14718 END 14719 INPUT 14720 select concat("*",name,"*") from t1 order by 1; 14721 END 14722 OUTPUT 14723 select concat('*', `name`, '*') from t1 order by 1 asc 14724 END 14725 INPUT 14726 select 'a' union select concat('a', -(4 + 1)); 14727 END 14728 OUTPUT 14729 select 'a' from dual union select concat('a', -(4 + 1)) from dual 14730 END 14731 INPUT 14732 select otto from (select 1 as otto) as t1; 14733 END 14734 OUTPUT 14735 select otto from (select 1 as otto from dual) as t1 14736 END 14737 INPUT 14738 select collation(ucase(_latin2'a')), coercibility(ucase(_latin2'a')); 14739 END 14740 OUTPUT 14741 select collation(ucase(_latin2 'a')), coercibility(ucase(_latin2 'a')) from dual 14742 END 14743 INPUT 14744 select hex(@utf83:= CONVERT(@ujis3 USING utf8)); 14745 END 14746 ERROR 14747 syntax error at position 19 near ':' 14748 END 14749 INPUT 14750 select from t1 where MATCH a,b AGAINST('"space model' IN BOOLEAN MODE); 14751 END 14752 ERROR 14753 syntax error at position 12 near 'from' 14754 END 14755 INPUT 14756 select @ujis4 = CONVERT(@utf84 USING ujis); 14757 END 14758 OUTPUT 14759 select @ujis4 = convert(@utf84 using ujis) from dual 14760 END 14761 INPUT 14762 select (select from (select t1.a) cte) from t1; 14763 END 14764 ERROR 14765 syntax error at position 20 near 'from' 14766 END 14767 INPUT 14768 select from t11; 14769 END 14770 ERROR 14771 syntax error at position 12 near 'from' 14772 END 14773 INPUT 14774 select count(a) as b from t1 where a=0 having b > 0; 14775 END 14776 OUTPUT 14777 select count(a) as b from t1 where a = 0 having b > 0 14778 END 14779 INPUT 14780 select id, sum(qty) as sqty, count(qty) as cqty from t1 group by id having sum(qty)>2 and count(qty)>1; 14781 END 14782 OUTPUT 14783 select id, sum(qty) as sqty, count(qty) as cqty from t1 group by id having sum(qty) > 2 and count(qty) > 1 14784 END 14785 INPUT 14786 select unix_timestamp('1969-11-20 01:00:00'); 14787 END 14788 OUTPUT 14789 select unix_timestamp('1969-11-20 01:00:00') from dual 14790 END 14791 INPUT 14792 select time_format(19980131010203,'%H|%I|%k|%l|%i|%p|%r|%S|%T'); 14793 END 14794 OUTPUT 14795 select time_format(19980131010203, '%H|%I|%k|%l|%i|%p|%r|%S|%T') from dual 14796 END 14797 INPUT 14798 select format(col2,8) from t1; 14799 END 14800 OUTPUT 14801 select format(col2, 8) from t1 14802 END 14803 INPUT 14804 select hex(a) from t1 ignore key(a) where a like 'A_' order by a; 14805 END 14806 ERROR 14807 syntax error at position 33 near 'key' 14808 END 14809 INPUT 14810 select char(196 using utf8); 14811 END 14812 ERROR 14813 syntax error at position 22 near 'using' 14814 END 14815 INPUT 14816 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_romanian_ci; 14817 END 14818 OUTPUT 14819 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_romanian_ci 14820 END 14821 INPUT 14822 select substring_index('www.tcx.se','.',-2),substring_index('www.tcx.se','.',1); 14823 END 14824 OUTPUT 14825 select substring_index('www.tcx.se', '.', -2), substring_index('www.tcx.se', '.', 1) from dual 14826 END 14827 INPUT 14828 select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2; 14829 END 14830 OUTPUT 14831 select a1, a2, b, min(c), max(c) from t2 where b is null group by a1, a2 14832 END 14833 INPUT 14834 select concat("-",a,"-",b,"-") from t1 ignore index (b) where b="hello "; 14835 END 14836 OUTPUT 14837 select concat('-', a, '-', b, '-') from t1 ignore index (b) where b = 'hello ' 14838 END 14839 INPUT 14840 select t2.isbn,city,t1.libname,count(distinct t1.libname) as a from t3 left join t1 on t3.libname=t1.libname left join t2 on t3.isbn=t2.isbn group by city having count(distinct t1.libname) > 1; 14841 END 14842 OUTPUT 14843 select t2.isbn, city, t1.libname, count(distinct t1.libname) as a from t3 left join t1 on t3.libname = t1.libname left join t2 on t3.isbn = t2.isbn group by city having count(distinct t1.libname) > 1 14844 END 14845 INPUT 14846 select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%"; 14847 END 14848 OUTPUT 14849 select t2.fld3 from t2 where companynr = 58 and fld3 like '%imaginable%' 14850 END 14851 INPUT 14852 select S.ID as xID, S.ID1 as xID1, repeat('*',count(distinct yS.ID)) as Level from t1 as S left join t1 as yS on S.ID1 between yS.ID1 and yS.ID2 group by xID order by xID1; 14853 END 14854 OUTPUT 14855 select S.ID as xID, S.ID1 as xID1, repeat('*', count(distinct yS.ID)) as `Level` from t1 as S left join t1 as yS on S.ID1 between yS.ID1 and yS.ID2 group by xID order by xID1 asc 14856 END 14857 INPUT 14858 select t1.col1 from t1 where t1.col2 in (select t2.col2 from t2 group by t2.col1, t2.col2 having col_t1 <= 10); 14859 END 14860 OUTPUT 14861 select t1.col1 from t1 where t1.col2 in (select t2.col2 from t2 group by t2.col1, t2.col2 having col_t1 <= 10) 14862 END 14863 INPUT 14864 select substring('hello', 18446744073709551617, 18446744073709551617); 14865 END 14866 OUTPUT 14867 select substr('hello', 18446744073709551617, 18446744073709551617) from dual 14868 END 14869 INPUT 14870 select repeat('hello', 4294967296); 14871 END 14872 OUTPUT 14873 select repeat('hello', 4294967296) from dual 14874 END 14875 INPUT 14876 select from t1 where not(a is null); 14877 END 14878 ERROR 14879 syntax error at position 12 near 'from' 14880 END 14881 INPUT 14882 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name = 'tm' and index_name = 'l' order by table_name; 14883 END 14884 OUTPUT 14885 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name = 'tm' and index_name = 'l' order by table_name asc 14886 END 14887 INPUT 14888 select log(2,-1); 14889 END 14890 OUTPUT 14891 select log(2, -1) from dual 14892 END 14893 INPUT 14894 select a from t1 having a=3; 14895 END 14896 OUTPUT 14897 select a from t1 having a = 3 14898 END 14899 INPUT 14900 select a,concat(b,'.') from t1; 14901 END 14902 OUTPUT 14903 select a, concat(b, '.') from t1 14904 END 14905 INPUT 14906 select from t1 where MATCH a,b AGAINST ('"text search" -"now support"' IN BOOLEAN MODE); 14907 END 14908 ERROR 14909 syntax error at position 12 near 'from' 14910 END 14911 INPUT 14912 select _rowid,t1._rowid,skey,sval from t1; 14913 END 14914 OUTPUT 14915 select _rowid, t1._rowid, skey, sval from t1 14916 END 14917 INPUT 14918 select hex(_utf32 X'3344'); 14919 END 14920 OUTPUT 14921 select hex(_utf32 X'3344') from dual 14922 END 14923 INPUT 14924 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_polish_ci; 14925 END 14926 OUTPUT 14927 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_polish_ci 14928 END 14929 INPUT 14930 select -((9223372036854775808)); 14931 END 14932 OUTPUT 14933 select -9223372036854775808 from dual 14934 END 14935 INPUT 14936 select from information_schema.COLUMN_PRIVILEGES where grantee like '%mysqltest_1%'; 14937 END 14938 ERROR 14939 syntax error at position 12 near 'from' 14940 END 14941 INPUT 14942 select a from t1 order by a; 14943 END 14944 OUTPUT 14945 select a from t1 order by a asc 14946 END 14947 INPUT 14948 select collation(rtrim(_latin2' a ')), coercibility(rtrim(_latin2' a ')); 14949 END 14950 OUTPUT 14951 select collation(rtrim(_latin2 ' a ')), coercibility(rtrim(_latin2 ' a ')) from dual 14952 END 14953 INPUT 14954 select strcmp('s�', '�a'), strcmp('a�', '�x'); 14955 END 14956 OUTPUT 14957 select strcmp('s�', '�a'), strcmp('a�', '�x') from dual 14958 END 14959 INPUT 14960 select from_unixtime(0); 14961 END 14962 OUTPUT 14963 select from_unixtime(0) from dual 14964 END 14965 INPUT 14966 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_unicode_ci; 14967 END 14968 OUTPUT 14969 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_unicode_ci 14970 END 14971 INPUT 14972 select ST_GeomFromText('linestring(5 5, 15 4)') into @l; 14973 END 14974 ERROR 14975 syntax error at position 56 near 'l' 14976 END 14977 INPUT 14978 select a1,a2,b,min(c),max(c) from t1 where a1 >= 'c' or a2 < 'b' group by a1,a2,b; 14979 END 14980 OUTPUT 14981 select a1, a2, b, min(c), max(c) from t1 where a1 >= 'c' or a2 < 'b' group by a1, a2, b 14982 END 14983 INPUT 14984 select from float_test; 14985 END 14986 ERROR 14987 syntax error at position 12 near 'from' 14988 END 14989 INPUT 14990 select sum(a) + 200 as the_sum, @Oporto as the_town from t1 where a > 1 group by b having avg(a) > 2; 14991 END 14992 OUTPUT 14993 select sum(a) + 200 as the_sum, @Oporto as the_town from t1 where a > 1 group by b having avg(a) > 2 14994 END 14995 INPUT 14996 select isnull(week(now() + 0)), isnull(week(now() + 0.2)), week(20061108), week(20061108.01), week(20061108085411.000002); 14997 END 14998 OUTPUT 14999 select isnull(week(now() + 0)), isnull(week(now() + 0.2)), week(20061108), week(20061108.01), week(20061108085411.000002) from dual 15000 END 15001 INPUT 15002 select hex(substr(_utf32 0x000000e4000000e500000068,1)); 15003 END 15004 OUTPUT 15005 select hex(substr(_utf32 0x000000e4000000e500000068, 1)) from dual 15006 END 15007 INPUT 15008 select min(a5), max(a5) from t1; 15009 END 15010 OUTPUT 15011 select min(a5), max(a5) from t1 15012 END 15013 INPUT 15014 select conv(29223372036854775809, -10, 16) as conv_signed, conv(29223372036854775809, 10, 16) as conv_unsigned; 15015 END 15016 OUTPUT 15017 select conv(29223372036854775809, -10, 16) as conv_signed, conv(29223372036854775809, 10, 16) as conv_unsigned from dual 15018 END 15019 INPUT 15020 select collation(convert('a', char(2))), collation(convert('a', char(2) binary)); 15021 END 15022 ERROR 15023 syntax error at position 79 near 'binary' 15024 END 15025 INPUT 15026 select a as foo, (select t1_inner.b from t1 as t1_inner where t1_inner.a=t1_outer.a+1) as bar from t1 as t1_outer group by a having bar<30 order by bar+5; 15027 END 15028 OUTPUT 15029 select a as foo, (select t1_inner.b from t1 as t1_inner where t1_inner.a = t1_outer.a + 1) as bar from t1 as t1_outer group by a having bar < 30 order by bar + 5 asc 15030 END 15031 INPUT 15032 select count(a) from t1 where a = 1; 15033 END 15034 OUTPUT 15035 select count(a) from t1 where a = 1 15036 END 15037 INPUT 15038 select a from t3 order by a desc limit 10; 15039 END 15040 OUTPUT 15041 select a from t3 order by a desc limit 10 15042 END 15043 INPUT 15044 select a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b; 15045 END 15046 OUTPUT 15047 select a1, a2, b from t2 where a1 > 'a' and a2 > 'a' and b = 'c' group by a1, a2, b 15048 END 15049 INPUT 15050 select from general_log; 15051 END 15052 ERROR 15053 syntax error at position 12 near 'from' 15054 END 15055 INPUT 15056 select @@keycache2.key_cache_block_size; 15057 END 15058 OUTPUT 15059 select @@keycache2.key_cache_block_size from dual 15060 END 15061 INPUT 15062 select date_add("1997-12-31 23:59:59",INTERVAL "1 1:1:1" DAY_SECOND); 15063 END 15064 OUTPUT 15065 select date_add('1997-12-31 23:59:59', interval '1 1:1:1' DAY_SECOND) from dual 15066 END 15067 INPUT 15068 select NULL=NULL,NULL<>NULL,IFNULL(NULL,1.1)+0,IFNULL(NULL,1) | 0; 15069 END 15070 OUTPUT 15071 select null = null, null != null, IFNULL(null, 1.1) + 0, IFNULL(null, 1) | 0 from dual 15072 END 15073 INPUT 15074 select from t1 where MATCH(a,b) AGAINST("sear*" IN BOOLEAN MODE); 15075 END 15076 ERROR 15077 syntax error at position 12 near 'from' 15078 END 15079 INPUT 15080 select count(*) from t1 where id IS NOT NULL; 15081 END 15082 OUTPUT 15083 select count(*) from t1 where id is not null 15084 END 15085 INPUT 15086 select a as 'x', t1.* from t1; 15087 END 15088 OUTPUT 15089 select a as x, t1.* from t1 15090 END 15091 INPUT 15092 select date_add(NULL,INTERVAL 100000 SECOND); 15093 END 15094 OUTPUT 15095 select date_add(null, interval 100000 SECOND) from dual 15096 END 15097 INPUT 15098 select from information_schema.tables where table_schema = NULL; 15099 END 15100 ERROR 15101 syntax error at position 12 near 'from' 15102 END 15103 INPUT 15104 select @@keycache1.key_cache_block_size; 15105 END 15106 OUTPUT 15107 select @@keycache1.key_cache_block_size from dual 15108 END 15109 INPUT 15110 select rand(rand); 15111 END 15112 OUTPUT 15113 select rand(rand) from dual 15114 END 15115 INPUT 15116 select round(1e0, -309), truncate(1e0, -309); 15117 END 15118 OUTPUT 15119 select round(1e0, -309), truncate(1e0, -309) from dual 15120 END 15121 INPUT 15122 select str_to_date(a,b) from t1; 15123 END 15124 OUTPUT 15125 select str_to_date(a, b) from t1 15126 END 15127 INPUT 15128 select count(*) from t1 where match a against ('aaayyy' in boolean mode); 15129 END 15130 ERROR 15131 syntax error at position 38 near 'a' 15132 END 15133 INPUT 15134 select time("1997-12-31 23:59:59.000001"); 15135 END 15136 OUTPUT 15137 select time('1997-12-31 23:59:59.000001') from dual 15138 END 15139 INPUT 15140 select substring_index('aaaaaaaaa1','aa',-4); 15141 END 15142 OUTPUT 15143 select substring_index('aaaaaaaaa1', 'aa', -4) from dual 15144 END 15145 INPUT 15146 select right('hello', 10); 15147 END 15148 OUTPUT 15149 select right('hello', 10) from dual 15150 END 15151 INPUT 15152 select dayofmonth("1997-01-02"),dayofmonth(19970323); 15153 END 15154 OUTPUT 15155 select dayofmonth('1997-01-02'), dayofmonth(19970323) from dual 15156 END 15157 INPUT 15158 select unix_timestamp('1969-12-30 01:00:00'); 15159 END 15160 OUTPUT 15161 select unix_timestamp('1969-12-30 01:00:00') from dual 15162 END 15163 INPUT 15164 select from t1 where xxx regexp('is a test of some long text to se'); 15165 END 15166 ERROR 15167 syntax error at position 12 near 'from' 15168 END 15169 INPUT 15170 select from t1 where not((a < 5 or a < 10) and (not(a > 16) or a > 17)); 15171 END 15172 ERROR 15173 syntax error at position 12 near 'from' 15174 END 15175 INPUT 15176 select 1,11,101,1001,10001,100001,1000001,10000001,100000001,1000000001,10000000001,100000000001,1000000000001,10000000000001,100000000000001,1000000000000001,10000000000000001,100000000000000001,1000000000000000001,10000000000000000001; 15177 END 15178 OUTPUT 15179 select 1, 11, 101, 1001, 10001, 100001, 1000001, 10000001, 100000001, 1000000001, 10000000001, 100000000001, 1000000000001, 10000000000001, 100000000000001, 1000000000000001, 10000000000000001, 100000000000000001, 1000000000000000001, 10000000000000000001 from dual 15180 END 15181 INPUT 15182 select i, count(*), std(o1/o2) from bug22555 group by i order by i; 15183 END 15184 OUTPUT 15185 select i, count(*), std(o1 / o2) from bug22555 group by i order by i asc 15186 END 15187 INPUT 15188 select max(case col when 1 then val else null end) as color from t1 group by `row`; 15189 END 15190 OUTPUT 15191 select max(case col when 1 then val else null end) as color from t1 group by `row` 15192 END 15193 INPUT 15194 select count(*) > 3 from t1 group by a order by b; 15195 END 15196 OUTPUT 15197 select count(*) > 3 from t1 group by a order by b asc 15198 END 15199 INPUT 15200 select from t1 group by f2; 15201 END 15202 ERROR 15203 syntax error at position 12 near 'from' 15204 END 15205 INPUT 15206 select make_set(3,c1,'�'), make_set(3,'�',c1) from t1; 15207 END 15208 OUTPUT 15209 select make_set(3, c1, '�'), make_set(3, '�', c1) from t1 15210 END 15211 INPUT 15212 select a.id, a.description, count(b.id) as c from t1 a left join t3 b on a.id=b.order_id group by a.id, a.description having (a.description is not null) and (c=0); 15213 END 15214 OUTPUT 15215 select a.id, a.description, count(b.id) as c from t1 as a left join t3 as b on a.id = b.order_id group by a.id, a.description having a.description is not null and c = 0 15216 END 15217 INPUT 15218 select t1.a,t2.b from t1,t2 where t1.a=t2.a group by t1.a,t2.b; 15219 END 15220 OUTPUT 15221 select t1.a, t2.b from t1, t2 where t1.a = t2.a group by t1.a, t2.b 15222 END 15223 INPUT 15224 select from t1 where a = 2 or not(a < 10); 15225 END 15226 ERROR 15227 syntax error at position 12 near 'from' 15228 END 15229 INPUT 15230 select grp,group_concat(c order by grp desc) from t1 group by grp order by grp; 15231 END 15232 OUTPUT 15233 select grp, group_concat(c order by grp desc) from t1 group by grp order by grp asc 15234 END 15235 INPUT 15236 select a1,a2,b,min(c),max(c) from t2 where (b = 'b') group by a1,a2; 15237 END 15238 OUTPUT 15239 select a1, a2, b, min(c), max(c) from t2 where b = 'b' group by a1, a2 15240 END 15241 INPUT 15242 select (select t2.* from t2) from t1; 15243 END 15244 OUTPUT 15245 select (select t2.* from t2) from t1 15246 END 15247 INPUT 15248 select from t1 left outer join t2 using (f2) left outer join t3 using (f3); 15249 END 15250 ERROR 15251 syntax error at position 12 near 'from' 15252 END 15253 INPUT 15254 select concat_ws(c1,'�','�'), concat_ws('�',c1,'�') from t1; 15255 END 15256 OUTPUT 15257 select concat_ws(c1, '�', '�'), concat_ws('�', c1, '�') from t1 15258 END 15259 INPUT 15260 select c c3 from t1 where c='3'; 15261 END 15262 OUTPUT 15263 select c as c3 from t1 where c = '3' 15264 END 15265 INPUT 15266 select from t1 where MATCH a AGAINST ("search" IN BOOLEAN MODE); 15267 END 15268 ERROR 15269 syntax error at position 12 near 'from' 15270 END 15271 INPUT 15272 select from t1 where concat(A,C,B,D) = 'AAAA2003-03-011051'; 15273 END 15274 ERROR 15275 syntax error at position 12 near 'from' 15276 END 15277 INPUT 15278 select from m1; 15279 END 15280 ERROR 15281 syntax error at position 12 near 'from' 15282 END 15283 INPUT 15284 select hex(weight_string('a' as char(1))); 15285 END 15286 ERROR 15287 syntax error at position 38 15288 END 15289 INPUT 15290 select t1.id, count(t2.id) from t1,t2 where t2.id = t1.id group by t2.id; 15291 END 15292 OUTPUT 15293 select t1.id, count(t2.id) from t1, t2 where t2.id = t1.id group by t2.id 15294 END 15295 INPUT 15296 select hex(@utf84); 15297 END 15298 OUTPUT 15299 select hex(@utf84) from dual 15300 END 15301 INPUT 15302 select truncate(1.5, -4294967296), truncate(1.5, 4294967296); 15303 END 15304 OUTPUT 15305 select truncate(1.5, -4294967296), truncate(1.5, 4294967296) from dual 15306 END 15307 INPUT 15308 select hex(inet_aton('127.1')); 15309 END 15310 OUTPUT 15311 select hex(inet_aton('127.1')) from dual 15312 END 15313 INPUT 15314 select left('hello', 18446744073709551617); 15315 END 15316 OUTPUT 15317 select left('hello', 18446744073709551617) from dual 15318 END 15319 INPUT 15320 select unix_timestamp('2038-01-19 07:14:07'); 15321 END 15322 OUTPUT 15323 select unix_timestamp('2038-01-19 07:14:07') from dual 15324 END 15325 INPUT 15326 select from (t3 natural join t4) natural right join (t1 natural join t2); 15327 END 15328 ERROR 15329 syntax error at position 12 near 'from' 15330 END 15331 INPUT 15332 select from t1 group by f1, f2; 15333 END 15334 ERROR 15335 syntax error at position 12 near 'from' 15336 END 15337 INPUT 15338 select quote(name) from bug20536; 15339 END 15340 OUTPUT 15341 select quote(`name`) from bug20536 15342 END 15343 INPUT 15344 select round(111,-10); 15345 END 15346 OUTPUT 15347 select round(111, -10) from dual 15348 END 15349 INPUT 15350 select charset(group_concat(c1 order by c2)) from t1; 15351 END 15352 OUTPUT 15353 select charset(group_concat(c1 order by c2 asc)) from t1 15354 END 15355 INPUT 15356 select ST_astext(ST_Intersection(ST_GeomFromText('LINESTRING(0 0, 50 45, 40 50, 0 0)'), ST_GeomFromText('LINESTRING(50 5, 55 10, 0 45, 50 5)'))); 15357 END 15358 OUTPUT 15359 select ST_astext(ST_Intersection(ST_GeomFromText('LINESTRING(0 0, 50 45, 40 50, 0 0)'), ST_GeomFromText('LINESTRING(50 5, 55 10, 0 45, 50 5)'))) from dual 15360 END 15361 INPUT 15362 select load_file("/proc/self/fd/0"); 15363 END 15364 OUTPUT 15365 select load_file('/proc/self/fd/0') from dual 15366 END 15367 INPUT 15368 select hex(c), c, name from t1 order by 1; 15369 END 15370 OUTPUT 15371 select hex(c), c, `name` from t1 order by 1 asc 15372 END 15373 INPUT 15374 select "NEW CONNECTION"; 15375 END 15376 OUTPUT 15377 select 'NEW CONNECTION' from dual 15378 END 15379 INPUT 15380 select st_astext(st_intersection(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))); 15381 END 15382 OUTPUT 15383 select st_astext(st_intersection(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))) from dual 15384 END 15385 INPUT 15386 select Fld1, max(Fld2) from t1 group by Fld1 having std(Fld2) is not null; 15387 END 15388 OUTPUT 15389 select Fld1, max(Fld2) from t1 group by Fld1 having std(Fld2) is not null 15390 END 15391 INPUT 15392 select SQL_BIG_RESULT distinct t1.a from t1, t2 group by t1.b order by 1; 15393 END 15394 ERROR 15395 syntax error at position 31 near 'distinct' 15396 END 15397 INPUT 15398 select t1.time+0,t1.date+0,t1.timestamp+0,concat(date," ",time), t1.quarter+t1.week, t1.year+timestampadd, timestampdiff from t1; 15399 END 15400 ERROR 15401 syntax error at position 107 15402 END 15403 INPUT 15404 select substring_index('aaaaaaaaa1','aa',1); 15405 END 15406 OUTPUT 15407 select substring_index('aaaaaaaaa1', 'aa', 1) from dual 15408 END 15409 INPUT 15410 select -(0-3),round(-(0-3)), round(9999999999999999999); 15411 END 15412 OUTPUT 15413 select -(0 - 3), round(-(0 - 3)), round(9999999999999999999) from dual 15414 END 15415 INPUT 15416 select sum(col1) as co2, count(col2) as cc from t1 group by col1 having col1 =10; 15417 END 15418 OUTPUT 15419 select sum(col1) as co2, count(col2) as cc from t1 group by col1 having col1 = 10 15420 END 15421 INPUT 15422 select concat(a, if(b>10, N'æ', N'ß')) from t1; 15423 END 15424 OUTPUT 15425 select concat(a, if(b > 10, N'æ', N'ß')) from t1 15426 END 15427 INPUT 15428 select date_format(19980021000000,'%H|%I|%k|%l|%i|%p|%r|%S|%T| %M|%W|%D|%Y|%y|%a|%b|%j|%m|%d|%h|%s|%w'); 15429 END 15430 OUTPUT 15431 select date_format(19980021000000, '%H|%I|%k|%l|%i|%p|%r|%S|%T| %M|%W|%D|%Y|%y|%a|%b|%j|%m|%d|%h|%s|%w') from dual 15432 END 15433 INPUT 15434 select 1, ST_Intersects(ST_GeomFromText('LINESTRING(15 15, 50 50)'), ST_GeomFromText('LINESTRING(16 16, 51 51)')); 15435 END 15436 OUTPUT 15437 select 1, ST_Intersects(ST_GeomFromText('LINESTRING(15 15, 50 50)'), ST_GeomFromText('LINESTRING(16 16, 51 51)')) from dual 15438 END 15439 INPUT 15440 select ST_astext(st_difference(ST_GeomFromText('multipoint(2 2, 3 3)'), ST_GeomFromText('multipoint(2 2, 3 3)'))); 15441 END 15442 OUTPUT 15443 select ST_astext(st_difference(ST_GeomFromText('multipoint(2 2, 3 3)'), ST_GeomFromText('multipoint(2 2, 3 3)'))) from dual 15444 END 15445 INPUT 15446 select bit_length('; 15447 END 15448 ERROR 15449 syntax error at position 21 near ';' 15450 END 15451 INPUT 15452 select from t3 order by a desc; 15453 END 15454 ERROR 15455 syntax error at position 12 near 'from' 15456 END 15457 INPUT 15458 select st_astext(st_difference(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))); 15459 END 15460 OUTPUT 15461 select st_astext(st_difference(ST_GeometryFromText('geometrycollection(polygon((0 0, 1 0, 1 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))'))) from dual 15462 END 15463 INPUT 15464 select coercibility(col1), collation(col1)from v2; 15465 END 15466 OUTPUT 15467 select coercibility(col1), collation(col1) from v2 15468 END 15469 INPUT 15470 select hex(char(0x01020304 using utf32)); 15471 END 15472 ERROR 15473 syntax error at position 33 near 'using' 15474 END 15475 INPUT 15476 select count(distinct case when id<=64 then id end) from tb; 15477 END 15478 OUTPUT 15479 select count(distinct case when id <= 64 then id end) from tb 15480 END 15481 INPUT 15482 select from t1 where xxx regexp('is a test of some long text to'); 15483 END 15484 ERROR 15485 syntax error at position 12 near 'from' 15486 END 15487 INPUT 15488 select b from t1 group by binary b like ''; 15489 END 15490 OUTPUT 15491 select b from t1 group by binary b like '' 15492 END 15493 INPUT 15494 select hex(_utf32 0x3344); 15495 END 15496 OUTPUT 15497 select hex(_utf32 0x3344) from dual 15498 END 15499 INPUT 15500 select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')>time('00:00:00'); 15501 END 15502 OUTPUT 15503 select timediff('2008-09-29 20:10:10', '2008-09-30 20:10:10') > time('00:00:00') from dual 15504 END 15505 INPUT 15506 select st_touches(ST_GeomFromText('point(1 1)'), ST_GeomFromText('point(1 1)')); 15507 END 15508 OUTPUT 15509 select st_touches(ST_GeomFromText('point(1 1)'), ST_GeomFromText('point(1 1)')) from dual 15510 END 15511 INPUT 15512 select SUBSTRING_INDEX(_latin1'abcdabcdabcd' COLLATE latin1_bin,_latin1'd',2); 15513 END 15514 OUTPUT 15515 select SUBSTRING_INDEX(_latin1 'abcdabcdabcd' collate latin1_bin, _latin1 'd', 2) from dual 15516 END 15517 INPUT 15518 select fld3 FROM t2 order by fld3 desc limit 10; 15519 END 15520 OUTPUT 15521 select fld3 from t2 order by fld3 desc limit 10 15522 END 15523 INPUT 15524 select group_concat(a1 order by (t1.a IN (select a0 from t2))) from t1; 15525 END 15526 OUTPUT 15527 select group_concat(a1 order by t1.a in (select a0 from t2) asc) from t1 15528 END 15529 INPUT 15530 select st_within(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 15531 END 15532 OUTPUT 15533 select st_within(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 15534 END 15535 INPUT 15536 select timediff("1997-01-01 23:59:59.000001","1995-12-31 23:59:59.000002"); 15537 END 15538 OUTPUT 15539 select timediff('1997-01-01 23:59:59.000001', '1995-12-31 23:59:59.000002') from dual 15540 END 15541 INPUT 15542 select a as foo, (select t1_inner.b from t1 as t1_inner where t1_inner.a=t1_outer.a+1) as bar from t1 as t1_outer group by foo having bar<30 order by bar+5; 15543 END 15544 OUTPUT 15545 select a as foo, (select t1_inner.b from t1 as t1_inner where t1_inner.a = t1_outer.a + 1) as bar from t1 as t1_outer group by foo having bar < 30 order by bar + 5 asc 15546 END 15547 INPUT 15548 select group_concat(distinct a order by a desc) from t1; 15549 END 15550 OUTPUT 15551 select group_concat(distinct a order by a desc) from t1 15552 END 15553 INPUT 15554 select ST_astext(ST_symdifference(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 1 0, 0 0,0 1, 0 0))'))) as result; 15555 END 15556 OUTPUT 15557 select ST_astext(ST_symdifference(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 1 0, 0 0,0 1, 0 0))'))) as result from dual 15558 END 15559 INPUT 15560 select extract(HOUR_SECOND FROM "10:11:12"); 15561 END 15562 OUTPUT 15563 select extract(hour_second from '10:11:12') from dual 15564 END 15565 INPUT 15566 select a as like_lllll from t1 where a like 'lllll%'; 15567 END 15568 OUTPUT 15569 select a as like_lllll from t1 where a like 'lllll%' 15570 END 15571 INPUT 15572 select format(NULL, NULL); 15573 END 15574 OUTPUT 15575 select format(null, null) from dual 15576 END 15577 INPUT 15578 select t1.col1 from t1 where t1.col2 in (select t2.col2 from t2 group by t2.col1, t2.col2 having t2.col1 <= (select min(t3.col1) from t3)); 15579 END 15580 OUTPUT 15581 select t1.col1 from t1 where t1.col2 in (select t2.col2 from t2 group by t2.col1, t2.col2 having t2.col1 <= (select min(t3.col1) from t3)) 15582 END 15583 INPUT 15584 select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on t2.b=t3.a order by 1; 15585 END 15586 OUTPUT 15587 select t2.b, ifnull(t2.b, 'this is null') from t1 as t2 left join t1 as t3 on t2.b = t3.a order by 1 asc 15588 END 15589 INPUT 15590 select cast('abc' as signed); 15591 END 15592 OUTPUT 15593 select convert('abc', signed) from dual 15594 END 15595 INPUT 15596 select hex(_utf8mb4 0x616263FF); 15597 END 15598 OUTPUT 15599 select hex(_utf8mb4 0x616263FF) from dual 15600 END 15601 INPUT 15602 select t2.fld3,companynr FROM t2 where companynr = 57+1 order by fld3; 15603 END 15604 OUTPUT 15605 select t2.fld3, companynr from t2 where companynr = 57 + 1 order by fld3 asc 15606 END 15607 INPUT 15608 select cast(NULL as unsigned), cast(1/0 as unsigned); 15609 END 15610 OUTPUT 15611 select convert(null, unsigned), convert(1 / 0, unsigned) from dual 15612 END 15613 INPUT 15614 select Host,Db,User,Table_name,Column_name,Column_priv from mysql.columns_priv order by Column_name; 15615 END 15616 OUTPUT 15617 select Host, Db, `User`, Table_name, Column_name, Column_priv from mysql.columns_priv order by Column_name asc 15618 END 15619 INPUT 15620 select COLUMN_NAME from information_schema.columns where table_schema='test' order by COLUMN_NAME; 15621 END 15622 OUTPUT 15623 select COLUMN_NAME from information_schema.`columns` where table_schema = 'test' order by COLUMN_NAME asc 15624 END 15625 INPUT 15626 select @@GLOBAL.relay_log_info_repository into @save_relay_log_info_repository; 15627 END 15628 ERROR 15629 syntax error at position 79 near 'save_relay_log_info_repository' 15630 END 15631 INPUT 15632 select SUBSTR('abcdefg',-1,-1) FROM DUAL; 15633 END 15634 OUTPUT 15635 select substr('abcdefg', -1, -1) from dual 15636 END 15637 INPUT 15638 select char_length(_utf16 0xD800DC00), octet_length(_utf16 0xD800DC00); 15639 END 15640 OUTPUT 15641 select char_length(_utf16 0xD800DC00), octet_length(_utf16 0xD800DC00) from dual 15642 END 15643 INPUT 15644 select cast(10000002383263201056 as unsigned) mod 50 as result; 15645 END 15646 OUTPUT 15647 select convert(10000002383263201056, unsigned) % 50 as result from dual 15648 END 15649 INPUT 15650 select floor(conv(@my_uuidate,16,10)/@my_uuid_one_day) into @my_uuid_date; 15651 END 15652 ERROR 15653 syntax error at position 74 near 'my_uuid_date' 15654 END 15655 INPUT 15656 select a1,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1; 15657 END 15658 OUTPUT 15659 select a1, max(c), min(c) from t3 where a2 = 'a' and b = 'b' group by a1 15660 END 15661 INPUT 15662 select st_crosses(ST_GeometryFromText('geometrycollection(multipoint(0 0, 1 0, 1 1, 0 1, 0 0))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))')); 15663 END 15664 OUTPUT 15665 select st_crosses(ST_GeometryFromText('geometrycollection(multipoint(0 0, 1 0, 1 1, 0 1, 0 0))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 2 0, 2 1, 1 1, 1 0)))')) from dual 15666 END 15667 INPUT 15668 select a1,a2,min(b),c from t2 where (a2 = 'a') and (c = 'a111') group by a1; 15669 END 15670 OUTPUT 15671 select a1, a2, min(b), c from t2 where a2 = 'a' and c = 'a111' group by a1 15672 END 15673 INPUT 15674 select locate('HE','hello' collate ujis_bin); 15675 END 15676 OUTPUT 15677 select locate('HE', 'hello' collate ujis_bin) from dual 15678 END 15679 INPUT 15680 select date_add("1997-12-31 23:59:59",INTERVAL NULL MINUTE_SECOND); 15681 END 15682 OUTPUT 15683 select date_add('1997-12-31 23:59:59', interval null MINUTE_SECOND) from dual 15684 END 15685 INPUT 15686 select timestampdiff(month,'2005-09-11','2004-09-11'); 15687 END 15688 OUTPUT 15689 select timestampdiff(month, '2005-09-11', '2004-09-11') from dual 15690 END 15691 INPUT 15692 select max(a3) from t1 where a2 is null; 15693 END 15694 OUTPUT 15695 select max(a3) from t1 where a2 is null 15696 END 15697 INPUT 15698 select CASE "b" when "a" then 1 when binary "B" then 2 WHEN "b" then "ok" END; 15699 END 15700 OUTPUT 15701 select case 'b' when 'a' then 1 when binary 'B' then 2 when 'b' then 'ok' end from dual 15702 END 15703 INPUT 15704 select id,concat(facility) from t1 group by id; 15705 END 15706 OUTPUT 15707 select id, concat(facility) from t1 group by id 15708 END 15709 INPUT 15710 select substring_index('the king of the the hill','the',2); 15711 END 15712 OUTPUT 15713 select substring_index('the king of the the hill', 'the', 2) from dual 15714 END 15715 INPUT 15716 select lpad('hello', 4294967295, '1'); 15717 END 15718 OUTPUT 15719 select lpad('hello', 4294967295, '1') from dual 15720 END 15721 INPUT 15722 select min(a) is null or null from t1; 15723 END 15724 OUTPUT 15725 select min(a) is null or null from t1 15726 END 15727 INPUT 15728 select a, not(not(a)) from t1; 15729 END 15730 OUTPUT 15731 select a, not not a from t1 15732 END 15733 INPUT 15734 select substring_index('aaaaaaaaa1','aaaa',1); 15735 END 15736 OUTPUT 15737 select substring_index('aaaaaaaaa1', 'aaaa', 1) from dual 15738 END 15739 INPUT 15740 select st_distance(ST_GeomFromText('geometrycollection(geometrycollection(),polygon((0 0,0 10,10 10,10 0,0 0)))'),ST_GeomFromText('linestring(0 0,10 10)')); 15741 END 15742 OUTPUT 15743 select st_distance(ST_GeomFromText('geometrycollection(geometrycollection(),polygon((0 0,0 10,10 10,10 0,0 0)))'), ST_GeomFromText('linestring(0 0,10 10)')) from dual 15744 END 15745 INPUT 15746 select day("1997-12-31 23:59:59.000001"); 15747 END 15748 OUTPUT 15749 select day('1997-12-31 23:59:59.000001') from dual 15750 END 15751 INPUT 15752 select @@session.thread_handling; 15753 END 15754 OUTPUT 15755 select @@session.thread_handling from dual 15756 END 15757 INPUT 15758 select convert(_koi8r'�' using utf8) < convert(_koi8r'�' using utf8); 15759 END 15760 OUTPUT 15761 select convert(_koi8r '�' using utf8) < convert(_koi8r '�' using utf8) from dual 15762 END 15763 INPUT 15764 select rpad('hello', -1, '1'); 15765 END 15766 OUTPUT 15767 select rpad('hello', -1, '1') from dual 15768 END 15769 INPUT 15770 select strcmp(localtimestamp(),concat(current_date()," ",current_time())); 15771 END 15772 OUTPUT 15773 select strcmp(localtimestamp(), concat(current_date(), ' ', current_time())) from dual 15774 END 15775 INPUT 15776 select "18383815659218730760" + 0; 15777 END 15778 OUTPUT 15779 select '18383815659218730760' + 0 from dual 15780 END 15781 INPUT 15782 select count(*) from t1 where id1 > 5; 15783 END 15784 OUTPUT 15785 select count(*) from t1 where id1 > 5 15786 END 15787 INPUT 15788 select round(4, -4294967200), truncate(4, -4294967200); 15789 END 15790 OUTPUT 15791 select round(4, -4294967200), truncate(4, -4294967200) from dual 15792 END 15793 INPUT 15794 select date_sub("1998-01-01 00:00:00.000001",INTERVAL "1:1:1.000002" HOUR_MICROSECOND); 15795 END 15796 OUTPUT 15797 select date_sub('1998-01-01 00:00:00.000001', interval '1:1:1.000002' HOUR_MICROSECOND) from dual 15798 END 15799 INPUT 15800 select hex(soundex(_utf8 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)); 15801 END 15802 OUTPUT 15803 select hex(soundex(_utf8 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB)) from dual 15804 END 15805 INPUT 15806 select a2 from t3 join (t1 join t2 using (a1)) on b=c1 join t4 using (c2); 15807 END 15808 OUTPUT 15809 select a2 from t3 join (t1 join t2 using (a1)) on b = c1 join t4 using (c2) 15810 END 15811 INPUT 15812 select s1 as after_delete_unicode_ci from t1 where s1 like 'ペテ%'; 15813 END 15814 OUTPUT 15815 select s1 as after_delete_unicode_ci from t1 where s1 like 'ペテ%' 15816 END 15817 INPUT 15818 select rpad('abcd',1,'ab'),lpad('abcd',1,'ab'); 15819 END 15820 OUTPUT 15821 select rpad('abcd', 1, 'ab'), lpad('abcd', 1, 'ab') from dual 15822 END 15823 INPUT 15824 select A.* from (t1 inner join (select from t2) as A on t1.ID = A.FID); 15825 END 15826 ERROR 15827 syntax error at position 44 near 'from' 15828 END 15829 INPUT 15830 select b.id, group_concat(b.name) from t1 a, t1 b group by b.id; 15831 END 15832 OUTPUT 15833 select b.id, group_concat(b.`name`) from t1 as a, t1 as b group by b.id 15834 END 15835 INPUT 15836 select 0 limit 0; 15837 END 15838 OUTPUT 15839 select 0 from dual limit 0 15840 END 15841 INPUT 15842 select 1, ST_Within(ST_GeomFromText('LINESTRING(15 15, 16 16)'), ST_GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))')); 15843 END 15844 OUTPUT 15845 select 1, ST_Within(ST_GeomFromText('LINESTRING(15 15, 16 16)'), ST_GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))')) from dual 15846 END 15847 INPUT 15848 select count(distinct n) from t1; 15849 END 15850 OUTPUT 15851 select count(distinct n) from t1 15852 END 15853 INPUT 15854 select concat('|', text1, '|') as c from t1 where text1='teststring' or text1 like 'teststring_%' order by c; 15855 END 15856 OUTPUT 15857 select concat('|', text1, '|') as c from t1 where text1 = 'teststring' or text1 like 'teststring_%' order by c asc 15858 END 15859 INPUT 15860 select table_name, column_name, privileges from information_schema.columns where table_schema = 'mysqltest' and table_name = 't1' order by table_name, column_name; 15861 END 15862 OUTPUT 15863 select table_name, column_name, `privileges` from information_schema.`columns` where table_schema = 'mysqltest' and table_name = 't1' order by table_name asc, column_name asc 15864 END 15865 INPUT 15866 select hex(ujis), hex(ucs2), hex(ujis2), name from t1 where ujis<>ujis2 order by ujis; 15867 END 15868 OUTPUT 15869 select hex(ujis), hex(ucs2), hex(ujis2), `name` from t1 where ujis != ujis2 order by ujis asc 15870 END 15871 INPUT 15872 select _koi8r'a' COLLATE koi8r_bin LIKE _koi8r'A'; 15873 END 15874 OUTPUT 15875 select _koi8r 'a' collate koi8r_bin like _koi8r 'A' from dual 15876 END 15877 INPUT 15878 select '2007-01-01' + interval a day from t1; 15879 END 15880 OUTPUT 15881 select '2007-01-01' + interval a day from t1 15882 END 15883 INPUT 15884 select count(*) from t2 right join t1 on (t1.id = t2.owner); 15885 END 15886 OUTPUT 15887 select count(*) from t2 right join t1 on t1.id = t2.owner 15888 END 15889 INPUT 15890 select rpad('hello', 4294967296, '1'); 15891 END 15892 OUTPUT 15893 select rpad('hello', 4294967296, '1') from dual 15894 END 15895 INPUT 15896 select t2.col2 from t2 group by t2.col1, t2.col2 having t1.col1 <= 10; 15897 END 15898 OUTPUT 15899 select t2.col2 from t2 group by t2.col1, t2.col2 having t1.col1 <= 10 15900 END 15901 INPUT 15902 select from t1 where a like "test%"; 15903 END 15904 ERROR 15905 syntax error at position 12 near 'from' 15906 END 15907 INPUT 15908 select 1+2/*hello*/+3; 15909 END 15910 OUTPUT 15911 select 1 + 2 + 3 from dual 15912 END 15913 INPUT 15914 select ceil(0.000000000000000009); 15915 END 15916 OUTPUT 15917 select ceil(0.000000000000000009) from dual 15918 END 15919 INPUT 15920 select rpad('abc', cast(5 as unsigned integer), 'x'); 15921 END 15922 OUTPUT 15923 select rpad('abc', convert(5, unsigned), 'x') from dual 15924 END 15925 INPUT 15926 select ~5, cast(~5 as signed); 15927 END 15928 OUTPUT 15929 select ~5, convert(~5, signed) from dual 15930 END 15931 INPUT 15932 select date_add("1997-12-31 23:59:59",INTERVAL NULL SECOND); 15933 END 15934 OUTPUT 15935 select date_add('1997-12-31 23:59:59', interval null SECOND) from dual 15936 END 15937 INPUT 15938 select 1 from t1 group by 2; 15939 END 15940 OUTPUT 15941 select 1 from t1 group by 2 15942 END 15943 INPUT 15944 select hex(convert(_eucjpms 0x8FABF841 using ucs2)); 15945 END 15946 OUTPUT 15947 select hex(convert(_eucjpms 0x8FABF841 using ucs2)) from dual 15948 END 15949 INPUT 15950 select count(distinct a1,a2,b,c) from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121'); 15951 END 15952 OUTPUT 15953 select count(distinct a1, a2, b, c) from t1 where a2 >= 'b' and b = 'a' and c = 'i121' 15954 END 15955 INPUT 15956 select (select distinct 1 from t1 t1_inner group by t1_inner.a order by max(t1_outer.b)) from t1 t1_outer; 15957 END 15958 OUTPUT 15959 select (select distinct 1 from t1 as t1_inner group by t1_inner.a order by max(t1_outer.b) asc) from t1 as t1_outer 15960 END 15961 INPUT 15962 select index_length into @paked_keys_size from information_schema.tables where table_name='t1'; 15963 END 15964 ERROR 15965 syntax error at position 42 near 'paked_keys_size' 15966 END 15967 INPUT 15968 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_croatian_ci; 15969 END 15970 OUTPUT 15971 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_croatian_ci 15972 END 15973 INPUT 15974 select var_samp(e) as '0.5', var_pop(e) as '0.25' from bug22555; 15975 END 15976 OUTPUT 15977 select var_samp(e) as `0.5`, var_pop(e) as `0.25` from bug22555 15978 END 15979 INPUT 15980 select Fld1, max(Fld2) as q from t1 group by Fld1 having q is not null; 15981 END 15982 OUTPUT 15983 select Fld1, max(Fld2) as q from t1 group by Fld1 having q is not null 15984 END 15985 INPUT 15986 select 'zвасяz' rlike '[[:<:]]вася[[:>:]]'; 15987 END 15988 OUTPUT 15989 select 'zвасяz' regexp '[[:<:]]вася[[:>:]]' from dual 15990 END 15991 INPUT 15992 select insert('hello', -1, -1, 'hi'); 15993 END 15994 ERROR 15995 syntax error at position 14 near 'insert' 15996 END 15997 INPUT 15998 select FIELD('b' COLLATE latin1_bin,'A','B'); 15999 END 16000 OUTPUT 16001 select FIELD('b' collate latin1_bin, 'A', 'B') from dual 16002 END 16003 INPUT 16004 select floor(cast(-2 as unsigned)), floor(18446744073709551614), floor(-2); 16005 END 16006 OUTPUT 16007 select floor(convert(-2, unsigned)), floor(18446744073709551614), floor(-2) from dual 16008 END 16009 INPUT 16010 select a.f1 as a, b.f3 as b, a.f1 > b.f3 as gt, a.f1 < b.f3 as lt, a.f1<=>b.f3 as eq from t1 a, t1 b; 16011 END 16012 OUTPUT 16013 select a.f1 as a, b.f3 as b, a.f1 > b.f3 as gt, a.f1 < b.f3 as lt, a.f1 <=> b.f3 as eq from t1 as a, t1 as b 16014 END 16015 INPUT 16016 select date_add('1996-02-29',Interval '1' year); 16017 END 16018 OUTPUT 16019 select date_add('1996-02-29', interval '1' year) from dual 16020 END 16021 INPUT 16022 select concat('|', text1, '|') from t1 where text1='teststring' or text1 >= 'teststring '; 16023 END 16024 OUTPUT 16025 select concat('|', text1, '|') from t1 where text1 = 'teststring' or text1 >= 'teststring\t' 16026 END 16027 INPUT 16028 select t1.*, t2.* from t1 left join t2 on t1.n = t2.n and t1.m = t2.m where t1.n = 1 order by t1.o,t1.m; 16029 END 16030 OUTPUT 16031 select t1.*, t2.* from t1 left join t2 on t1.n = t2.n and t1.m = t2.m where t1.n = 1 order by t1.o asc, t1.m asc 16032 END 16033 INPUT 16034 select CONNECTION_ID() into @thread_id; 16035 END 16036 ERROR 16037 syntax error at position 39 near 'thread_id' 16038 END 16039 INPUT 16040 select from information_schema.CHARACTER_SETS where CHARACTER_SET_NAME like 'latin1%' order by character_set_name; 16041 END 16042 ERROR 16043 syntax error at position 12 near 'from' 16044 END 16045 INPUT 16046 select "Test 'go' command g" as "_"; 16047 END 16048 OUTPUT 16049 select 'Test \'go\' command g' as _ from dual 16050 END 16051 INPUT 16052 select group_concat(a) from t1 group by b; 16053 END 16054 OUTPUT 16055 select group_concat(a) from t1 group by b 16056 END 16057 INPUT 16058 select ST_astext(st_union( st_intersection( multipoint(point(-1,-1)), point(1,-1) ), st_difference( multipoint(point(-1,1)), point(-1,-1) ))); 16059 END 16060 OUTPUT 16061 select ST_astext(st_union(st_intersection(multipoint(point(-1, -1)), point(1, -1)), st_difference(multipoint(point(-1, 1)), point(-1, -1)))) from dual 16062 END 16063 INPUT 16064 select from t1, lateral (with qn as (select t1.a) select (select max(a) from qn)) as dt; 16065 END 16066 ERROR 16067 syntax error at position 12 near 'from' 16068 END 16069 INPUT 16070 select referenced_table_schema, referenced_table_name from information_schema.key_column_usage where constraint_schema = 'db-1' and table_schema != 'PERFORMANCE_SCHEMA' order by referenced_table_schema, referenced_table_name; 16071 END 16072 OUTPUT 16073 select referenced_table_schema, referenced_table_name from information_schema.key_column_usage where constraint_schema = 'db-1' and table_schema != 'PERFORMANCE_SCHEMA' order by referenced_table_schema asc, referenced_table_name asc 16074 END 16075 INPUT 16076 select min(a1) from t1; 16077 END 16078 OUTPUT 16079 select min(a1) from t1 16080 END 16081 INPUT 16082 select strcmp('ss','�'),strcmp('�','ss'),strcmp('�s','sss'),strcmp('�q','ssq'); 16083 END 16084 OUTPUT 16085 select strcmp('ss', '�'), strcmp('�', 'ss'), strcmp('�s', 'sss'), strcmp('�q', 'ssq') from dual 16086 END 16087 INPUT 16088 select count(s1) from t1 group by s1 having s1*0=0; 16089 END 16090 OUTPUT 16091 select count(s1) from t1 group by s1 having s1 * 0 = 0 16092 END 16093 INPUT 16094 select visitor_id,max(ts) as mts from t1 group by visitor_id having mts < DATE_SUB(NOW(),INTERVAL 3 MONTH); 16095 END 16096 OUTPUT 16097 select visitor_id, max(ts) as mts from t1 group by visitor_id having mts < DATE_SUB(now(), interval 3 MONTH) 16098 END 16099 INPUT 16100 select f1, f2, if(f1, 40.0, 5.00) from t1 group by f1 order by f2; 16101 END 16102 OUTPUT 16103 select f1, f2, if(f1, 40.0, 5.00) from t1 group by f1 order by f2 asc 16104 END 16105 INPUT 16106 select var_samp(s) as '0.5', var_pop(s) as '0.25' from bug22555; 16107 END 16108 OUTPUT 16109 select var_samp(s) as `0.5`, var_pop(s) as `0.25` from bug22555 16110 END 16111 INPUT 16112 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name like 't%' and index_name = 'q' order by table_name; 16113 END 16114 OUTPUT 16115 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name like 't%' and index_name = 'q' order by table_name asc 16116 END 16117 INPUT 16118 select export_set(5, name, upper(name)) from bug20536; 16119 END 16120 OUTPUT 16121 select export_set(5, `name`, upper(`name`)) from bug20536 16122 END 16123 INPUT 16124 select convert(char(0xff,0x8f) using utf8); 16125 END 16126 OUTPUT 16127 select convert(char(0xff, 0x8f) using utf8) from dual 16128 END 16129 INPUT 16130 select count(*) from t1 where t = "aaa"; 16131 END 16132 OUTPUT 16133 select count(*) from t1 where t = 'aaa' 16134 END 16135 INPUT 16136 select hex(weight_string(cast(0xE0A1 as char))); 16137 END 16138 OUTPUT 16139 select hex(weight_string(convert(0xE0A1, char))) from dual 16140 END 16141 INPUT 16142 select col1 as count_col1,col2 from t1 as tmp1 group by col1,col2 having col2 = 'hello'; 16143 END 16144 OUTPUT 16145 select col1 as count_col1, col2 from t1 as tmp1 group by col1, col2 having col2 = 'hello' 16146 END 16147 INPUT 16148 select a1,a2,b,max(c) from t2 where b is NULL group by a1,a2; 16149 END 16150 OUTPUT 16151 select a1, a2, b, max(c) from t2 where b is null group by a1, a2 16152 END 16153 INPUT 16154 select a as like_aaaaa from t1 where a like 'aaaaa%'; 16155 END 16156 OUTPUT 16157 select a as like_aaaaa from t1 where a like 'aaaaa%' 16158 END 16159 INPUT 16160 select distinct a from t1; 16161 END 16162 OUTPUT 16163 select distinct a from t1 16164 END 16165 INPUT 16166 select from t1 where MATCH(a,b) AGAINST("+support +collections" IN BOOLEAN MODE); 16167 END 16168 ERROR 16169 syntax error at position 12 near 'from' 16170 END 16171 INPUT 16172 select hex(substr(_utf32 0x000000e4000000e500000068,2)); 16173 END 16174 OUTPUT 16175 select hex(substr(_utf32 0x000000e4000000e500000068, 2)) from dual 16176 END 16177 INPUT 16178 select /lib64/ user, host, db, command, state, info from information_schema.processlist where (info like "select get_lock%" OR user='event_scheduler') order by info; 16179 END 16180 ERROR 16181 syntax error at position 9 16182 END 16183 INPUT 16184 select format(atan2(pi(), 0), 6); 16185 END 16186 OUTPUT 16187 select format(atan2(pi(), 0), 6) from dual 16188 END 16189 INPUT 16190 select from t1 natural left join t2; 16191 END 16192 ERROR 16193 syntax error at position 12 near 'from' 16194 END 16195 INPUT 16196 select MYSQLTEST.T1.* from MYSQLTEST.T1; 16197 END 16198 OUTPUT 16199 select MYSQLTEST.T1.* from MYSQLTEST.T1 16200 END 16201 INPUT 16202 select hex(cast('a' as binary(2))); 16203 END 16204 OUTPUT 16205 select hex(convert('a', binary(2))) from dual 16206 END 16207 INPUT 16208 select group_concat(distinct a order by a) from t1; 16209 END 16210 OUTPUT 16211 select group_concat(distinct a order by a asc) from t1 16212 END 16213 INPUT 16214 select t1a.a, t1b.a from t1 as t1a, t1 as t1b where t1a.a=t1b.a order by binary t1a.a, binary t1b.a; 16215 END 16216 OUTPUT 16217 select t1a.a, t1b.a from t1 as t1a, t1 as t1b where t1a.a = t1b.a order by binary t1a.a asc, binary t1b.a asc 16218 END 16219 INPUT 16220 select from information_schema.partitions where table_schema="test" and table_name="t4"; 16221 END 16222 ERROR 16223 syntax error at position 12 near 'from' 16224 END 16225 INPUT 16226 select hex(group_concat(a)) from t1; 16227 END 16228 OUTPUT 16229 select hex(group_concat(a)) from t1 16230 END 16231 INPUT 16232 select period_add(-9223372036854775808,29880); 16233 END 16234 OUTPUT 16235 select period_add(-9223372036854775808, 29880) from dual 16236 END 16237 INPUT 16238 select hex(char(0x01 using ucs2)); 16239 END 16240 ERROR 16241 syntax error at position 27 near 'using' 16242 END 16243 INPUT 16244 select from information_schema.columns where table_schema = NULL; 16245 END 16246 ERROR 16247 syntax error at position 12 near 'from' 16248 END 16249 INPUT 16250 select distinct n1,n2 from t1; 16251 END 16252 OUTPUT 16253 select distinct n1, n2 from t1 16254 END 16255 INPUT 16256 select ceil(0.09); 16257 END 16258 OUTPUT 16259 select ceil(0.09) from dual 16260 END 16261 INPUT 16262 select unix_timestamp(from_unixtime(2147483648)); 16263 END 16264 OUTPUT 16265 select unix_timestamp(from_unixtime(2147483648)) from dual 16266 END 16267 INPUT 16268 select from t2,t3 where MATCH (t2.inhalt,t3.inhalt) AGAINST ('foobar'); 16269 END 16270 ERROR 16271 syntax error at position 12 near 'from' 16272 END 16273 INPUT 16274 select weekofyear("1997-11-30 23:59:59.000001"); 16275 END 16276 OUTPUT 16277 select weekofyear('1997-11-30 23:59:59.000001') from dual 16278 END 16279 INPUT 16280 select a from t2; 16281 END 16282 OUTPUT 16283 select a from t2 16284 END 16285 INPUT 16286 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_hungarian_ci; 16287 END 16288 OUTPUT 16289 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_hungarian_ci 16290 END 16291 INPUT 16292 select from t1 where a like "%ss%"; 16293 END 16294 ERROR 16295 syntax error at position 12 near 'from' 16296 END 16297 INPUT 16298 select hex(_utf8mb4 X'616263FF'); 16299 END 16300 OUTPUT 16301 select hex(_utf8mb4 X'616263FF') from dual 16302 END 16303 INPUT 16304 select concat(a,'.') from t1 where binary a='aaa'; 16305 END 16306 OUTPUT 16307 select concat(a, '.') from t1 where binary a = 'aaa' 16308 END 16309 INPUT 16310 select t1.a, dt.a from t1, lateral (select t1.a+t2.a as a from t2) dt; 16311 END 16312 ERROR 16313 syntax error at position 37 16314 END 16315 INPUT 16316 select sum(qty) as sqty from t1 group by id having count(id) > 0; 16317 END 16318 OUTPUT 16319 select sum(qty) as sqty from t1 group by id having count(id) > 0 16320 END 16321 INPUT 16322 select repeat('hello', -18446744073709551616); 16323 END 16324 OUTPUT 16325 select repeat('hello', -18446744073709551616) from dual 16326 END 16327 INPUT 16328 select concat("-",a,"-",b,"-") from t1; 16329 END 16330 OUTPUT 16331 select concat('-', a, '-', b, '-') from t1 16332 END 16333 INPUT 16334 select hex(char(0x01 using utf32)); 16335 END 16336 ERROR 16337 syntax error at position 27 near 'using' 16338 END 16339 INPUT 16340 select str_to_date("2003-01-02 10:11:12.0012ABCD", "%Y-%m-%d %H:%i:%S.%f") as f1, addtime("-01:01:01.01 GGG", "-23:59:59.1") as f2, microsecond("1997-12-31 23:59:59.01XXXX") as f3; 16341 END 16342 OUTPUT 16343 select str_to_date('2003-01-02 10:11:12.0012ABCD', '%Y-%m-%d %H:%i:%S.%f') as f1, addtime('-01:01:01.01 GGG', '-23:59:59.1') as f2, microsecond('1997-12-31 23:59:59.01XXXX') as f3 from dual 16344 END 16345 INPUT 16346 select locate('lo','hello',4294967297); 16347 END 16348 OUTPUT 16349 select locate('lo', 'hello', 4294967297) from dual 16350 END 16351 INPUT 16352 select b+0 from t1 order by b; 16353 END 16354 OUTPUT 16355 select b + 0 from t1 order by b asc 16356 END 16357 INPUT 16358 select @category2_id:= 10002; 16359 END 16360 ERROR 16361 syntax error at position 22 near ':' 16362 END 16363 INPUT 16364 select CONVERT("2004-01-22 21:45:33",DATE); 16365 END 16366 OUTPUT 16367 select convert('2004-01-22 21:45:33', DATE) from dual 16368 END 16369 INPUT 16370 select a as gci1 from t1 where a like 'さしすせそかきくけこあいうえお%'; 16371 END 16372 OUTPUT 16373 select a as gci1 from t1 where a like 'さしすせそかきくけこあいうえお%' 16374 END 16375 INPUT 16376 select concat(concat(_latin1'->',f1),_latin1'<-') from t1; 16377 END 16378 OUTPUT 16379 select concat(concat(_latin1 '->', f1), _latin1 '<-') from t1 16380 END 16381 INPUT 16382 select insert('hello', 1, -4294967296, 'hi'); 16383 END 16384 ERROR 16385 syntax error at position 14 near 'insert' 16386 END 16387 INPUT 16388 select from t1, t2 where t2.a=t1.a and t2.b + 1; 16389 END 16390 ERROR 16391 syntax error at position 12 near 'from' 16392 END 16393 INPUT 16394 select cast(min(df) as signed) from t1; 16395 END 16396 OUTPUT 16397 select convert(min(df), signed) from t1 16398 END 16399 INPUT 16400 select _koi8r'a' LIKE _latin1'A'; 16401 END 16402 OUTPUT 16403 select _koi8r 'a' like _latin1 'A' from dual 16404 END 16405 INPUT 16406 select from information_schema.schemata where schema_name = NULL; 16407 END 16408 ERROR 16409 syntax error at position 12 near 'from' 16410 END 16411 INPUT 16412 select rpad('a',4,'1'),rpad('a',4,'12'),rpad('abcd',3,'12'), rpad(11, 10 , 22), rpad("ab", 10, 22); 16413 END 16414 OUTPUT 16415 select rpad('a', 4, '1'), rpad('a', 4, '12'), rpad('abcd', 3, '12'), rpad(11, 10, 22), rpad('ab', 10, 22) from dual 16416 END 16417 INPUT 16418 select degrees(pi()),radians(360); 16419 END 16420 OUTPUT 16421 select degrees(pi()), radians(360) from dual 16422 END 16423 INPUT 16424 select quote(ltrim(concat(' ', 'a'))); 16425 END 16426 OUTPUT 16427 select quote(ltrim(concat(' ', 'a'))) from dual 16428 END 16429 INPUT 16430 select insert('txs',2,null,'hi'),insert('txs',2,1,null); 16431 END 16432 ERROR 16433 syntax error at position 14 near 'insert' 16434 END 16435 INPUT 16436 select concat(a,'.') from t1 where a='a'; 16437 END 16438 OUTPUT 16439 select concat(a, '.') from t1 where a = 'a' 16440 END 16441 INPUT 16442 select locate('lo','hello',-18446744073709551617); 16443 END 16444 OUTPUT 16445 select locate('lo', 'hello', -18446744073709551617) from dual 16446 END 16447 INPUT 16448 select 1, ST_touches(t.geom, p.geom) from tbl_polygon t, tbl_polygon p where t.id = 'POLY1' and p.id = 'POLY2'; 16449 END 16450 OUTPUT 16451 select 1, ST_touches(t.geom, p.geom) from tbl_polygon as t, tbl_polygon as p where t.id = 'POLY1' and p.id = 'POLY2' 16452 END 16453 INPUT 16454 select from (select from t1 natural join t2) as t12 natural join (select from t3 natural join t4) as t34; 16455 END 16456 ERROR 16457 syntax error at position 12 near 'from' 16458 END 16459 INPUT 16460 select event_name, event_definition, interval_value, interval_field from information_schema.events order by event_name; 16461 END 16462 OUTPUT 16463 select event_name, event_definition, interval_value, interval_field from information_schema.events order by event_name asc 16464 END 16465 INPUT 16466 select -1 | 1, -1 ^ 1, -1 & 1; 16467 END 16468 OUTPUT 16469 select -1 | 1, -1 ^ 1, -1 & 1 from dual 16470 END 16471 INPUT 16472 select i from t1 where i = 1 into k; 16473 END 16474 ERROR 16475 syntax error at position 36 near 'k' 16476 END 16477 INPUT 16478 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name = 'tm' and index_name = 'p' order by table_name; 16479 END 16480 OUTPUT 16481 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name = 'tm' and index_name = 'p' order by table_name asc 16482 END 16483 INPUT 16484 select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a' order by length(concat('*',v,'*',c,'*',t,'*')); 16485 END 16486 OUTPUT 16487 select concat('*', v, '*', c, '*', t, '*') as qq from t1 where v = 'a' order by length(concat('*', v, '*', c, '*', t, '*')) asc 16488 END 16489 INPUT 16490 select u.gender as gender, count(distinct u.id) as dist_count, (count(distinct u.id)/5*100) as percentage from t1 u, t2 l where l.user_id = u.id group by u.gender order by percentage; 16491 END 16492 OUTPUT 16493 select u.gender as gender, count(distinct u.id) as dist_count, count(distinct u.id) / 5 * 100 as percentage from t1 as u, t2 as l where l.user_id = u.id group by u.gender order by percentage asc 16494 END 16495 INPUT 16496 select host, length(authentication_string) from mysql.user where user like 'mysqltest_1'; 16497 END 16498 OUTPUT 16499 select host, length(authentication_string) from mysql.`user` where `user` like 'mysqltest_1' 16500 END 16501 INPUT 16502 select column_default from information_schema.columns where table_name= 't1'; 16503 END 16504 OUTPUT 16505 select column_default from information_schema.`columns` where table_name = 't1' 16506 END 16507 INPUT 16508 select from t1 where a like "abc%"; 16509 END 16510 ERROR 16511 syntax error at position 12 near 'from' 16512 END 16513 INPUT 16514 select from (select from t1 union distinct select from t2 union all select from t3) X; 16515 END 16516 ERROR 16517 syntax error at position 12 near 'from' 16518 END 16519 INPUT 16520 select @test_compress_string:='string for test compress function aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa '; 16521 END 16522 ERROR 16523 syntax error at position 30 near ':' 16524 END 16525 INPUT 16526 select length(quote(concat(char(0),"test"))); 16527 END 16528 OUTPUT 16529 select length(quote(concat(char(0), 'test'))) from dual 16530 END 16531 INPUT 16532 select grp,group_concat(null) from t1 group by grp; 16533 END 16534 OUTPUT 16535 select grp, group_concat(null) from t1 group by grp 16536 END 16537 INPUT 16538 select a1,a2,b,min(c),max(c) from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b; 16539 END 16540 OUTPUT 16541 select a1, a2, b, min(c), max(c) from t2 where (a1 >= 'c' or a2 < 'b') and b > 'a' group by a1, a2, b 16542 END 16543 INPUT 16544 select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1; 16545 END 16546 OUTPUT 16547 select a1, a2, b, max(c), min(c) from t2 where a2 = 'a' and b = 'b' group by a1 16548 END 16549 INPUT 16550 select right('hello', -4294967296); 16551 END 16552 OUTPUT 16553 select right('hello', -4294967296) from dual 16554 END 16555 INPUT 16556 select from information_schema.key_column_usage where TABLE_NAME= "vo"; 16557 END 16558 ERROR 16559 syntax error at position 12 near 'from' 16560 END 16561 INPUT 16562 select from t1 where a='a' order by binary a; 16563 END 16564 ERROR 16565 syntax error at position 12 near 'from' 16566 END 16567 INPUT 16568 select @@global.concurrent_insert; 16569 END 16570 OUTPUT 16571 select @@global.concurrent_insert from dual 16572 END 16573 INPUT 16574 select from t1 where MATCH(a,b) AGAINST ("only"); 16575 END 16576 ERROR 16577 syntax error at position 12 near 'from' 16578 END 16579 INPUT 16580 select null % 0 as 'NULL'; 16581 END 16582 OUTPUT 16583 select null % 0 as `NULL` from dual 16584 END 16585 INPUT 16586 select f1 from t1 where makedate(2006,2) between date(f1) and date(f3); 16587 END 16588 OUTPUT 16589 select f1 from t1 where makedate(2006, 2) between date(f1) and date(f3) 16590 END 16591 INPUT 16592 select a1, max(c) from t1 where a1 in ('a','b','d') group by a1,a2,b; 16593 END 16594 OUTPUT 16595 select a1, max(c) from t1 where a1 in ('a', 'b', 'd') group by a1, a2, b 16596 END 16597 INPUT 16598 select from (select from t1 natural join t2) as t12 natural left join (select from t3 natural join t4) as t34; 16599 END 16600 ERROR 16601 syntax error at position 12 near 'from' 16602 END 16603 INPUT 16604 select ST_astext(st_union(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); 16605 END 16606 OUTPUT 16607 select ST_astext(st_union(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual 16608 END 16609 INPUT 16610 select from t3_trans; 16611 END 16612 ERROR 16613 syntax error at position 12 near 'from' 16614 END 16615 INPUT 16616 select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a); 16617 END 16618 OUTPUT 16619 select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a) 16620 END 16621 INPUT 16622 select date_add("1997-12-31 23:59:59",INTERVAL "10000 99:99:99" DAY_SECOND); 16623 END 16624 OUTPUT 16625 select date_add('1997-12-31 23:59:59', interval '10000 99:99:99' DAY_SECOND) from dual 16626 END 16627 INPUT 16628 select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user; 16629 END 16630 OUTPUT 16631 select host, db, `user` from mysql.db where `user` like 'mysqltest_%' order by host asc, db asc, `user` asc 16632 END 16633 INPUT 16634 select grp,group_concat(c order by 2) from t1 group by grp; 16635 END 16636 OUTPUT 16637 select grp, group_concat(c order by 2 asc) from t1 group by grp 16638 END 16639 INPUT 16640 select time_format(19980131010015,'%H|%I|%k|%l|%i|%p|%r|%S|%T'); 16641 END 16642 OUTPUT 16643 select time_format(19980131010015, '%H|%I|%k|%l|%i|%p|%r|%S|%T') from dual 16644 END 16645 INPUT 16646 select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('point(1 0)')); 16647 END 16648 OUTPUT 16649 select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('point(1 0)')) from dual 16650 END 16651 INPUT 16652 select distinct s1 from t1 order by s2,s1; 16653 END 16654 OUTPUT 16655 select distinct s1 from t1 order by s2 asc, s1 asc 16656 END 16657 INPUT 16658 select sum(col1) from t1 group by col_t1 having (select col_t1 from t2 where col_t1 = col_t2 order by col_t2 limit 1); 16659 END 16660 OUTPUT 16661 select sum(col1) from t1 group by col_t1 having (select col_t1 from t2 where col_t1 = col_t2 order by col_t2 asc limit 1) 16662 END 16663 INPUT 16664 select hex(substr(_utf16 0x00e400e5D800DC00,1)); 16665 END 16666 OUTPUT 16667 select hex(substr(_utf16 0x00e400e5D800DC00, 1)) from dual 16668 END 16669 INPUT 16670 select hex(right(_utf16 0xD800DC00D87FDFFF, 1)); 16671 END 16672 OUTPUT 16673 select hex(right(_utf16 0xD800DC00D87FDFFF, 1)) from dual 16674 END 16675 INPUT 16676 select b x, (select group_concat(b) from t2) from t2; 16677 END 16678 OUTPUT 16679 select b as x, (select group_concat(b) from t2) from t2 16680 END 16681 INPUT 16682 select (select f from lateral (select max(t1.a) as f) as dt) as g from t1; 16683 END 16684 ERROR 16685 syntax error at position 32 16686 END 16687 INPUT 16688 select _latin1'1'=1; 16689 END 16690 OUTPUT 16691 select _latin1 '1' = 1 from dual 16692 END 16693 INPUT 16694 select a,t>0,c,i from t1; 16695 END 16696 OUTPUT 16697 select a, t > 0, c, i from t1 16698 END 16699 INPUT 16700 select from t1 left join t2 on t1.b = t2.b order by t1.a; 16701 END 16702 ERROR 16703 syntax error at position 12 near 'from' 16704 END 16705 INPUT 16706 select locate('HE','hello'); 16707 END 16708 OUTPUT 16709 select locate('HE', 'hello') from dual 16710 END 16711 INPUT 16712 select hex(cast(_ascii 0x7f as char(1) character set latin1)); 16713 END 16714 OUTPUT 16715 select hex(convert(_ascii 0x7f, char(1) character set latin1)) from dual 16716 END 16717 INPUT 16718 select hex(weight_string(_utf16 0xD800DC00)); 16719 END 16720 OUTPUT 16721 select hex(weight_string(_utf16 0xD800DC00)) from dual 16722 END 16723 INPUT 16724 select week(20001231,2),week(20001231,3); 16725 END 16726 OUTPUT 16727 select week(20001231, 2), week(20001231, 3) from dual 16728 END 16729 INPUT 16730 select count(a) as b from t1 where a=0 having b >=0; 16731 END 16732 OUTPUT 16733 select count(a) as b from t1 where a = 0 having b >= 0 16734 END 16735 INPUT 16736 select count(*) from t1 where v like 'a %'; 16737 END 16738 OUTPUT 16739 select count(*) from t1 where v like 'a %' 16740 END 16741 INPUT 16742 select var_samp(e) as 'null', var_pop(e) as '0' from bug22555; 16743 END 16744 OUTPUT 16745 select var_samp(e) as `null`, var_pop(e) as `0` from bug22555 16746 END 16747 INPUT 16748 select sum(a) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3; 16749 END 16750 OUTPUT 16751 select sum(a) as c from t1 where a > 0 order by c asc limit 3 16752 END 16753 INPUT 16754 select count(*) from t1 where a is null; 16755 END 16756 OUTPUT 16757 select count(*) from t1 where a is null 16758 END 16759 INPUT 16760 select from bug20691 order by i asc; 16761 END 16762 ERROR 16763 syntax error at position 12 near 'from' 16764 END 16765 INPUT 16766 select insert('hello', 4294967295, 1, 'hi'); 16767 END 16768 ERROR 16769 syntax error at position 14 near 'insert' 16770 END 16771 INPUT 16772 select 'The cost of accessing t1 (dont care if it changes' '^'; 16773 END 16774 OUTPUT 16775 select 'The cost of accessing t1 (dont care if it changes' as `^` from dual 16776 END 16777 INPUT 16778 select from t1 natural left join t2 where (i is not null)=0; 16779 END 16780 ERROR 16781 syntax error at position 12 near 'from' 16782 END 16783 INPUT 16784 select from t2 /bin /boot /cdrom /dev /etc /home /lib /lib32 /lib64 /libx32 /lost+found /media /mnt /opt /proc /root /run /sbin /snap /srv /swapfile /sys /tmp /usr /var must be (3,1), (4,4) */; 16785 END 16786 ERROR 16787 syntax error at position 12 near 'from' 16788 END 16789 INPUT 16790 select count(distinct n1), count(distinct n2) from t1; 16791 END 16792 OUTPUT 16793 select count(distinct n1), count(distinct n2) from t1 16794 END 16795 INPUT 16796 select elt(2,1),field(NULL,"a","b","c"),reverse(""); 16797 END 16798 OUTPUT 16799 select elt(2, 1), field(null, 'a', 'b', 'c'), reverse('') from dual 16800 END 16801 INPUT 16802 select locate(_utf8 0xD0B1, _utf8 0xD0B0D091D0B2 collate utf8_bin); 16803 END 16804 OUTPUT 16805 select locate(_utf8 0xD0B1, _utf8 0xD0B0D091D0B2 collate utf8_bin) from dual 16806 END 16807 INPUT 16808 select insert('hello', 1, -4294967295, 'hi'); 16809 END 16810 ERROR 16811 syntax error at position 14 near 'insert' 16812 END 16813 INPUT 16814 select hex(ucs2),hex(ujis),name from t1 order by name; 16815 END 16816 OUTPUT 16817 select hex(ucs2), hex(ujis), `name` from t1 order by `name` asc 16818 END 16819 INPUT 16820 select max(b) from t3 where a = 2; 16821 END 16822 OUTPUT 16823 select max(b) from t3 where a = 2 16824 END 16825 INPUT 16826 select count(*), interval(qty,2,3,4,5,6,7,8) as category from t1 group by category; 16827 END 16828 ERROR 16829 syntax error at position 48 near 'as' 16830 END 16831 INPUT 16832 select SQL_BUFFER_RESULT from t1 order by 1, 2; 16833 END 16834 OUTPUT 16835 select SQL_BUFFER_RESULT from t1 order by 1 asc, 2 asc 16836 END 16837 INPUT 16838 select collation(convert('a',char(2) ascii)), collation(convert('a',char(2) ascii binary)); 16839 END 16840 ERROR 16841 syntax error at position 89 near 'binary' 16842 END 16843 INPUT 16844 select d as e from (select a as d, 2*a as two from t) dt; 16845 END 16846 OUTPUT 16847 select d as e from (select a as d, 2 * a as two from t) as dt 16848 END 16849 INPUT 16850 select hex(substr(_utf16 0x00e400e5D800DC00,-3)); 16851 END 16852 OUTPUT 16853 select hex(substr(_utf16 0x00e400e5D800DC00, -3)) from dual 16854 END 16855 INPUT 16856 select field(c1,'�'),field('�',c1) from t1; 16857 END 16858 OUTPUT 16859 select field(c1, '�'), field('�', c1) from t1 16860 END 16861 INPUT 16862 select EVENT_NAME from information_schema.events where event_schema='test'; 16863 END 16864 OUTPUT 16865 select EVENT_NAME from information_schema.events where event_schema = 'test' 16866 END 16867 INPUT 16868 select abs(-10), sign(-5), sign(5), sign(0); 16869 END 16870 OUTPUT 16871 select abs(-10), sign(-5), sign(5), sign(0) from dual 16872 END 16873 INPUT 16874 select 5 from t1; 16875 END 16876 OUTPUT 16877 select 5 from t1 16878 END 16879 INPUT 16880 select from t1 where not(not(not(a < 5) and not(a > 10))); 16881 END 16882 ERROR 16883 syntax error at position 12 near 'from' 16884 END 16885 INPUT 16886 select min(f3),max(f3) from t1; 16887 END 16888 OUTPUT 16889 select min(f3), max(f3) from t1 16890 END 16891 INPUT 16892 select _koi8r'����' as test; 16893 END 16894 OUTPUT 16895 select _koi8r '����' as test from dual 16896 END 16897 INPUT 16898 select t1.*, (select a from t2 where d > a) as 'x' from t1; 16899 END 16900 OUTPUT 16901 select t1.*, (select a from t2 where d > a) as x from t1 16902 END 16903 INPUT 16904 select a1,a2,b,min(c),max(c) from t1 where (c > 'f123') group by a1,a2,b; 16905 END 16906 OUTPUT 16907 select a1, a2, b, min(c), max(c) from t1 where c > 'f123' group by a1, a2, b 16908 END 16909 INPUT 16910 select t1.col1*10+t2.col1 from t1,t2 where t1.col1=t2.col1 group by t1.col1, t2.col1 having col1 = 2; 16911 END 16912 OUTPUT 16913 select t1.col1 * 10 + t2.col1 from t1, t2 where t1.col1 = t2.col1 group by t1.col1, t2.col1 having col1 = 2 16914 END 16915 INPUT 16916 select a from t1; 16917 END 16918 OUTPUT 16919 select a from t1 16920 END 16921 INPUT 16922 select replace(c1,'�','�'), replace('�',c1,'�') from t1; 16923 END 16924 OUTPUT 16925 select replace(c1, '�', '�'), replace('�', c1, '�') from t1 16926 END 16927 INPUT 16928 select str_to_date( NULL, 1 ); 16929 END 16930 OUTPUT 16931 select str_to_date(null, 1) from dual 16932 END 16933 INPUT 16934 select DATE_ADD(20071108181000, INTERVAL 1 DAY); 16935 END 16936 OUTPUT 16937 select DATE_ADD(20071108181000, interval 1 DAY) from dual 16938 END 16939 INPUT 16940 select a as gci2 from t1 where a like 'あいうえおかきくけこさしすせそ'; 16941 END 16942 OUTPUT 16943 select a as gci2 from t1 where a like 'あいうえおかきくけこさしすせそ' 16944 END 16945 INPUT 16946 select extract(MICROSECOND FROM "1999-01-02 10:11:12.000123"); 16947 END 16948 OUTPUT 16949 select extract(microsecond from '1999-01-02 10:11:12.000123') from dual 16950 END 16951 INPUT 16952 select table_name, column_name, data_type from information_schema.columns where table_schema not in ('performance_schema', 'sys') and data_type = 'datetime' and table_name COLLATE utf8_general_ci not like 'innodb_%' order by table_name, column_name; 16953 END 16954 OUTPUT 16955 select table_name, column_name, data_type from information_schema.`columns` where table_schema not in ('performance_schema', 'sys') and data_type = 'datetime' and table_name collate utf8_general_ci not like 'innodb_%' order by table_name asc, column_name asc 16956 END 16957 INPUT 16958 select hex(@utf81:= CONVERT(@ujis1 USING utf8)); 16959 END 16960 ERROR 16961 syntax error at position 19 near ':' 16962 END 16963 INPUT 16964 select strcmp(_koi8r'a', _koi8r'A' COLLATE koi8r_bin); 16965 END 16966 OUTPUT 16967 select strcmp(_koi8r 'a', _koi8r 'A' collate koi8r_bin) from dual 16968 END 16969 INPUT 16970 select max(7) from t2i join t1i; 16971 END 16972 OUTPUT 16973 select max(7) from t2i join t1i 16974 END 16975 INPUT 16976 select date_format("1997-01-02 03:04:05", "%M %W %D %Y %y %m %d %h %i %s %w"); 16977 END 16978 OUTPUT 16979 select date_format('1997-01-02 03:04:05', '%M %W %D %Y %y %m %d %h %i %s %w') from dual 16980 END 16981 INPUT 16982 select rpad('hello', 18446744073709551616, '1'); 16983 END 16984 OUTPUT 16985 select rpad('hello', 18446744073709551616, '1') from dual 16986 END 16987 INPUT 16988 select max(a3) from t1 where a2 = 0 and a3 between 'K' and 'Q'; 16989 END 16990 OUTPUT 16991 select max(a3) from t1 where a2 = 0 and a3 between 'K' and 'Q' 16992 END 16993 INPUT 16994 select locate('HE','hello' collate ujis_bin,2); 16995 END 16996 OUTPUT 16997 select locate('HE', 'hello' collate ujis_bin, 2) from dual 16998 END 16999 INPUT 17000 select hex(conv(convert('123' using utf32), -10, 16)); 17001 END 17002 OUTPUT 17003 select hex(conv(convert('123' using utf32), -10, 16)) from dual 17004 END 17005 INPUT 17006 select hex(weight_string(_utf16 0xD800DC01)); 17007 END 17008 OUTPUT 17009 select hex(weight_string(_utf16 0xD800DC01)) from dual 17010 END 17011 INPUT 17012 select from (select *,substring(b,1),substring(b,-1),substring(b,-2),substring(b,-3),substring(b,-4),substring(b,-5) from t1) t; 17013 END 17014 ERROR 17015 syntax error at position 12 near 'from' 17016 END 17017 INPUT 17018 select st_overlaps(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 17019 END 17020 OUTPUT 17021 select st_overlaps(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 17022 END 17023 INPUT 17024 select _latin1'B' between _latin1'a' collate latin1_bin and _latin1'c'; 17025 END 17026 OUTPUT 17027 select _latin1 'B' between _latin1 'a' collate latin1_bin and _latin1 'c' from dual 17028 END 17029 INPUT 17030 select st_overlaps(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 17031 END 17032 OUTPUT 17033 select st_overlaps(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 17034 END 17035 INPUT 17036 select locate('HE','hello' collate utf8mb4_bin); 17037 END 17038 OUTPUT 17039 select locate('HE', 'hello' collate utf8mb4_bin) from dual 17040 END 17041 INPUT 17042 select count(*) from t1 where match a against ('aaay*' in boolean mode); 17043 END 17044 ERROR 17045 syntax error at position 38 near 'a' 17046 END 17047 INPUT 17048 select a as like_ll from t1 where a like 'll%'; 17049 END 17050 OUTPUT 17051 select a as like_ll from t1 where a like 'll%' 17052 END 17053 INPUT 17054 select t1.* as 'with_alias', a from t1; 17055 END 17056 ERROR 17057 syntax error at position 15 near 'as' 17058 END 17059 INPUT 17060 select hex(convert(_ujis 0x8FABF841 using ucs2)); 17061 END 17062 OUTPUT 17063 select hex(convert(_ujis 0x8FABF841 using ucs2)) from dual 17064 END 17065 INPUT 17066 select left('hello', 10); 17067 END 17068 OUTPUT 17069 select left('hello', 10) from dual 17070 END 17071 INPUT 17072 select date_sub("1998-01-01 00:00:00",INTERVAL 1 MONTH); 17073 END 17074 OUTPUT 17075 select date_sub('1998-01-01 00:00:00', interval 1 MONTH) from dual 17076 END 17077 INPUT 17078 select 1, ST_Intersects(ST_GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), ST_GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))')); 17079 END 17080 OUTPUT 17081 select 1, ST_Intersects(ST_GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), ST_GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))')) from dual 17082 END 17083 INPUT 17084 select concat("-",a,"-",b,"-") from t1 where a="hello"; 17085 END 17086 OUTPUT 17087 select concat('-', a, '-', b, '-') from t1 where a = 'hello' 17088 END 17089 INPUT 17090 select 'a a' > 'a', 'a ' < 'a'; 17091 END 17092 OUTPUT 17093 select 'a a' > 'a', 'a \t' < 'a' from dual 17094 END 17095 INPUT 17096 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_swedish_ci; 17097 END 17098 OUTPUT 17099 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_swedish_ci 17100 END 17101 INPUT 17102 select release_lock('ee_22830'); 17103 END 17104 OUTPUT 17105 select release_lock('ee_22830') from dual 17106 END 17107 INPUT 17108 select distinct b from t1 where (a2 >= 'b') and (b = 'a'); 17109 END 17110 OUTPUT 17111 select distinct b from t1 where a2 >= 'b' and b = 'a' 17112 END 17113 INPUT 17114 select t1.*,t2.* from t1 inner join t2 on (t1.a=t2.a); 17115 END 17116 OUTPUT 17117 select t1.*, t2.* from t1 join t2 on t1.a = t2.a 17118 END 17119 INPUT 17120 select from T1; 17121 END 17122 ERROR 17123 syntax error at position 12 near 'from' 17124 END 17125 INPUT 17126 select st_a, swt1a, st_b, swt1b from t1 where st_a=1 and swt1a=1 and st_b=1 and swt1b=1 and swt1b=1 limit 5; 17127 END 17128 OUTPUT 17129 select st_a, swt1a, st_b, swt1b from t1 where st_a = 1 and swt1a = 1 and st_b = 1 and swt1b = 1 and swt1b = 1 limit 5 17130 END 17131 INPUT 17132 select hex(cast(0x20000000000000 as decimal(30,0)) + 1); 17133 END 17134 OUTPUT 17135 select hex(convert(0x20000000000000, decimal(30, 0)) + 1) from dual 17136 END 17137 INPUT 17138 select count(*) from t1 left join t2 on (t1.id = t2.owner); 17139 END 17140 OUTPUT 17141 select count(*) from t1 left join t2 on t1.id = t2.owner 17142 END 17143 INPUT 17144 select tt.field100 from t1 join (select from t1) tt where t1.field100=tt.field100 limit 1; 17145 END 17146 ERROR 17147 syntax error at position 45 near 'from' 17148 END 17149 INPUT 17150 select cast(repeat('1',20) as signed); 17151 END 17152 OUTPUT 17153 select convert(repeat('1', 20), signed) from dual 17154 END 17155 INPUT 17156 select a,b from t1 order by upper(a),b; 17157 END 17158 OUTPUT 17159 select a, b from t1 order by upper(a) asc, b asc 17160 END 17161 INPUT 17162 select n from t1; 17163 END 17164 OUTPUT 17165 select n from t1 17166 END 17167 INPUT 17168 select count(facility) from t1; 17169 END 17170 OUTPUT 17171 select count(facility) from t1 17172 END 17173 INPUT 17174 select insert('hello', 1, -18446744073709551615, 'hi'); 17175 END 17176 ERROR 17177 syntax error at position 14 near 'insert' 17178 END 17179 INPUT 17180 select value,description,bug_id from t2 left join t1 on t2.program=t1.product and t2.value=t1.component where program="AAAAA"; 17181 END 17182 OUTPUT 17183 select value, description, bug_id from t2 left join t1 on t2.program = t1.product and t2.value = t1.component where program = 'AAAAA' 17184 END 17185 INPUT 17186 select "foo" = "foo " collate latin1_test; 17187 END 17188 OUTPUT 17189 select 'foo' = 'foo ' collate latin1_test from dual 17190 END 17191 INPUT 17192 select 'a' union select concat('a', -4.5); 17193 END 17194 OUTPUT 17195 select 'a' from dual union select concat('a', -4.5) from dual 17196 END 17197 INPUT 17198 select date,format,TIME(str_to_date(date, format)) as time from t1; 17199 END 17200 OUTPUT 17201 select `date`, `format`, TIME(str_to_date(`date`, `format`)) as `time` from t1 17202 END 17203 INPUT 17204 select from v4; 17205 END 17206 ERROR 17207 syntax error at position 12 near 'from' 17208 END 17209 INPUT 17210 select table_name from information_schema.views where table_schema='test' order by table_name; 17211 END 17212 OUTPUT 17213 select table_name from information_schema.views where table_schema = 'test' order by table_name asc 17214 END 17215 INPUT 17216 select row('A','b','c') = row('a' COLLATE latin1_bin,'b','c'); 17217 END 17218 OUTPUT 17219 select row('A', 'b', 'c') = row('a' collate latin1_bin, 'b', 'c') from dual 17220 END 17221 INPUT 17222 select min(if(y -x > 5,y,NULL)), max(if(y - x > 5,y,NULL)) from t1; 17223 END 17224 OUTPUT 17225 select min(if(y - x > 5, y, null)), max(if(y - x > 5, y, null)) from t1 17226 END 17227 INPUT 17228 select a as bin1 from t1 where a like 'さしすせそかきくけこあいうえお%'; 17229 END 17230 OUTPUT 17231 select a as bin1 from t1 where a like 'さしすせそかきくけこあいうえお%' 17232 END 17233 INPUT 17234 select distinct t3.a,e from t3, t1 order by t3.b; 17235 END 17236 OUTPUT 17237 select distinct t3.a, e from t3, t1 order by t3.b asc 17238 END 17239 INPUT 17240 select from t1 where MATCH(a,b) AGAINST("support +collections" IN BOOLEAN MODE); 17241 END 17242 ERROR 17243 syntax error at position 12 near 'from' 17244 END 17245 INPUT 17246 select @ujis1 = CONVERT(@utf81 USING ujis); 17247 END 17248 OUTPUT 17249 select @ujis1 = convert(@utf81 using ujis) from dual 17250 END 17251 INPUT 17252 select X.a from t1 AS X group by X.b having (X.a = 1); 17253 END 17254 OUTPUT 17255 select X.a from t1 as X group by X.b having X.a = 1 17256 END 17257 INPUT 17258 select month("2001-02-00"),year("2001-00-00"); 17259 END 17260 OUTPUT 17261 select month('2001-02-00'), year('2001-00-00') from dual 17262 END 17263 INPUT 17264 select fld3,companynr from t2 where companynr = 58 order by fld3; 17265 END 17266 OUTPUT 17267 select fld3, companynr from t2 where companynr = 58 order by fld3 asc 17268 END 17269 INPUT 17270 select hex(char(196)); 17271 END 17272 OUTPUT 17273 select hex(char(196)) from dual 17274 END 17275 INPUT 17276 select count(*) from t2; 17277 END 17278 OUTPUT 17279 select count(*) from t2 17280 END 17281 INPUT 17282 select from (t1 natural join t2) natural left join (t3 natural join t4) where b + 1 = y or b + 10 = y group by b,c,a,y having min(b) < max(y) order by a, y; 17283 END 17284 ERROR 17285 syntax error at position 12 near 'from' 17286 END 17287 INPUT 17288 select cast(min(ifl) as decimal(5,2)) from t3; 17289 END 17290 OUTPUT 17291 select convert(min(ifl), decimal(5, 2)) from t3 17292 END 17293 INPUT 17294 select count(*) as total, left(c,10) as reg from t1 group by reg order by reg desc limit 0,12; 17295 END 17296 OUTPUT 17297 select count(*) as total, left(c, 10) as reg from t1 group by reg order by reg desc limit 0, 12 17298 END 17299 INPUT 17300 select group_concat(distinct b order by b) from t1 group by a; 17301 END 17302 OUTPUT 17303 select group_concat(distinct b order by b asc) from t1 group by a 17304 END 17305 INPUT 17306 select group_concat(c1 order by hex(c1) SEPARATOR '') from t1 group by c1; 17307 END 17308 OUTPUT 17309 select group_concat(c1 order by hex(c1) asc separator '') from t1 group by c1 17310 END 17311 INPUT 17312 select group_concat(sum(c)) from t1 group by grp; 17313 END 17314 OUTPUT 17315 select group_concat(sum(c)) from t1 group by grp 17316 END 17317 INPUT 17318 select st_astext(st_buffer(point(-5,0),8772, st_buffer_strategy( 'point_circle',1024*1024*1024))) as result; 17319 END 17320 OUTPUT 17321 select st_astext(st_buffer(point(-5, 0), 8772, st_buffer_strategy('point_circle', 1024 * 1024 * 1024))) as result from dual 17322 END 17323 INPUT 17324 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_vietnamese_ci; 17325 END 17326 OUTPUT 17327 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_vietnamese_ci 17328 END 17329 INPUT 17330 select group_concat(c order by (select c from t2 where t2.a=t1.a limit 1)) as grp from t1; 17331 END 17332 OUTPUT 17333 select group_concat(c order by (select c from t2 where t2.a = t1.a limit 1) asc) as grp from t1 17334 END 17335 INPUT 17336 select from t1 where text1='teststring' or text1 > 'teststring '; 17337 END 17338 ERROR 17339 syntax error at position 12 near 'from' 17340 END 17341 INPUT 17342 select var_samp(o) as 'null', var_pop(o) as '0' from bug22555; 17343 END 17344 OUTPUT 17345 select var_samp(o) as `null`, var_pop(o) as `0` from bug22555 17346 END 17347 INPUT 17348 select insert("aa",100,1,"b"),insert("aa",1,3,"b"),left("aa",-1),substring("a",1,2); 17349 END 17350 ERROR 17351 syntax error at position 14 near 'insert' 17352 END 17353 INPUT 17354 select "Test delimiter //" as " "; 17355 END 17356 OUTPUT 17357 select 'Test delimiter //' as ` ` from dual 17358 END 17359 INPUT 17360 select 100, st_area(t.geom) from tbl_polygon t where t.id like 'POLY%'; 17361 END 17362 OUTPUT 17363 select 100, st_area(t.geom) from tbl_polygon as t where t.id like 'POLY%' 17364 END 17365 INPUT 17366 select a1,a2,b, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b; 17367 END 17368 OUTPUT 17369 select a1, a2, b, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1, a2, b 17370 END 17371 INPUT 17372 select t1.col1 from t1 where t1.col2 in (select t2.col2 from t2 group by t2.col1, t2.col2 having col_t1 <= 10) having col_t1 <= 20; 17373 END 17374 OUTPUT 17375 select t1.col1 from t1 where t1.col2 in (select t2.col2 from t2 group by t2.col1, t2.col2 having col_t1 <= 10) having col_t1 <= 20 17376 END 17377 INPUT 17378 select -9223372036854775808 mod 9223372036854775810 as result; 17379 END 17380 OUTPUT 17381 select -9223372036854775808 % 9223372036854775810 as result from dual 17382 END 17383 INPUT 17384 select str_to_date("2003-04-05 g", "%Y-%m-%d") as f1, str_to_date("2003-04-05 10:11:12.101010234567", "%Y-%m-%d %H:%i:%S.%f") as f2; 17385 END 17386 OUTPUT 17387 select str_to_date('2003-04-05 g', '%Y-%m-%d') as f1, str_to_date('2003-04-05 10:11:12.101010234567', '%Y-%m-%d %H:%i:%S.%f') as f2 from dual 17388 END 17389 INPUT 17390 select from t1 where 1 xor 1; 17391 END 17392 ERROR 17393 syntax error at position 12 near 'from' 17394 END 17395 INPUT 17396 select d, two from v; 17397 END 17398 OUTPUT 17399 select d, two from v 17400 END 17401 INPUT 17402 select hex(Db) from mysql.db where Db='��'; 17403 END 17404 OUTPUT 17405 select hex(Db) from mysql.db where Db = '��' 17406 END 17407 INPUT 17408 select @a:=FROM_UNIXTIME(1); 17409 END 17410 ERROR 17411 syntax error at position 11 near ':' 17412 END 17413 INPUT 17414 select sleep(2); 17415 END 17416 OUTPUT 17417 select sleep(2) from dual 17418 END 17419 INPUT 17420 select f1 from t1 where f1 like 'a%'; 17421 END 17422 OUTPUT 17423 select f1 from t1 where f1 like 'a%' 17424 END 17425 INPUT 17426 select hex(CONVERT(@utf82 USING sjis)); 17427 END 17428 OUTPUT 17429 select hex(convert(@utf82 using sjis)) from dual 17430 END 17431 INPUT 17432 select date_add(datetime, INTERVAL 1 YEAR) from t1; 17433 END 17434 OUTPUT 17435 select date_add(`datetime`, interval 1 YEAR) from t1 17436 END 17437 INPUT 17438 select group_concat(t1.b,t2.c) from t1 left join t2 using(a) group by t1.a; 17439 END 17440 OUTPUT 17441 select group_concat(t1.b, t2.c) from t1 left join t2 using (a) group by t1.a 17442 END 17443 INPUT 17444 select hex(conv(convert('123' using utf32), 10, 16)); 17445 END 17446 OUTPUT 17447 select hex(conv(convert('123' using utf32), 10, 16)) from dual 17448 END 17449 INPUT 17450 select left('hello', -1); 17451 END 17452 OUTPUT 17453 select left('hello', -1) from dual 17454 END 17455 INPUT 17456 select 1 | NULL,1 & NULL,1+NULL,1-NULL; 17457 END 17458 OUTPUT 17459 select 1 | null, 1 & null, 1 + null, 1 - null from dual 17460 END 17461 INPUT 17462 select table_type from information_schema.tables where table_name="v1"; 17463 END 17464 OUTPUT 17465 select table_type from information_schema.`tables` where table_name = 'v1' 17466 END 17467 INPUT 17468 select _latin1'a' regexp _latin1'A' collate latin1_bin; 17469 END 17470 OUTPUT 17471 select _latin1 'a' regexp _latin1 'A' collate latin1_bin from dual 17472 END 17473 INPUT 17474 select _latin1'B' between _latin2'a' and _latin1'b'; 17475 END 17476 OUTPUT 17477 select _latin1 'B' between _latin2 'a' and _latin1 'b' from dual 17478 END 17479 INPUT 17480 select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b; 17481 END 17482 OUTPUT 17483 select distinct a1, a2, b, c from t1 where a2 >= 'b' and b = 'a' and c = 'i121' group by a1, a2, b 17484 END 17485 INPUT 17486 select distinct from test; 17487 END 17488 ERROR 17489 syntax error at position 21 near 'from' 17490 END 17491 INPUT 17492 select 1 from t1 where 1 < some (select cast(a as datetime) from t1); 17493 END 17494 ERROR 17495 syntax error at position 40 near 'select' 17496 END 17497 INPUT 17498 select hex(a) from t1 where a like 'A_' order by a; 17499 END 17500 OUTPUT 17501 select hex(a) from t1 where a like 'A_' order by a asc 17502 END 17503 INPUT 17504 select length(_utf8mb4 0xD0B1), bit_length(_utf8mb4 0xD0B1), char_length(_utf8mb4 0xD0B1); 17505 END 17506 OUTPUT 17507 select length(_utf8mb4 0xD0B1), bit_length(_utf8mb4 0xD0B1), char_length(_utf8mb4 0xD0B1) from dual 17508 END 17509 INPUT 17510 select QN.a from (select 1 as a) as QN; 17511 END 17512 OUTPUT 17513 select QN.a from (select 1 as a from dual) as QN 17514 END 17515 INPUT 17516 select from t1 natural join t2 where t1.c > t2.a; 17517 END 17518 ERROR 17519 syntax error at position 12 near 'from' 17520 END 17521 INPUT 17522 select length(last_day("1997-12-1")); 17523 END 17524 OUTPUT 17525 select length(last_day('1997-12-1')) from dual 17526 END 17527 INPUT 17528 select get_lock('bug27638', 60); 17529 END 17530 OUTPUT 17531 select get_lock('bug27638', 60) from dual 17532 END 17533 INPUT 17534 select 0xa1a2a1a3 like concat(_binary'%',0xa2a1,_binary'%'); 17535 END 17536 OUTPUT 17537 select 0xa1a2a1a3 like concat(_binary '%', 0xa2a1, _binary '%') from dual 17538 END 17539 INPUT 17540 select coercibility(col1), collation(col1) from v1; 17541 END 17542 OUTPUT 17543 select coercibility(col1), collation(col1) from v1 17544 END 17545 INPUT 17546 select grp,group_concat(distinct c order by c desc) from t1 group by grp; 17547 END 17548 OUTPUT 17549 select grp, group_concat(distinct c order by c desc) from t1 group by grp 17550 END 17551 INPUT 17552 select abs(-2) -2; 17553 END 17554 OUTPUT 17555 select abs(-2) - 2 from dual 17556 END 17557 INPUT 17558 select substring_index('the king of the the null','the',null); 17559 END 17560 OUTPUT 17561 select substring_index('the king of the the null', 'the', null) from dual 17562 END 17563 INPUT 17564 select cast('9223372036854775809' as signed); 17565 END 17566 OUTPUT 17567 select convert('9223372036854775809', signed) from dual 17568 END 17569 INPUT 17570 select min(a1) from t1 where a1 >= 'KKK'; 17571 END 17572 OUTPUT 17573 select min(a1) from t1 where a1 >= 'KKK' 17574 END 17575 INPUT 17576 select 'hello',"'hello'",'""hello""','''h''e''l''l''o''',"hel""lo",'hel'lo'; 17577 END 17578 ERROR 17579 syntax error at position 77 near ';' 17580 END 17581 INPUT 17582 select unix_timestamp('2038-01-20 01:00:00'); 17583 END 17584 OUTPUT 17585 select unix_timestamp('2038-01-20 01:00:00') from dual 17586 END 17587 INPUT 17588 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_estonian_ci; 17589 END 17590 OUTPUT 17591 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_estonian_ci 17592 END 17593 INPUT 17594 select substring('hello', 1, 4294967297); 17595 END 17596 OUTPUT 17597 select substr('hello', 1, 4294967297) from dual 17598 END 17599 INPUT 17600 select date_sub("0199-01-01 00:00:01",INTERVAL 2 SECOND); 17601 END 17602 OUTPUT 17603 select date_sub('0199-01-01 00:00:01', interval 2 SECOND) from dual 17604 END 17605 INPUT 17606 select concat('|', text1, '|') from t1 where text1='teststring' or text1 > 'teststring '; 17607 END 17608 OUTPUT 17609 select concat('|', text1, '|') from t1 where text1 = 'teststring' or text1 > 'teststring\t' 17610 END 17611 INPUT 17612 select 'aaa','aa''a',"aa""a"; 17613 END 17614 OUTPUT 17615 select 'aaa', 'aa\'a', 'aa\"a' from dual 17616 END 17617 INPUT 17618 select cast('18446744073709551615' as signed); 17619 END 17620 OUTPUT 17621 select convert('18446744073709551615', signed) from dual 17622 END 17623 INPUT 17624 select left(concat(a,version()),1) from t1; 17625 END 17626 OUTPUT 17627 select left(concat(a, version()), 1) from t1 17628 END 17629 INPUT 17630 select 10 % 7, 10 mod 7, 10 div 3; 17631 END 17632 OUTPUT 17633 select 10 % 7, 10 % 7, 10 div 3 from dual 17634 END 17635 INPUT 17636 select monthname(date) from t1 inner join t2 on t1.id = t2.id; 17637 END 17638 OUTPUT 17639 select monthname(`date`) from t1 join t2 on t1.id = t2.id 17640 END 17641 INPUT 17642 select space(-4294967296); 17643 END 17644 OUTPUT 17645 select space(-4294967296) from dual 17646 END 17647 INPUT 17648 select 'a' regexp 'A' collate latin1_general_cs; 17649 END 17650 OUTPUT 17651 select 'a' regexp 'A' collate latin1_general_cs from dual 17652 END 17653 INPUT 17654 select grp,group_concat(c order by c) from t1 group by grp; 17655 END 17656 OUTPUT 17657 select grp, group_concat(c order by c asc) from t1 group by grp 17658 END 17659 INPUT 17660 select count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c'); 17661 END 17662 OUTPUT 17663 select count(distinct a1, a2, b) from t1 where a1 > 'a' and a2 > 'a' and b = 'c' 17664 END 17665 INPUT 17666 select last_day('0000-00-00'); 17667 END 17668 OUTPUT 17669 select last_day('0000-00-00') from dual 17670 END 17671 INPUT 17672 select substring('hello', 1, -4294967297); 17673 END 17674 OUTPUT 17675 select substr('hello', 1, -4294967297) from dual 17676 END 17677 INPUT 17678 select c, v2.table_name from v1 right join information_schema.TABLES v2 on (v1.c=v2.table_name) where v1.c rlike "t[1-5]{1}$" order by c; 17679 END 17680 OUTPUT 17681 select c, v2.table_name from v1 right join information_schema.`TABLES` as v2 on v1.c = v2.table_name where v1.c regexp 't[1-5]{1}$' order by c asc 17682 END 17683 INPUT 17684 select t1.i,t2.i,t3.i from t2 right join t3 on (t2.i=t3.i),t1 order by t1.i,t2.i,t3.i; 17685 END 17686 OUTPUT 17687 select t1.i, t2.i, t3.i from t2 right join t3 on t2.i = t3.i, t1 order by t1.i asc, t2.i asc, t3.i asc 17688 END 17689 INPUT 17690 select get_lock('bug27638', 1); 17691 END 17692 OUTPUT 17693 select get_lock('bug27638', 1) from dual 17694 END 17695 INPUT 17696 select from t1 where str like 'aa%'; 17697 END 17698 ERROR 17699 syntax error at position 12 near 'from' 17700 END 17701 INPUT 17702 select t1.name, t2.name, t2.id, t2.owner, t3.id from t1 left join t2 on (t1.id = t2.owner) right join t1 as t3 on t3.id=t2.owner; 17703 END 17704 OUTPUT 17705 select t1.`name`, t2.`name`, t2.id, t2.owner, t3.id from t1 left join t2 on t1.id = t2.owner right join t1 as t3 on t3.id = t2.owner 17706 END 17707 INPUT 17708 select distinct t1.a,sec_to_time(sum(time_to_sec(t))) from t1 left join t2 on (t1.b=t2.a) group by t1.a,t2.b; 17709 END 17710 OUTPUT 17711 select distinct t1.a, sec_to_time(sum(time_to_sec(t))) from t1 left join t2 on t1.b = t2.a group by t1.a, t2.b 17712 END 17713 INPUT 17714 select grp, sum(a)+count(a)+avg(a)+std(a)+variance(a)+bit_or(a)+bit_and(a)+min(a)+max(a)+min(c)+max(c) as sum from t1 group by grp; 17715 END 17716 OUTPUT 17717 select grp, sum(a) + count(a) + avg(a) + std(a) + variance(a) + bit_or(a) + bit_and(a) + min(a) + max(a) + min(c) + max(c) as sum from t1 group by grp 17718 END 17719 INPUT 17720 select -9223372036854775808 1 as result; 17721 END 17722 ERROR 17723 syntax error at position 30 near '1' 17724 END 17725 INPUT 17726 select distinct nullif(a,b) as c from t1 z order by z.c; 17727 END 17728 OUTPUT 17729 select distinct nullif(a, b) as c from t1 as z order by z.c asc 17730 END 17731 INPUT 17732 select locate('lo','hello',18446744073709551616); 17733 END 17734 OUTPUT 17735 select locate('lo', 'hello', 18446744073709551616) from dual 17736 END 17737 INPUT 17738 select from t1 natural left join t2 where (i is not null) is not null; 17739 END 17740 ERROR 17741 syntax error at position 12 near 'from' 17742 END 17743 INPUT 17744 select date_sub("1998-01-01 00:00:00",INTERVAL "1:1" MINUTE_SECOND); 17745 END 17746 OUTPUT 17747 select date_sub('1998-01-01 00:00:00', interval '1:1' MINUTE_SECOND) from dual 17748 END 17749 INPUT 17750 select count(distinct s,t) from t1; 17751 END 17752 OUTPUT 17753 select count(distinct s, t) from t1 17754 END 17755 INPUT 17756 select truncate(15000111000111000155,-1); 17757 END 17758 OUTPUT 17759 select truncate(15000111000111000155, -1) from dual 17760 END 17761 INPUT 17762 select t1.*,t2.* from t1 natural left outer join t2; 17763 END 17764 OUTPUT 17765 select t1.*, t2.* from t1 natural left join t2 17766 END 17767 INPUT 17768 select from t1 ignore index (primary) where tt like 'AA%'; 17769 END 17770 ERROR 17771 syntax error at position 12 near 'from' 17772 END 17773 INPUT 17774 select substring_index('aaaaaaaaa1','aa',-2); 17775 END 17776 OUTPUT 17777 select substring_index('aaaaaaaaa1', 'aa', -2) from dual 17778 END 17779 INPUT 17780 select d, two from (select a as d, 2*a as two from t) dt; 17781 END 17782 OUTPUT 17783 select d, two from (select a as d, 2 * a as two from t) as dt 17784 END 17785 INPUT 17786 select t1.name, t2.name, t2.id,t3.id from t1 right join t2 on (t1.id = t2.owner) right join t1 as t3 on t3.id=t2.owner; 17787 END 17788 OUTPUT 17789 select t1.`name`, t2.`name`, t2.id, t3.id from t1 right join t2 on t1.id = t2.owner right join t1 as t3 on t3.id = t2.owner 17790 END 17791 INPUT 17792 select count(*) from t1 where a = 'aaaxxx'; 17793 END 17794 OUTPUT 17795 select count(*) from t1 where a = 'aaaxxx' 17796 END 17797 INPUT 17798 select from mysqldump_myDB.v1; 17799 END 17800 ERROR 17801 syntax error at position 12 near 'from' 17802 END 17803 INPUT 17804 select Aaa.col1 from t1Aa as AaA; 17805 END 17806 OUTPUT 17807 select Aaa.col1 from t1Aa as AaA 17808 END 17809 INPUT 17810 select date_sub("50-01-01 00:00:01",INTERVAL 2 SECOND); 17811 END 17812 OUTPUT 17813 select date_sub('50-01-01 00:00:01', interval 2 SECOND) from dual 17814 END 17815 INPUT 17816 select from `information_schema`.`REFERENTIAL_CONSTRAINTS` where `TABLE_NAME` = NULL; 17817 END 17818 ERROR 17819 syntax error at position 12 near 'from' 17820 END 17821 INPUT 17822 select (1.175494351E-37 div 1.7976931348623157E+308); 17823 END 17824 OUTPUT 17825 select 1.175494351E-37 div 1.7976931348623157E+308 from dual 17826 END 17827 INPUT 17828 select distinct a from t1 group by b,a having a > 2 order by a desc; 17829 END 17830 OUTPUT 17831 select distinct a from t1 group by b, a having a > 2 order by a desc 17832 END 17833 INPUT 17834 select cast(18446744073709551615 as unsigned); 17835 END 17836 OUTPUT 17837 select convert(18446744073709551615, unsigned) from dual 17838 END 17839 INPUT 17840 select var_samp(e) as 'null', var_pop(e) as 'null' from bug22555; 17841 END 17842 OUTPUT 17843 select var_samp(e) as `null`, var_pop(e) as `null` from bug22555 17844 END 17845 INPUT 17846 select from (select 1) as a; 17847 END 17848 ERROR 17849 syntax error at position 12 near 'from' 17850 END 17851 INPUT 17852 select hex(char(0x41 using ucs2)); 17853 END 17854 ERROR 17855 syntax error at position 27 near 'using' 17856 END 17857 INPUT 17858 select insert('hello', 1, -1, 'hi'); 17859 END 17860 ERROR 17861 syntax error at position 14 near 'insert' 17862 END 17863 INPUT 17864 select i from t1 where i = 1 into j; 17865 END 17866 ERROR 17867 syntax error at position 36 near 'j' 17868 END 17869 INPUT 17870 select c from t2; 17871 END 17872 OUTPUT 17873 select c from t2 17874 END 17875 INPUT 17876 select @keyword1_id:= 10201; 17877 END 17878 ERROR 17879 syntax error at position 21 near ':' 17880 END 17881 INPUT 17882 select min(a) is null from t1; 17883 END 17884 OUTPUT 17885 select min(a) is null from t1 17886 END 17887 INPUT 17888 select @stamp2:=f2 from t1; 17889 END 17890 ERROR 17891 syntax error at position 16 near ':' 17892 END 17893 INPUT 17894 select last_day('2005-00-00'); 17895 END 17896 OUTPUT 17897 select last_day('2005-00-00') from dual 17898 END 17899 INPUT 17900 select count(*) from t1 where v between 'a' and 'a '; 17901 END 17902 OUTPUT 17903 select count(*) from t1 where v between 'a' and 'a ' 17904 END 17905 INPUT 17906 select export_set(3, _latin1'foo', _utf8'bar', ',', 4); 17907 END 17908 OUTPUT 17909 select export_set(3, _latin1 'foo', _utf8 'bar', ',', 4) from dual 17910 END 17911 INPUT 17912 select a,hex(a) from t1; 17913 END 17914 OUTPUT 17915 select a, hex(a) from t1 17916 END 17917 INPUT 17918 select grp, sum(a),count(a),avg(a),std(a),variance(a),bit_or(a),bit_and(a),min(a),max(a),min(c),max(c) from t1 group by grp; 17919 END 17920 OUTPUT 17921 select grp, sum(a), count(a), avg(a), std(a), variance(a), bit_or(a), bit_and(a), min(a), max(a), min(c), max(c) from t1 group by grp 17922 END 17923 INPUT 17924 select count(*) from t1 where a = 'aaazzz'; 17925 END 17926 OUTPUT 17927 select count(*) from t1 where a = 'aaazzz' 17928 END 17929 INPUT 17930 select substring('hello', -18446744073709551617, 1); 17931 END 17932 OUTPUT 17933 select substr('hello', -18446744073709551617, 1) from dual 17934 END 17935 INPUT 17936 select char(0xff,0x8f using utf8); 17937 END 17938 ERROR 17939 syntax error at position 28 near 'using' 17940 END 17941 INPUT 17942 select TRUE,FALSE,NULL; 17943 END 17944 OUTPUT 17945 select true, false, null from dual 17946 END 17947 INPUT 17948 select from t1 where a=4; 17949 END 17950 ERROR 17951 syntax error at position 12 near 'from' 17952 END 17953 INPUT 17954 select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),GEOMETRYCOLLECTION(MULTIPOINT(0 14,-9 -11),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20))),MULTIPOINT(16 1,-9 -17,-16 6,-17 3),POINT(-18 13))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(7 0),MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17),MULTIPOINT(-9 -5,5 15,12 -11,12 11))'))) as result; 17955 END 17956 OUTPUT 17957 select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),GEOMETRYCOLLECTION(MULTIPOINT(0 14,-9 -11),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20))),MULTIPOINT(16 1,-9 -17,-16 6,-17 3),POINT(-18 13))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(7 0),MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17),MULTIPOINT(-9 -5,5 15,12 -11,12 11))'))) as result from dual 17958 END 17959 INPUT 17960 select count(distinct vs) from t1; 17961 END 17962 OUTPUT 17963 select count(distinct vs) from t1 17964 END 17965 INPUT 17966 select timestampdiff(SQL_TSI_DAY, '2001-02-01', '2001-05-01') as a; 17967 END 17968 OUTPUT 17969 select timestampdiff(SQL_TSI_DAY, '2001-02-01', '2001-05-01') as a from dual 17970 END 17971 INPUT 17972 select elt(1,c1,'�'),elt(1,'�',c1) from t1; 17973 END 17974 OUTPUT 17975 select elt(1, c1, '�'), elt(1, '�', c1) from t1 17976 END 17977 INPUT 17978 select POSITION(_latin1'B' COLLATE latin1_bin IN _latin1'abcd'); 17979 END 17980 ERROR 17981 syntax error at position 57 near '_latin1' 17982 END 17983 INPUT 17984 select from v2; 17985 END 17986 ERROR 17987 syntax error at position 12 near 'from' 17988 END 17989 INPUT 17990 select group_concat(distinct a, c order by a) from t1; 17991 END 17992 OUTPUT 17993 select group_concat(distinct a, c order by a asc) from t1 17994 END 17995 INPUT 17996 select !0,NOT 0=1,!(0=0),1 AND 1,1 && 0,0 OR 1,1 || NULL, 1=1 or 1=1 and 1=0; 17997 END 17998 OUTPUT 17999 select !0, not 0 = 1, !(0 = 0), 1 and 1, 1 and 0, 0 or 1, 1 or null, 1 = 1 or 1 = 1 and 1 = 0 from dual 18000 END 18001 INPUT 18002 select from t1 left join t2 on (t1.i=t2.i); 18003 END 18004 ERROR 18005 syntax error at position 12 near 'from' 18006 END 18007 INPUT 18008 select C.a, c.a from t1 c, t2 C; 18009 END 18010 OUTPUT 18011 select C.a, c.a from t1 as c, t2 as C 18012 END 18013 INPUT 18014 select _koi8r'a' = _koi8r'A' COLLATE koi8r_bin; 18015 END 18016 OUTPUT 18017 select _koi8r 'a' = _koi8r 'A' collate koi8r_bin from dual 18018 END 18019 INPUT 18020 select count(*) into n from t1; 18021 END 18022 ERROR 18023 syntax error at position 23 near 'n' 18024 END 18025 INPUT 18026 select time("1997-12-31 25:59:59.000001"); 18027 END 18028 OUTPUT 18029 select time('1997-12-31 25:59:59.000001') from dual 18030 END 18031 INPUT 18032 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_danish_ci; 18033 END 18034 OUTPUT 18035 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_danish_ci 18036 END 18037 INPUT 18038 select char(0xd1,0x8f using utf8); 18039 END 18040 ERROR 18041 syntax error at position 28 near 'using' 18042 END 18043 INPUT 18044 select distinct b from t2 where (a2 >= 'b') and (b = 'a'); 18045 END 18046 OUTPUT 18047 select distinct b from t2 where a2 >= 'b' and b = 'a' 18048 END 18049 INPUT 18050 select c1 from t1 where c1 between '�' and '�'; 18051 END 18052 OUTPUT 18053 select c1 from t1 where c1 between '�' and '�' 18054 END 18055 INPUT 18056 select count(b) from t1 where b >= 2; 18057 END 18058 OUTPUT 18059 select count(b) from t1 where b >= 2 18060 END 18061 INPUT 18062 select LENGTH(RANDOM_BYTES(1024))=1024; 18063 END 18064 OUTPUT 18065 select LENGTH(RANDOM_BYTES(1024)) = 1024 from dual 18066 END 18067 INPUT 18068 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_slovak_ci; 18069 END 18070 OUTPUT 18071 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_slovak_ci 18072 END 18073 INPUT 18074 select concat("1","2")|0,concat("1",".5")+0.0; 18075 END 18076 OUTPUT 18077 select concat('1', '2') | 0, concat('1', '.5') + 0.0 from dual 18078 END 18079 INPUT 18080 select concat(ord(min(b)),ord(max(b))),min(b),max(b) from t1 group by a1,a2; 18081 END 18082 OUTPUT 18083 select concat(ord(min(b)), ord(max(b))), min(b), max(b) from t1 group by a1, a2 18084 END 18085 INPUT 18086 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_unicode_520_ci; 18087 END 18088 OUTPUT 18089 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_unicode_520_ci 18090 END 18091 INPUT 18092 select from t3 join (t1 join t2 using (a1)) on b=c1 join t4 using (c2); 18093 END 18094 ERROR 18095 syntax error at position 12 near 'from' 18096 END 18097 INPUT 18098 select extract(HOUR_MICROSECOND FROM "1999-01-02 10:11:12.000123"); 18099 END 18100 OUTPUT 18101 select extract(hour_microsecond from '1999-01-02 10:11:12.000123') from dual 18102 END 18103 INPUT 18104 select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('polygon((1 1.2, 1 0, 2 0, 1 1.2))')); 18105 END 18106 OUTPUT 18107 select st_touches(ST_GeomFromText('polygon((0 0, 2 2, 0 4, 0 0))'), ST_GeomFromText('polygon((1 1.2, 1 0, 2 0, 1 1.2))')) from dual 18108 END 18109 INPUT 18110 select ifnull(NULL, _utf8mb4'string'); 18111 END 18112 OUTPUT 18113 select ifnull(null, _utf8mb4 'string') from dual 18114 END 18115 INPUT 18116 select database() = _utf8"test"; 18117 END 18118 OUTPUT 18119 select database() = _utf8 'test' from dual 18120 END 18121 INPUT 18122 select collation(char(123)), collation(char(123 using binary)); 18123 END 18124 ERROR 18125 syntax error at position 54 near 'using' 18126 END 18127 INPUT 18128 select c cy from t1 where c='y'; 18129 END 18130 OUTPUT 18131 select c as cy from t1 where c = 'y' 18132 END 18133 INPUT 18134 select from t1 where xxx REGEXP '^this is some text: to test - out.reg exp [[(][0-9]+[/][0-9]+[])][ ]*$'; 18135 END 18136 ERROR 18137 syntax error at position 12 near 'from' 18138 END 18139 INPUT 18140 select collation(repeat(_latin2'a',10)), coercibility(repeat(_latin2'a',10)); 18141 END 18142 OUTPUT 18143 select collation(repeat(_latin2 'a', 10)), coercibility(repeat(_latin2 'a', 10)) from dual 18144 END 18145 INPUT 18146 select find_in_set(json_unquote(json_set('{}','$','')),1); 18147 END 18148 OUTPUT 18149 select find_in_set(json_unquote(json_set('{}', '$', '')), 1) from dual 18150 END 18151 INPUT 18152 select col1 as count_col1,col2 as group_col2 from t1 as tmp1 group by col1,col2 having group_col2 = 'hello'; 18153 END 18154 OUTPUT 18155 select col1 as count_col1, col2 as group_col2 from t1 as tmp1 group by col1, col2 having group_col2 = 'hello' 18156 END 18157 INPUT 18158 select a as like_a from t1 where a like 'a%'; 18159 END 18160 OUTPUT 18161 select a as like_a from t1 where a like 'a%' 18162 END 18163 INPUT 18164 select from t1 where a = '4828532208463511553'; 18165 END 18166 ERROR 18167 syntax error at position 12 near 'from' 18168 END 18169 INPUT 18170 select char_length('abcd'), octet_length('abcd'); 18171 END 18172 OUTPUT 18173 select char_length('abcd'), octet_length('abcd') from dual 18174 END 18175 INPUT 18176 select hex(convert(char(2557 using latin1) using utf8mb4)); 18177 END 18178 ERROR 18179 syntax error at position 35 near 'using' 18180 END 18181 INPUT 18182 select 0x961838f6fc3c7f9ec17b5d900410d8aa like '%-113%'; 18183 END 18184 OUTPUT 18185 select 0x961838f6fc3c7f9ec17b5d900410d8aa like '%-113%' from dual 18186 END 18187 INPUT 18188 select @keyword2_id:= 10202; 18189 END 18190 ERROR 18191 syntax error at position 21 near ':' 18192 END 18193 INPUT 18194 select week(20001231), week(20001231,6); 18195 END 18196 OUTPUT 18197 select week(20001231), week(20001231, 6) from dual 18198 END 18199 INPUT 18200 select mbrtouches(ST_GeomFromText("linestring(1 0, 2 0)"), ST_GeomFromText("polygon((0 0, 3 0, 3 3, 0 3, 0 0))")); 18201 END 18202 OUTPUT 18203 select mbrtouches(ST_GeomFromText('linestring(1 0, 2 0)'), ST_GeomFromText('polygon((0 0, 3 0, 3 3, 0 3, 0 0))')) from dual 18204 END 18205 INPUT 18206 select count(*) from information_schema.events where event_schema = database() and event_name = 'event_35981' and on_completion = 'NOT PRESERVE'; 18207 END 18208 OUTPUT 18209 select count(*) from information_schema.events where event_schema = database() and event_name = 'event_35981' and on_completion = 'NOT PRESERVE' 18210 END 18211 INPUT 18212 select hex(substr(_utf16 0x00e400e50068,-1)); 18213 END 18214 OUTPUT 18215 select hex(substr(_utf16 0x00e400e50068, -1)) from dual 18216 END 18217 INPUT 18218 select substr('hello',null,2),substr('hello',2,null),substr(null,1,2); 18219 END 18220 OUTPUT 18221 select substr('hello', null, 2), substr('hello', 2, null), substr(null, 1, 2) from dual 18222 END 18223 INPUT 18224 select t1.a1, t1.a2, t2.a1, t2.a2 from t1 left outer join t2 on t1.a1=10; 18225 END 18226 OUTPUT 18227 select t1.a1, t1.a2, t2.a1, t2.a2 from t1 left join t2 on t1.a1 = 10 18228 END 18229 INPUT 18230 select benchmark(@bench_count, pi()); 18231 END 18232 OUTPUT 18233 select benchmark(@bench_count, pi()) from dual 18234 END 18235 INPUT 18236 select a as like_aa from t1 where a like 'aa%'; 18237 END 18238 OUTPUT 18239 select a as like_aa from t1 where a like 'aa%' 18240 END 18241 INPUT 18242 select -9223372036854775808 0 as result; 18243 END 18244 ERROR 18245 syntax error at position 30 near '0' 18246 END 18247 INPUT 18248 select userid,count(*) from t1 group by userid order by userid desc; 18249 END 18250 OUTPUT 18251 select userid, count(*) from t1 group by userid order by userid desc 18252 END 18253 INPUT 18254 select std(s1/s2) from bug22555 group by i order by i; 18255 END 18256 OUTPUT 18257 select std(s1 / s2) from bug22555 group by i order by i asc 18258 END 18259 INPUT 18260 select table_name from information_schema.TABLES where table_schema like "test%" order by table_name; 18261 END 18262 OUTPUT 18263 select table_name from information_schema.`TABLES` where table_schema like 'test%' order by table_name asc 18264 END 18265 INPUT 18266 select min(a1), max(a1) from t1 where a4 = 0.080; 18267 END 18268 OUTPUT 18269 select min(a1), max(a1) from t1 where a4 = 0.080 18270 END 18271 INPUT 18272 select format(NULL, 2); 18273 END 18274 OUTPUT 18275 select format(null, 2) from dual 18276 END 18277 INPUT 18278 select count(distinct b) from t1 where (a2 >= 'b') and (b = 'a'); 18279 END 18280 OUTPUT 18281 select count(distinct b) from t1 where a2 >= 'b' and b = 'a' 18282 END 18283 INPUT 18284 select yearweek("0000-00-00"),yearweek(d),yearweek(dt),yearweek(t),yearweek(c) from t1; 18285 END 18286 OUTPUT 18287 select yearweek('0000-00-00'), yearweek(d), yearweek(dt), yearweek(t), yearweek(c) from t1 18288 END 18289 INPUT 18290 select f2 from t1 where time(f2) between cast("12:1:2" as time) and cast("12:2:2" as time); 18291 END 18292 OUTPUT 18293 select f2 from t1 where time(f2) between convert('12:1:2', time) and convert('12:2:2', time) 18294 END 18295 INPUT 18296 select a1,a2,b, max(c) from t2 where (c < 'a0') group by a1,a2,b; 18297 END 18298 OUTPUT 18299 select a1, a2, b, max(c) from t2 where c < 'a0' group by a1, a2, b 18300 END 18301 INPUT 18302 select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name; 18303 END 18304 OUTPUT 18305 select host, db, `user`, table_name, column_name from mysql.columns_priv where `user` like 'mysqltest_%' order by host asc, db asc, `user` asc, table_name asc, column_name asc 18306 END 18307 INPUT 18308 select from renamed_slow_log; 18309 END 18310 ERROR 18311 syntax error at position 12 near 'from' 18312 END 18313 INPUT 18314 select 2 or 3; 18315 END 18316 OUTPUT 18317 select 2 or 3 from dual 18318 END 18319 INPUT 18320 select from t1 where a not between 1 and 2; 18321 END 18322 ERROR 18323 syntax error at position 12 near 'from' 18324 END 18325 INPUT 18326 select pow(cast(-2 as unsigned), 5), pow(18446744073709551614, 5), pow(-2, 5); 18327 END 18328 OUTPUT 18329 select pow(convert(-2, unsigned), 5), pow(18446744073709551614, 5), pow(-2, 5) from dual 18330 END 18331 INPUT 18332 select date_add(last_day("1997-12-1"), INTERVAL 1 DAY); 18333 END 18334 OUTPUT 18335 select date_add(last_day('1997-12-1'), interval 1 DAY) from dual 18336 END 18337 INPUT 18338 select concat(':',trim(BOTH 'ab' FROM 'ababmyabab'),':',trim(BOTH '*' FROM '***sql'),':'); 18339 END 18340 ERROR 18341 syntax error at position 38 near 'FROM' 18342 END 18343 INPUT 18344 select date_add(date,INTERVAL 1 YEAR) from t1; 18345 END 18346 OUTPUT 18347 select date_add(`date`, interval 1 YEAR) from t1 18348 END 18349 INPUT 18350 select v,count(t) from t1 group by v order by v limit 10; 18351 END 18352 OUTPUT 18353 select v, count(t) from t1 group by v order by v asc limit 10 18354 END 18355 INPUT 18356 select a1,a2,b,min(c),max(c) from t2 where (c > 'b1') or (c <= 'g1') group by a1,a2,b; 18357 END 18358 OUTPUT 18359 select a1, a2, b, min(c), max(c) from t2 where c > 'b1' or c <= 'g1' group by a1, a2, b 18360 END 18361 INPUT 18362 select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on t2.b=t3.a; 18363 END 18364 OUTPUT 18365 select t2.b, ifnull(t2.b, 'this is null') from t1 as t2 left join t1 as t3 on t2.b = t3.a 18366 END 18367 INPUT 18368 select from (select @arg00) aaa; 18369 END 18370 ERROR 18371 syntax error at position 12 near 'from' 18372 END 18373 INPUT 18374 select concat("*",name,"*") from t2 order by 1; 18375 END 18376 OUTPUT 18377 select concat('*', `name`, '*') from t2 order by 1 asc 18378 END 18379 INPUT 18380 select concat('|', text1, '|') from t1 where text1='teststring'; 18381 END 18382 OUTPUT 18383 select concat('|', text1, '|') from t1 where text1 = 'teststring' 18384 END 18385 INPUT 18386 select mbrtouches(ST_GeomFromText("point(2 4)"), ST_GeomFromText("linestring(2 0, 2 4)")); 18387 END 18388 OUTPUT 18389 select mbrtouches(ST_GeomFromText('point(2 4)'), ST_GeomFromText('linestring(2 0, 2 4)')) from dual 18390 END 18391 INPUT 18392 select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b; 18393 END 18394 OUTPUT 18395 select distinct a1, a2, b, c from t2 where a2 >= 'b' and b = 'a' and c = 'i121' group by a1, a2, b 18396 END 18397 INPUT 18398 select d as e, two as f from (select a as d, 2*a as two from t) dt; 18399 END 18400 OUTPUT 18401 select d as e, two as f from (select a as d, 2 * a as two from t) as dt 18402 END 18403 INPUT 18404 select max(a) from t1m; 18405 END 18406 OUTPUT 18407 select max(a) from t1m 18408 END 18409 INPUT 18410 select timediff("1997-12-31 23:59:59.000001","23:59:59.000001"); 18411 END 18412 OUTPUT 18413 select timediff('1997-12-31 23:59:59.000001', '23:59:59.000001') from dual 18414 END 18415 INPUT 18416 select timestampdiff(year,'2004-02-28','2005-02-28'); 18417 END 18418 OUTPUT 18419 select timestampdiff(year, '2004-02-28', '2005-02-28') from dual 18420 END 18421 INPUT 18422 select substring('hello', 18446744073709551615, 18446744073709551615); 18423 END 18424 OUTPUT 18425 select substr('hello', 18446744073709551615, 18446744073709551615) from dual 18426 END 18427 INPUT 18428 select substring_index('aaaaaaaaa1','a',1); 18429 END 18430 OUTPUT 18431 select substring_index('aaaaaaaaa1', 'a', 1) from dual 18432 END 18433 INPUT 18434 select grp,group_concat(d order by a desc) from t1 group by grp; 18435 END 18436 OUTPUT 18437 select grp, group_concat(d order by a desc) from t1 group by grp 18438 END 18439 INPUT 18440 select t1.*,t2.*,t3.a from t1 left join t2 on (t1.a=t2.a) left join t1 as t3 on (t2.a=t3.a); 18441 END 18442 OUTPUT 18443 select t1.*, t2.*, t3.a from t1 left join t2 on t1.a = t2.a left join t1 as t3 on t2.a = t3.a 18444 END 18445 INPUT 18446 select ln(-1); 18447 END 18448 OUTPUT 18449 select ln(-1) from dual 18450 END 18451 INPUT 18452 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_swedish_ci; 18453 END 18454 OUTPUT 18455 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_swedish_ci 18456 END 18457 INPUT 18458 select count(distinct a),count(distinct grp) from t1; 18459 END 18460 OUTPUT 18461 select count(distinct a), count(distinct grp) from t1 18462 END 18463 INPUT 18464 select least(1,2,3) | greatest(16,32,8), least(5,4)*1,greatest(-1.0,1.0)*1,least(3,2,1)*1.0,greatest(1,1.1,1.0),least("10",9),greatest("A","B","0"); 18465 END 18466 OUTPUT 18467 select least(1, 2, 3) | greatest(16, 32, 8), least(5, 4) * 1, greatest(-1.0, 1.0) * 1, least(3, 2, 1) * 1.0, greatest(1, 1.1, 1.0), least('10', 9), greatest('A', 'B', '0') from dual 18468 END 18469 INPUT 18470 select count(*) from t17583; 18471 END 18472 OUTPUT 18473 select count(*) from t17583 18474 END 18475 INPUT 18476 select MYSQLTEST.T1.* from T1; 18477 END 18478 OUTPUT 18479 select MYSQLTEST.T1.* from T1 18480 END 18481 INPUT 18482 select t1.a,sec_to_time(sum(time_to_sec(t))) from t1 left join t2 on (t1.b=t2.a) group by t1.a,t2.b; 18483 END 18484 OUTPUT 18485 select t1.a, sec_to_time(sum(time_to_sec(t))) from t1 left join t2 on t1.b = t2.a group by t1.a, t2.b 18486 END 18487 INPUT 18488 select @@global.have_profiling; 18489 END 18490 OUTPUT 18491 select @@global.have_profiling from dual 18492 END 18493 INPUT 18494 select /lib32/ /libx32/ user, host, db, command, state, info from information_schema.processlist where (info like "select get_lock%" OR user='event_scheduler') order by info; 18495 END 18496 ERROR 18497 syntax error at position 9 18498 END 18499 INPUT 18500 select from t3 order by 1,2; 18501 END 18502 ERROR 18503 syntax error at position 12 near 'from' 18504 END 18505 INPUT 18506 select rpad('hello', -18446744073709551616, '1'); 18507 END 18508 OUTPUT 18509 select rpad('hello', -18446744073709551616, '1') from dual 18510 END 18511 INPUT 18512 select "at" as col1, "c" as col2; 18513 END 18514 OUTPUT 18515 select 'at' as col1, 'c' as col2 from dual 18516 END 18517 INPUT 18518 select min(`col002`) from t1 union select `col002` from t1; 18519 END 18520 OUTPUT 18521 select min(col002) from t1 union select col002 from t1 18522 END 18523 INPUT 18524 select from t1,t1 as t2 where t1.x=t2.y; 18525 END 18526 ERROR 18527 syntax error at position 12 near 'from' 18528 END 18529 INPUT 18530 select date,format,cast(str_to_date(date, format) as datetime) as datetime from t1; 18531 END 18532 OUTPUT 18533 select `date`, `format`, convert(str_to_date(`date`, `format`), datetime) as `datetime` from t1 18534 END 18535 INPUT 18536 select rpad('hello', -18446744073709551615, '1'); 18537 END 18538 OUTPUT 18539 select rpad('hello', -18446744073709551615, '1') from dual 18540 END 18541 INPUT 18542 select from t1 where MATCH a,b AGAINST ('"now support"' IN BOOLEAN MODE); 18543 END 18544 ERROR 18545 syntax error at position 12 near 'from' 18546 END 18547 INPUT 18548 select date_add("1997-12-31 23:59:59",INTERVAL "10000:99:99" HOUR_SECOND); 18549 END 18550 OUTPUT 18551 select date_add('1997-12-31 23:59:59', interval '10000:99:99' HOUR_SECOND) from dual 18552 END 18553 INPUT 18554 select count(*) from t1 where t='a '; 18555 END 18556 OUTPUT 18557 select count(*) from t1 where t = 'a ' 18558 END 18559 INPUT 18560 select rpad('hello', -4294967295, '1'); 18561 END 18562 OUTPUT 18563 select rpad('hello', -4294967295, '1') from dual 18564 END 18565 INPUT 18566 select _koi8r'a' LIKE _koi8r'A' COLLATE koi8r_general_ci; 18567 END 18568 OUTPUT 18569 select _koi8r 'a' like _koi8r 'A' collate koi8r_general_ci from dual 18570 END 18571 INPUT 18572 select soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB); 18573 END 18574 OUTPUT 18575 select soundex(_utf8mb4 0xE99885E8A788E99A8FE697B6E69BB4E696B0E79A84E696B0E997BB) from dual 18576 END 18577 INPUT 18578 select round(cast(-2 as unsigned), 1), round(18446744073709551614, 1), round(-2, 1); 18579 END 18580 OUTPUT 18581 select round(convert(-2, unsigned), 1), round(18446744073709551614, 1), round(-2, 1) from dual 18582 END 18583 INPUT 18584 select from t3 where a > 10 and a < 20; 18585 END 18586 ERROR 18587 syntax error at position 12 near 'from' 18588 END 18589 INPUT 18590 select from t1 where a like "%a%"; 18591 END 18592 ERROR 18593 syntax error at position 12 near 'from' 18594 END 18595 INPUT 18596 select a1,a2,b,min(c),max(c) from t1 where a1 >= 'b' group by a1,a2,b; 18597 END 18598 OUTPUT 18599 select a1, a2, b, min(c), max(c) from t1 where a1 >= 'b' group by a1, a2, b 18600 END 18601 INPUT 18602 select null mod null as 'NULL'; 18603 END 18604 OUTPUT 18605 select null % null as `NULL` from dual 18606 END 18607 INPUT 18608 select count(*) from information_schema.events where event_schema = database() and event_name = 'event_35981' and on_completion = 'PRESERVE'; 18609 END 18610 OUTPUT 18611 select count(*) from information_schema.events where event_schema = database() and event_name = 'event_35981' and on_completion = 'PRESERVE' 18612 END 18613 INPUT 18614 select locate('he','hello',-2); 18615 END 18616 OUTPUT 18617 select locate('he', 'hello', -2) from dual 18618 END 18619 INPUT 18620 select st_within( multipoint(point(4,2),point(-6,-8)), polygon( linestring(point(13,0),point(13,0)), linestring(point(2,4), point(2,4)) )); 18621 END 18622 OUTPUT 18623 select st_within(multipoint(point(4, 2), point(-6, -8)), polygon(linestring(point(13, 0), point(13, 0)), linestring(point(2, 4), point(2, 4)))) from dual 18624 END 18625 INPUT 18626 select lpad('hello', -18446744073709551615, '1'); 18627 END 18628 OUTPUT 18629 select lpad('hello', -18446744073709551615, '1') from dual 18630 END 18631 INPUT 18632 select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space'; 18633 END 18634 OUTPUT 18635 select event_schema, event_name, `definer`, event_definition from information_schema.events where event_name = 'white_space' 18636 END 18637 INPUT 18638 select CASE "c" when "a" then 1 when "b" then 2 END; 18639 END 18640 OUTPUT 18641 select case 'c' when 'a' then 1 when 'b' then 2 end from dual 18642 END 18643 INPUT 18644 select grp,group_concat(c order by 1) from t1 group by grp; 18645 END 18646 OUTPUT 18647 select grp, group_concat(c order by 1 asc) from t1 group by grp 18648 END 18649 INPUT 18650 select substring_index('the king of the the hill',' ',-3); 18651 END 18652 OUTPUT 18653 select substring_index('the king of the the hill', ' ', -3) from dual 18654 END 18655 INPUT 18656 select 1 as xml; 18657 END 18658 OUTPUT 18659 select 1 as xml from dual 18660 END 18661 INPUT 18662 select "h"; 18663 END 18664 OUTPUT 18665 select 'h' from dual 18666 END 18667 INPUT 18668 select count(id1) from t1 where id2 = 10; 18669 END 18670 OUTPUT 18671 select count(id1) from t1 where id2 = 10 18672 END 18673 INPUT 18674 select char(123 using binary); 18675 END 18676 ERROR 18677 syntax error at position 22 near 'using' 18678 END 18679 INPUT 18680 select char_length(left(@a:='тест',5)), length(@a), @a; 18681 END 18682 ERROR 18683 syntax error at position 28 near ':' 18684 END 18685 INPUT 18686 select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b) where coercibility(t2.a) = 5 order by t1.a,t2.a; 18687 END 18688 OUTPUT 18689 select t1.*, t2.* from t1 left join t2 on t1.b = t2.b where coercibility(t2.a) = 5 order by t1.a asc, t2.a asc 18690 END 18691 INPUT 18692 select from (t4 natural join t5) natural right join t1 where t4.y > 7; 18693 END 18694 ERROR 18695 syntax error at position 12 near 'from' 18696 END 18697 INPUT 18698 select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))); 18699 END 18700 OUTPUT 18701 select ST_asWKT(ST_geomfromwkb(0x000000000140240000000000004024000000000000)) from dual 18702 END 18703 INPUT 18704 select collation(export_set(255,_latin2'y',_latin2'n',_latin2' ')), coercibility(export_set(255,_latin2'y',_latin2'n',_latin2' ')); 18705 END 18706 OUTPUT 18707 select collation(export_set(255, _latin2 'y', _latin2 'n', _latin2 ' ')), coercibility(export_set(255, _latin2 'y', _latin2 'n', _latin2 ' ')) from dual 18708 END 18709 INPUT 18710 select hex(substr(_utf32 0x000000e4000000e500000068,-2)); 18711 END 18712 OUTPUT 18713 select hex(substr(_utf32 0x000000e4000000e500000068, -2)) from dual 18714 END 18715 INPUT 18716 select f1,'' from t1 union select f1,'' from t1; 18717 END 18718 OUTPUT 18719 select f1, '' from t1 union select f1, '' from t1 18720 END 18721 INPUT 18722 select ST_astext(g) from t1 where ST_Intersects(ST_GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))'), g); 18723 END 18724 OUTPUT 18725 select ST_astext(g) from t1 where ST_Intersects(ST_GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))'), g) 18726 END 18727 INPUT 18728 select t1.f1,t.* from t1, t1 t group by 1; 18729 END 18730 OUTPUT 18731 select t1.f1, t.* from t1, t1 as t group by 1 18732 END 18733 INPUT 18734 select from t1 where not(a < 10); 18735 END 18736 ERROR 18737 syntax error at position 12 near 'from' 18738 END 18739 INPUT 18740 select from t1 where firstname='john' and firstname like binary 'John'; 18741 END 18742 ERROR 18743 syntax error at position 12 near 'from' 18744 END 18745 INPUT 18746 select charset(charset(_utf8'a')), charset(collation(_utf8'a')); 18747 END 18748 OUTPUT 18749 select charset(charset(_utf8 'a')), charset(collation(_utf8 'a')) from dual 18750 END 18751 INPUT 18752 select from `information_schema`.`key_column_usage` where `TABLE_NAME` = NULL; 18753 END 18754 ERROR 18755 syntax error at position 12 near 'from' 18756 END 18757 INPUT 18758 select user() like "%@%"; 18759 END 18760 OUTPUT 18761 select user() like '%@%' from dual 18762 END 18763 INPUT 18764 select timestampadd(WEEK, 1, date) from t1; 18765 END 18766 OUTPUT 18767 select timestampadd(WEEK, 1, `date`) from t1 18768 END 18769 INPUT 18770 select log2(-1); 18771 END 18772 OUTPUT 18773 select log2(-1) from dual 18774 END 18775 INPUT 18776 select from t1 c, t2 C; 18777 END 18778 ERROR 18779 syntax error at position 12 near 'from' 18780 END 18781 INPUT 18782 select charset(database()); 18783 END 18784 OUTPUT 18785 select charset(database()) from dual 18786 END 18787 INPUT 18788 select from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is null; 18789 END 18790 ERROR 18791 syntax error at position 12 near 'from' 18792 END 18793 INPUT 18794 select round(18446744073709551614, -1), truncate(18446744073709551614, -1); 18795 END 18796 OUTPUT 18797 select round(18446744073709551614, -1), truncate(18446744073709551614, -1) from dual 18798 END 18799 INPUT 18800 select sha1('abc'); 18801 END 18802 OUTPUT 18803 select sha1('abc') from dual 18804 END 18805 INPUT 18806 select std(s1/s2) from bug22555 where i=2 group by i; 18807 END 18808 OUTPUT 18809 select std(s1 / s2) from bug22555 where i = 2 group by i 18810 END 18811 INPUT 18812 select s1 as before_delete_general_ci from t1 where s1 like 'ペテ%'; 18813 END 18814 OUTPUT 18815 select s1 as before_delete_general_ci from t1 where s1 like 'ペテ%' 18816 END 18817 INPUT 18818 select date_add("1997-12-31 23:59:59",INTERVAL "10000:1" MINUTE_SECOND); 18819 END 18820 OUTPUT 18821 select date_add('1997-12-31 23:59:59', interval '10000:1' MINUTE_SECOND) from dual 18822 END 18823 INPUT 18824 select unix_timestamp('2038-02-10 01:00:00'); 18825 END 18826 OUTPUT 18827 select unix_timestamp('2038-02-10 01:00:00') from dual 18828 END 18829 INPUT 18830 select t2.fld3 FROM t2 where fld3 = 'honeysuckle'; 18831 END 18832 OUTPUT 18833 select t2.fld3 from t2 where fld3 = 'honeysuckle' 18834 END 18835 INPUT 18836 select host,user,length(authentication_string) from mysql.user where user like 'mysqltest_%' order by host,user,authentication_string; 18837 END 18838 OUTPUT 18839 select host, `user`, length(authentication_string) from mysql.`user` where `user` like 'mysqltest_%' order by host asc, `user` asc, authentication_string asc 18840 END 18841 INPUT 18842 select S.ID as xID, S.ID1 as xID1 from t1 as S left join t1 as yS on S.ID1 between yS.ID1 and yS.ID2; 18843 END 18844 OUTPUT 18845 select S.ID as xID, S.ID1 as xID1 from t1 as S left join t1 as yS on S.ID1 between yS.ID1 and yS.ID2 18846 END 18847 INPUT 18848 select insert('hello', 4294967296, 1, 'hi'); 18849 END 18850 ERROR 18851 syntax error at position 14 near 'insert' 18852 END 18853 INPUT 18854 select one.id, elt(two.val,'one','two') from t1 one, t2 two where two.id=one.id; 18855 END 18856 OUTPUT 18857 select one.id, elt(two.val, 'one', 'two') from t1 as one, t2 as two where two.id = one.id 18858 END 18859 INPUT 18860 select concat_ws(', ','monty','was here','again'); 18861 END 18862 OUTPUT 18863 select concat_ws(', ', 'monty', 'was here', 'again') from dual 18864 END 18865 INPUT 18866 select rpad('STRING', 20, CONCAT('p','a','d') ); 18867 END 18868 OUTPUT 18869 select rpad('STRING', 20, CONCAT('p', 'a', 'd')) from dual 18870 END 18871 INPUT 18872 select 'hello' 'monty'; 18873 END 18874 OUTPUT 18875 select 'hello' as monty from dual 18876 END 18877 INPUT 18878 select collation(bin(130)), coercibility(bin(130)); 18879 END 18880 OUTPUT 18881 select collation(bin(130)), coercibility(bin(130)) from dual 18882 END 18883 INPUT 18884 select locate(null,'hello',null),locate('he',null,null); 18885 END 18886 OUTPUT 18887 select locate(null, 'hello', null), locate('he', null, null) from dual 18888 END 18889 INPUT 18890 select MBRwithin(b, b) IS NULL, MBRcontains(b, b) IS NULL, MBRoverlaps(b, b) IS NULL, MBRequals(b, b) IS NULL, MBRdisjoint(b, b) IS NULL, ST_touches(b, b) IS NULL, MBRintersects(b, b) IS NULL, ST_crosses(b, b) IS NULL from t1; 18891 END 18892 OUTPUT 18893 select MBRwithin(b, b) is null, MBRcontains(b, b) is null, MBRoverlaps(b, b) is null, MBRequals(b, b) is null, MBRdisjoint(b, b) is null, ST_touches(b, b) is null, MBRintersects(b, b) is null, ST_crosses(b, b) is null from t1 18894 END 18895 INPUT 18896 select from mysqltest.t1; 18897 END 18898 ERROR 18899 syntax error at position 12 near 'from' 18900 END 18901 INPUT 18902 select grp,group_concat(a order by d+c-ascii(c),a) from t1 group by grp; 18903 END 18904 OUTPUT 18905 select grp, group_concat(a order by d + c - ascii(c) asc, a asc) from t1 group by grp 18906 END 18907 INPUT 18908 select from t1 where MATCH(a,b) AGAINST ("collections") UNION ALL select from t1 where MATCH(a,b) AGAINST ("indexes"); 18909 END 18910 ERROR 18911 syntax error at position 12 near 'from' 18912 END 18913 INPUT 18914 select 0, ST_Within(ST_GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), ST_GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))')); 18915 END 18916 OUTPUT 18917 select 0, ST_Within(ST_GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), ST_GeomFromText('POLYGON((10 10,30 20,20 40, 10 10))')) from dual 18918 END 18919 INPUT 18920 select c cz from t1 where c='z'; 18921 END 18922 OUTPUT 18923 select c as cz from t1 where c = 'z' 18924 END 18925 INPUT 18926 select group_concat(c) from t1; 18927 END 18928 OUTPUT 18929 select group_concat(c) from t1 18930 END 18931 INPUT 18932 select 1e8 min(df) from t1; 18933 END 18934 ERROR 18935 syntax error at position 16 18936 END 18937 INPUT 18938 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_icelandic_ci; 18939 END 18940 OUTPUT 18941 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_icelandic_ci 18942 END 18943 INPUT 18944 select i from t1 where b=repeat(_utf8 'b',310); 18945 END 18946 OUTPUT 18947 select i from t1 where b = repeat(_utf8 'b', 310) 18948 END 18949 INPUT 18950 select from t1 where not(not(a)); 18951 END 18952 ERROR 18953 syntax error at position 12 near 'from' 18954 END 18955 INPUT 18956 select bar from t1 having instr(group_concat(bar order by concat(bar,bar) desc), "test2,test1") > 0; 18957 END 18958 OUTPUT 18959 select bar from t1 having instr(group_concat(bar order by concat(bar, bar) desc), 'test2,test1') > 0 18960 END 18961 INPUT 18962 select ifnull(NULL, _utf8'string'); 18963 END 18964 OUTPUT 18965 select ifnull(null, _utf8 'string') from dual 18966 END 18967 INPUT 18968 select hex(_utf8 B'001111111111'); 18969 END 18970 OUTPUT 18971 select hex(_utf8 B'001111111111') from dual 18972 END 18973 INPUT 18974 select right('hello', -18446744073709551615); 18975 END 18976 OUTPUT 18977 select right('hello', -18446744073709551615) from dual 18978 END 18979 INPUT 18980 select 1 where 'b%a' like '%%a' escape '%'; 18981 END 18982 OUTPUT 18983 select 1 from dual where 'b%a' like '%%a' escape '%' 18984 END 18985 INPUT 18986 select 0 mod null as 'NULL'; 18987 END 18988 OUTPUT 18989 select 0 % null as `NULL` from dual 18990 END 18991 INPUT 18992 select count(*) from t4; 18993 END 18994 OUTPUT 18995 select count(*) from t4 18996 END 18997 INPUT 18998 select @@group_concat_max_len, length(@x), char_length(@x), right(@x,12), right(HEX(@x),12); 18999 END 19000 OUTPUT 19001 select @@group_concat_max_len, length(@x), char_length(@x), right(@x, 12), right(HEX(@x), 12) from dual 19002 END 19003 INPUT 19004 select a, MAX(b), MAKE_SET(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h') from t1 group by a; 19005 END 19006 OUTPUT 19007 select a, MAX(b), MAKE_SET(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h') from t1 group by a 19008 END 19009 INPUT 19010 select lpad(c1,3,'�'), lpad('�',3,c1) from t1; 19011 END 19012 OUTPUT 19013 select lpad(c1, 3, '�'), lpad('�', 3, c1) from t1 19014 END 19015 INPUT 19016 select "1997-12-31 23:59:59" + INTERVAL 1 SECOND; 19017 END 19018 OUTPUT 19019 select '1997-12-31 23:59:59' + interval 1 SECOND from dual 19020 END 19021 INPUT 19022 select from t2 where b="world"; 19023 END 19024 ERROR 19025 syntax error at position 12 near 'from' 19026 END 19027 INPUT 19028 select count(*) from mysql.host; 19029 END 19030 OUTPUT 19031 select count(*) from mysql.host 19032 END 19033 INPUT 19034 select length(unhex(md5("abrakadabra"))); 19035 END 19036 OUTPUT 19037 select length(unhex(md5('abrakadabra'))) from dual 19038 END 19039 INPUT 19040 select yearweek("2000-01-06",1) as '2000', yearweek("2001-01-06",1) as '2001', yearweek("2002-01-06",1) as '2002',yearweek("2003-01-06",1) as '2003', yearweek("2004-01-06",1) as '2004', yearweek("2005-01-06",1) as '2005', yearweek("2006-01-06",1) as '2006'; 19041 END 19042 OUTPUT 19043 select yearweek('2000-01-06', 1) as `2000`, yearweek('2001-01-06', 1) as `2001`, yearweek('2002-01-06', 1) as `2002`, yearweek('2003-01-06', 1) as `2003`, yearweek('2004-01-06', 1) as `2004`, yearweek('2005-01-06', 1) as `2005`, yearweek('2006-01-06', 1) as `2006` from dual 19044 END 19045 INPUT 19046 select quarter("0000-00-00"),quarter(d),quarter(dt),quarter(t),quarter(c) from t1; 19047 END 19048 OUTPUT 19049 select quarter('0000-00-00'), quarter(d), quarter(dt), quarter(t), quarter(c) from t1 19050 END 19051 INPUT 19052 select makedate('0003',1); 19053 END 19054 OUTPUT 19055 select makedate('0003', 1) from dual 19056 END 19057 INPUT 19058 select f1 from t1 where f1 between cast("2006-1-1" as date) and cast("2006.1.1" as date); 19059 END 19060 OUTPUT 19061 select f1 from t1 where f1 between convert('2006-1-1', date) and convert('2006.1.1', date) 19062 END 19063 INPUT 19064 select lpad('STRING', 20, CONCAT('p','a','d') ); 19065 END 19066 OUTPUT 19067 select lpad('STRING', 20, CONCAT('p', 'a', 'd')) from dual 19068 END 19069 INPUT 19070 select hex(substr(_ucs2 0x00e400e50068,1)); 19071 END 19072 OUTPUT 19073 select hex(substr(_ucs2 0x00e400e50068, 1)) from dual 19074 END 19075 INPUT 19076 select conv(-29223372036854775809, -10, 16) as conv_signed, conv(-29223372036854775809, 10, 16) as conv_unsigned; 19077 END 19078 OUTPUT 19079 select conv(-29223372036854775809, -10, 16) as conv_signed, conv(-29223372036854775809, 10, 16) as conv_unsigned from dual 19080 END 19081 INPUT 19082 select host,db,user from mysql.db where user = 'mysqltest_1' order by host,db,user; 19083 END 19084 OUTPUT 19085 select host, db, `user` from mysql.db where `user` = 'mysqltest_1' order by host asc, db asc, `user` asc 19086 END 19087 INPUT 19088 select a1,a2,b, max(c) from t2 where (c > 'f123') group by a1,a2,b; 19089 END 19090 OUTPUT 19091 select a1, a2, b, max(c) from t2 where c > 'f123' group by a1, a2, b 19092 END 19093 INPUT 19094 select insert('hello', 4294967296, 4294967296, 'hi'); 19095 END 19096 ERROR 19097 syntax error at position 14 near 'insert' 19098 END 19099 INPUT 19100 select aes_decrypt(NULL,"a"); 19101 END 19102 OUTPUT 19103 select aes_decrypt(null, 'a') from dual 19104 END 19105 INPUT 19106 select a from t1 where a in (with cte as (select t1.a) select /*+ no_semijoin() node_modules/ a from cte); 19107 END 19108 ERROR 19109 syntax error at position 107 near '/*+ no_semijoin() node_modules/ a from cte);' 19110 END 19111 INPUT 19112 select from v1a; 19113 END 19114 ERROR 19115 syntax error at position 12 near 'from' 19116 END 19117 INPUT 19118 select @@optimizer_switch; 19119 END 19120 OUTPUT 19121 select @@optimizer_switch from dual 19122 END 19123 INPUT 19124 select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join t1 c on b.id = c.thread where match(b.betreff) against ('+abc' in boolean mode) union select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join t1 c on b.id = c.thread where match(c.beitrag) against ('+abc' in boolean mode) order by match(b.betreff) against ('+abc' in boolean mode) desc; 19125 END 19126 OUTPUT 19127 select a.`text`, b.id, b.betreff from t2 as a join t3 as b on a.id = b.forum join t1 as c on b.id = c.thread where match(b.betreff) against ('+abc' in boolean mode) union select a.`text`, b.id, b.betreff from t2 as a join t3 as b on a.id = b.forum join t1 as c on b.id = c.thread where match(c.beitrag) against ('+abc' in boolean mode) order by match(b.betreff) against ('+abc' in boolean mode) desc 19128 END 19129 INPUT 19130 select sql_big_result trim(v),count(c) from t1 group by v order by v limit 10; 19131 END 19132 ERROR 19133 syntax error at position 28 19134 END 19135 INPUT 19136 select 1, min(a) from t1m where a=99; 19137 END 19138 OUTPUT 19139 select 1, min(a) from t1m where a = 99 19140 END 19141 INPUT 19142 select char(196 using utf8mb4); 19143 END 19144 ERROR 19145 syntax error at position 22 near 'using' 19146 END 19147 INPUT 19148 select trim(null from 'kate') as "must_be_null"; 19149 END 19150 ERROR 19151 syntax error at position 22 near 'from' 19152 END 19153 INPUT 19154 select domain from t1 where concat('@', trim(leading '.' from concat('.', domain))) = '@hello.de'; 19155 END 19156 ERROR 19157 syntax error at position 62 near 'from' 19158 END 19159 INPUT 19160 select @topic4_id:= 10104; 19161 END 19162 ERROR 19163 syntax error at position 19 near ':' 19164 END 19165 INPUT 19166 select 10E+0+'a'; 19167 END 19168 OUTPUT 19169 select 10E+0 + 'a' from dual 19170 END 19171 INPUT 19172 select SQL_BIG_RESULT bit_and(col), bit_or(col) from t1 group by col; 19173 END 19174 ERROR 19175 syntax error at position 31 19176 END 19177 INPUT 19178 select 3; 19179 END 19180 OUTPUT 19181 select 3 from dual 19182 END 19183 INPUT 19184 select from (select group_concat('c') from DUAL) t; 19185 END 19186 ERROR 19187 syntax error at position 12 near 'from' 19188 END 19189 INPUT 19190 select NAME_CONST('_id',1234) as id; 19191 END 19192 OUTPUT 19193 select NAME_CONST('_id', 1234) as id from dual 19194 END 19195 INPUT 19196 select -1.49 or -1.49,0.6 or 0.6; 19197 END 19198 OUTPUT 19199 select -1.49 or -1.49, 0.6 or 0.6 from dual 19200 END 19201 INPUT 19202 select distinct b from t1 order by 1; 19203 END 19204 OUTPUT 19205 select distinct b from t1 order by 1 asc 19206 END 19207 INPUT 19208 select (12 mod 0) <=> null as '1'; 19209 END 19210 OUTPUT 19211 select 12 % 0 <=> null as `1` from dual 19212 END 19213 INPUT 19214 select from t1 where a=if(b<10,_ucs2 0x0061,_ucs2 0x0062); 19215 END 19216 ERROR 19217 syntax error at position 12 near 'from' 19218 END 19219 INPUT 19220 select ST_astext(st_symdifference(ST_GeomFromText('multipoint(2 2, 3 3)'), ST_GeomFromText('multipoint(2 2, 3 3)'))); 19221 END 19222 OUTPUT 19223 select ST_astext(st_symdifference(ST_GeomFromText('multipoint(2 2, 3 3)'), ST_GeomFromText('multipoint(2 2, 3 3)'))) from dual 19224 END 19225 INPUT 19226 select t2.fld3 FROM t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3; 19227 END 19228 OUTPUT 19229 select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3 asc 19230 END 19231 INPUT 19232 select date_add(date,INTERVAL "1 1:1:1" DAY_SECOND) from t1; 19233 END 19234 OUTPUT 19235 select date_add(`date`, interval '1 1:1:1' DAY_SECOND) from t1 19236 END 19237 INPUT 19238 select column_name from information_schema.columns where table_name='t1' order by column_name; 19239 END 19240 OUTPUT 19241 select column_name from information_schema.`columns` where table_name = 't1' order by column_name asc 19242 END 19243 INPUT 19244 select from t1 where t1="ABC"; 19245 END 19246 ERROR 19247 syntax error at position 12 near 'from' 19248 END 19249 INPUT 19250 select from v3b; 19251 END 19252 ERROR 19253 syntax error at position 12 near 'from' 19254 END 19255 INPUT 19256 select group_concat(distinct s1 order by s2) from t1 where s2 < 4; 19257 END 19258 OUTPUT 19259 select group_concat(distinct s1 order by s2 asc) from t1 where s2 < 4 19260 END 19261 INPUT 19262 select collation(replace(_latin2'abcd',_latin2'b',_latin2'B')), coercibility(replace(_latin2'abcd',_latin2'b',_latin2'B')); 19263 END 19264 OUTPUT 19265 select collation(replace(_latin2 'abcd', _latin2 'b', _latin2 'B')), coercibility(replace(_latin2 'abcd', _latin2 'b', _latin2 'B')) from dual 19266 END 19267 INPUT 19268 select space(-4294967295); 19269 END 19270 OUTPUT 19271 select space(-4294967295) from dual 19272 END 19273 INPUT 19274 select from t3 where a=1 order by b limit 2; 19275 END 19276 ERROR 19277 syntax error at position 12 near 'from' 19278 END 19279 INPUT 19280 select from (select group_concat(a) from t1) t2; 19281 END 19282 ERROR 19283 syntax error at position 12 near 'from' 19284 END 19285 INPUT 19286 select left('hello', -18446744073709551617); 19287 END 19288 OUTPUT 19289 select left('hello', -18446744073709551617) from dual 19290 END 19291 INPUT 19292 select from t1 where match(d, e) against ('+aword +bword' in boolean mode); 19293 END 19294 ERROR 19295 syntax error at position 12 near 'from' 19296 END 19297 INPUT 19298 select right('hello', 4294967295); 19299 END 19300 OUTPUT 19301 select right('hello', 4294967295) from dual 19302 END 19303 INPUT 19304 select a != b from t1; 19305 END 19306 OUTPUT 19307 select a != b from t1 19308 END 19309 INPUT 19310 select hex(s1), s1 from t1; 19311 END 19312 OUTPUT 19313 select hex(s1), s1 from t1 19314 END 19315 INPUT 19316 select f1 from t1 where f1 between CAST("2006-1-1" as date) and CAST(20060101 as date); 19317 END 19318 OUTPUT 19319 select f1 from t1 where f1 between convert('2006-1-1', date) and convert(20060101, date) 19320 END 19321 INPUT 19322 select character_maximum_length, character_octet_length from information_schema.columns where table_name='t1'; 19323 END 19324 OUTPUT 19325 select character_maximum_length, character_octet_length from information_schema.`columns` where table_name = 't1' 19326 END 19327 INPUT 19328 select soundex(_utf8mb4 0xD091D092D093); 19329 END 19330 OUTPUT 19331 select soundex(_utf8mb4 0xD091D092D093) from dual 19332 END 19333 INPUT 19334 select hex(convert(_gbk 0xA14041 using ucs2)); 19335 END 19336 OUTPUT 19337 select hex(convert(_gbk 0xA14041 using ucs2)) from dual 19338 END 19339 INPUT 19340 select rpad(i, 7, ' ') as t from t1; 19341 END 19342 OUTPUT 19343 select rpad(i, 7, ' ') as t from t1 19344 END 19345 INPUT 19346 select from t1 where not(a <= 10); 19347 END 19348 ERROR 19349 syntax error at position 12 near 'from' 19350 END 19351 INPUT 19352 select LAST_DAY('2007-12-06 08:59:19.05') - INTERVAL 1 SECOND; 19353 END 19354 OUTPUT 19355 select LAST_DAY('2007-12-06 08:59:19.05') - interval 1 SECOND from dual 19356 END 19357 INPUT 19358 select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t2.a=t3.a); 19359 END 19360 OUTPUT 19361 select t1.*, t2.*, t3.a from t1 left join t2 on t3.a = t2.a left join t1 as t3 on t2.a = t3.a 19362 END 19363 INPUT 19364 select from t1 order by text1; 19365 END 19366 ERROR 19367 syntax error at position 12 near 'from' 19368 END 19369 INPUT 19370 select a as bin2 from t1 where a like 'あいうえおかきくけこさしすせそ'; 19371 END 19372 OUTPUT 19373 select a as bin2 from t1 where a like 'あいうえおかきくけこさしすせそ' 19374 END 19375 INPUT 19376 select ST_Crosses(ST_GeomFromText('MULTIPOINT(0 0,3 3)'),ST_GeomFromText('LINESTRING(1 1,10 10)')) as result; 19377 END 19378 OUTPUT 19379 select ST_Crosses(ST_GeomFromText('MULTIPOINT(0 0,3 3)'), ST_GeomFromText('LINESTRING(1 1,10 10)')) as result from dual 19380 END 19381 INPUT 19382 select 7; 19383 END 19384 OUTPUT 19385 select 7 from dual 19386 END 19387 INPUT 19388 select from information_schema.table_names; 19389 END 19390 ERROR 19391 syntax error at position 12 near 'from' 19392 END 19393 INPUT 19394 select from information_schema.COLLATIONS where COLLATION_NAME like 'latin1%' order by collation_name; 19395 END 19396 ERROR 19397 syntax error at position 12 near 'from' 19398 END 19399 INPUT 19400 select 'a ' = 'a ', 'a ' < 'a ', 'a ' > 'a '; 19401 END 19402 OUTPUT 19403 select 'a ' = 'a\t', 'a ' < 'a\t', 'a ' > 'a\t' from dual 19404 END 19405 INPUT 19406 select from t1 where b=1; 19407 END 19408 ERROR 19409 syntax error at position 12 near 'from' 19410 END 19411 INPUT 19412 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_vietnamese_ci; 19413 END 19414 OUTPUT 19415 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_vietnamese_ci 19416 END 19417 INPUT 19418 select 'A' like 'a' collate ujis_bin; 19419 END 19420 OUTPUT 19421 select 'A' like 'a' collate ujis_bin from dual 19422 END 19423 INPUT 19424 select t1.a, (case t1.a when 0 then 0 else t1.b end) d from t1 join t2 on t1.a=t2.c order by d; 19425 END 19426 OUTPUT 19427 select t1.a, case t1.a when 0 then 0 else t1.b end as d from t1 join t2 on t1.a = t2.c order by d asc 19428 END 19429 INPUT 19430 select t1.*,t2.* from t1 left join t2 on (t1.b=t2.b) where collation(t2.a) = _utf8'binary' order by t1.a,t2.a; 19431 END 19432 OUTPUT 19433 select t1.*, t2.* from t1 left join t2 on t1.b = t2.b where collation(t2.a) = _utf8 'binary' order by t1.a asc, t2.a asc 19434 END 19435 INPUT 19436 select from t1 where i = 2; 19437 END 19438 ERROR 19439 syntax error at position 12 near 'from' 19440 END 19441 INPUT 19442 select count(*) from t1 group by branch having branch<>'mumbai' order by id desc,branch desc limit 100; 19443 END 19444 OUTPUT 19445 select count(*) from t1 group by branch having branch != 'mumbai' order by id desc, branch desc limit 100 19446 END 19447 INPUT 19448 select (select d from t2 where d > a) as 'x', t1.* as 'with_alias' from t1; 19449 END 19450 ERROR 19451 syntax error at position 54 near 'as' 19452 END 19453 INPUT 19454 select count(*) from t1 where a = 1; 19455 END 19456 OUTPUT 19457 select count(*) from t1 where a = 1 19458 END 19459 INPUT 19460 select collation(oct(130)), coercibility(oct(130)); 19461 END 19462 OUTPUT 19463 select collation(oct(130)), coercibility(oct(130)) from dual 19464 END 19465 INPUT 19466 select substring('hello', 4294967297, 1); 19467 END 19468 OUTPUT 19469 select substr('hello', 4294967297, 1) from dual 19470 END 19471 INPUT 19472 select ST_Intersects(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))')); 19473 END 19474 OUTPUT 19475 select ST_Intersects(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('POLYGON((50 5, 55 10, 0 45, 50 5))')) from dual 19476 END 19477 INPUT 19478 select crc32("123"); 19479 END 19480 OUTPUT 19481 select crc32('123') from dual 19482 END 19483 INPUT 19484 select date_sub("1998-01-01 00:00:00",INTERVAL 1 YEAR); 19485 END 19486 OUTPUT 19487 select date_sub('1998-01-01 00:00:00', interval 1 YEAR) from dual 19488 END 19489 INPUT 19490 select substr(z.a,-1), z.a from t1 as y join t1 as z on y.a=z.a order by 1; 19491 END 19492 OUTPUT 19493 select substr(z.a, -1), z.a from t1 as y join t1 as z on y.a = z.a order by 1 asc 19494 END 19495 INPUT 19496 select timestampdiff(SQL_TSI_DAY, '1986-02-01', '1986-03-01') as a1, timestampdiff(SQL_TSI_DAY, '1900-02-01', '1900-03-01') as a2, timestampdiff(SQL_TSI_DAY, '1996-02-01', '1996-03-01') as a3, timestampdiff(SQL_TSI_DAY, '2000-02-01', '2000-03-01') as a4; 19497 END 19498 OUTPUT 19499 select timestampdiff(SQL_TSI_DAY, '1986-02-01', '1986-03-01') as a1, timestampdiff(SQL_TSI_DAY, '1900-02-01', '1900-03-01') as a2, timestampdiff(SQL_TSI_DAY, '1996-02-01', '1996-03-01') as a3, timestampdiff(SQL_TSI_DAY, '2000-02-01', '2000-03-01') as a4 from dual 19500 END 19501 INPUT 19502 select from information_schema.COLLATION_CHARACTER_SET_APPLICABILITY where COLLATION_NAME like 'latin1%' ORDER BY COLLATION_NAME; 19503 END 19504 ERROR 19505 syntax error at position 12 near 'from' 19506 END 19507 INPUT 19508 select find_in_set('1','3,1,'); 19509 END 19510 OUTPUT 19511 select find_in_set('1', '3,1,') from dual 19512 END 19513 INPUT 19514 select lpad('abc', cast(5 as unsigned integer), 'x'); 19515 END 19516 OUTPUT 19517 select lpad('abc', convert(5, unsigned), 'x') from dual 19518 END 19519 INPUT 19520 select date_add("1997-12-31 23:59:59",INTERVAL " -10000 99:99" DAY_MINUTE); 19521 END 19522 OUTPUT 19523 select date_add('1997-12-31 23:59:59', interval ' -10000 99:99' DAY_MINUTE) from dual 19524 END 19525 INPUT 19526 select insert('hello', 1, 18446744073709551617, 'hi'); 19527 END 19528 ERROR 19529 syntax error at position 14 near 'insert' 19530 END 19531 INPUT 19532 select format(d, 2) from t1; 19533 END 19534 OUTPUT 19535 select format(d, 2) from t1 19536 END 19537 INPUT 19538 select t2.* from t2; 19539 END 19540 OUTPUT 19541 select t2.* from t2 19542 END 19543 INPUT 19544 select 123456789012345678901234567890.123456789012345678901234567890 div 1 as x; 19545 END 19546 OUTPUT 19547 select 123456789012345678901234567890.123456789012345678901234567890 div 1 as x from dual 19548 END 19549 INPUT 19550 select 1 /*!999999 +1 */; 19551 END 19552 OUTPUT 19553 select 1 from dual 19554 END 19555 INPUT 19556 select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a'); 19557 END 19558 OUTPUT 19559 select distinct a1, a2, b from t1 where a2 >= 'b' and b = 'a' 19560 END 19561 INPUT 19562 select concat(a,if(b<10,_ucs2 0x0062,_ucs2 0x00C0)) from t1; 19563 END 19564 OUTPUT 19565 select concat(a, if(b < 10, _ucs2 0x0062, _ucs2 0x00C0)) from t1 19566 END 19567 INPUT 19568 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_german2_ci; 19569 END 19570 OUTPUT 19571 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_german2_ci 19572 END 19573 INPUT 19574 select cast(-19999999999999999999 as signed); 19575 END 19576 OUTPUT 19577 select convert(-19999999999999999999, signed) from dual 19578 END 19579 INPUT 19580 select t2.fld3,companynr from t2 where companynr = 57+1 order by fld3; 19581 END 19582 OUTPUT 19583 select t2.fld3, companynr from t2 where companynr = 57 + 1 order by fld3 asc 19584 END 19585 INPUT 19586 select from general_log where argument like '%general_log%'; 19587 END 19588 ERROR 19589 syntax error at position 12 near 'from' 19590 END 19591 INPUT 19592 select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser10' and host='localhost'; 19593 END 19594 OUTPUT 19595 select db, routine_name, routine_type, proc_priv from mysql.procs_priv where `user` = 'mysqluser10' and host = 'localhost' 19596 END 19597 INPUT 19598 select ST_astext(ST_symdifference(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 1 1, 0 2, 0 0))'))); 19599 END 19600 OUTPUT 19601 select ST_astext(ST_symdifference(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 1 1, 0 2, 0 0))'))) from dual 19602 END 19603 INPUT 19604 select ifnull(group_concat(concat(t1.id, ':', t1.name)), 'shortname') as 'without distinct: how it should be' from t1; 19605 END 19606 OUTPUT 19607 select ifnull(group_concat(concat(t1.id, ':', t1.`name`)), 'shortname') as `without distinct: how it should be` from t1 19608 END 19609 INPUT 19610 select t1.a,t3.y from t1,(select a as y from t2 where b='c') as t3 where t1.a = t3.y; 19611 END 19612 OUTPUT 19613 select t1.a, t3.y from t1, (select a as y from t2 where b = 'c') as t3 where t1.a = t3.y 19614 END 19615 INPUT 19616 select 'Contains'; 19617 END 19618 OUTPUT 19619 select 'Contains' from dual 19620 END 19621 INPUT 19622 select t.table_name, group_concat(t.table_schema, '.', t.table_name), count(*) as num1 from information_schema.tables t inner join information_schema.columns c1 on t.table_schema = c1.table_schema AND t.table_name = c1.table_name where t.table_name not like 'ndb%' and t.table_schema = 'information_schema' and c1.ordinal_position = (select isnull(c2.column_type) - isnull(group_concat(c2.table_schema, '.', c2.table_name)) + count(*) as num from information_schema.columns c2 where c2.table_schema='information_schema' and (c2.column_type = 'varchar(7)' or c2.column_type = 'varchar(20)') group by c2.column_type order by num limit 1) and t.table_name not like 'INNODB_%' group by t.table_name order by num1, t.table_name COLLATE utf8_general_ci; 19623 END 19624 OUTPUT 19625 select t.table_name, group_concat(t.table_schema, '.', t.table_name), count(*) as num1 from information_schema.`tables` as t join information_schema.`columns` as c1 on t.table_schema = c1.table_schema and t.table_name = c1.table_name where t.table_name not like 'ndb%' and t.table_schema = 'information_schema' and c1.ordinal_position = (select isnull(c2.column_type) - isnull(group_concat(c2.table_schema, '.', c2.table_name)) + count(*) as num from information_schema.`columns` as c2 where c2.table_schema = 'information_schema' and (c2.column_type = 'varchar(7)' or c2.column_type = 'varchar(20)') group by c2.column_type order by num asc limit 1) and t.table_name not like 'INNODB_%' group by t.table_name order by num1 asc, t.table_name collate utf8_general_ci asc 19626 END 19627 INPUT 19628 select a1,a2,b, max(c) from t2 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b; 19629 END 19630 OUTPUT 19631 select a1, a2, b, max(c) from t2 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and a2 > 'a' group by a1, a2, b 19632 END 19633 INPUT 19634 select space(-18446744073709551616); 19635 END 19636 OUTPUT 19637 select space(-18446744073709551616) from dual 19638 END 19639 INPUT 19640 select 'a ' = 'a' , 'a ' < 'a' , 'a ' > 'a'; 19641 END 19642 OUTPUT 19643 select 'a\t' = 'a', 'a\t' < 'a', 'a\t' > 'a' from dual 19644 END 19645 INPUT 19646 select greatest(1,_utf16'.',_utf8''); 19647 END 19648 OUTPUT 19649 select greatest(1, _utf16 '.', _utf8 '') from dual 19650 END 19651 INPUT 19652 select round(1e1,308), truncate(1e1, 308); 19653 END 19654 OUTPUT 19655 select round(1e1, 308), truncate(1e1, 308) from dual 19656 END 19657 INPUT 19658 select @a != @b; 19659 END 19660 OUTPUT 19661 select @a != @b from dual 19662 END 19663 INPUT 19664 select last_day("1997-12-1")+0.0; 19665 END 19666 OUTPUT 19667 select last_day('1997-12-1') + 0.0 from dual 19668 END 19669 INPUT 19670 select ST_AsText(ST_GeometryFromWKB(ST_AsWKB(GeometryCollection(POINT(0, 0), MULTIPOINT(point(0, 0), point(1, 1)), LINESTRING(point(0, 0),point(10, 10)), MULTILINESTRING(LINESTRING(point(1, 2), point(1, 3))), POLYGON(LineString(Point(10, 20), Point(1, 1), Point(2, 2), Point(10, 20))), MULTIPOLYGON(Polygon(LineString(Point(0, 0), Point(1, 0), Point(1, 1), Point(0, 0)))))))) as Result; 19671 END 19672 OUTPUT 19673 select ST_AsText(ST_GeometryFromWKB(ST_AsWKB(GeometryCollection(POINT(0, 0), MULTIPOINT(point(0, 0), point(1, 1)), LINESTRING(point(0, 0), point(10, 10)), MULTILINESTRING(LINESTRING(point(1, 2), point(1, 3))), POLYGON(LineString(Point(10, 20), Point(1, 1), Point(2, 2), Point(10, 20))), MULTIPOLYGON(Polygon(LineString(Point(0, 0), Point(1, 0), Point(1, 1), Point(0, 0)))))))) as Result from dual 19674 END 19675 INPUT 19676 select bar from t1 having group_concat(bar)=''; 19677 END 19678 OUTPUT 19679 select bar from t1 having group_concat(bar) = '' 19680 END 19681 INPUT 19682 select sql_big_result t2.id, avg(rating+0.0e0) from t2 group by t2.id; 19683 END 19684 ERROR 19685 syntax error at position 26 19686 END 19687 INPUT 19688 select cast(NULL as signed); 19689 END 19690 OUTPUT 19691 select convert(null, signed) from dual 19692 END 19693 INPUT 19694 select collation(a) from t1; 19695 END 19696 OUTPUT 19697 select collation(a) from t1 19698 END 19699 INPUT 19700 select "1998-01-01 00:00:00" - INTERVAL 1 SECOND; 19701 END 19702 OUTPUT 19703 select '1998-01-01 00:00:00' - interval 1 SECOND from dual 19704 END 19705 INPUT 19706 select sql_big_result distinct t1.a from t1,t2 order by t2.a; 19707 END 19708 ERROR 19709 syntax error at position 31 near 'distinct' 19710 END 19711 INPUT 19712 select reverse('abc'),reverse('abcd'); 19713 END 19714 OUTPUT 19715 select reverse('abc'), reverse('abcd') from dual 19716 END 19717 INPUT 19718 select datediff("1997-11-31 23:59:59.000001","1997-12-31"); 19719 END 19720 OUTPUT 19721 select datediff('1997-11-31 23:59:59.000001', '1997-12-31') from dual 19722 END 19723 INPUT 19724 select col1 as count_col1 from t1 as tmp1 group by col1 having count_col1 = 10; 19725 END 19726 OUTPUT 19727 select col1 as count_col1 from t1 as tmp1 group by col1 having count_col1 = 10 19728 END 19729 INPUT 19730 select count(distinct s,n1,vs) from t1; 19731 END 19732 OUTPUT 19733 select count(distinct s, n1, vs) from t1 19734 END 19735 INPUT 19736 select straight_join from t2 right join t1 on t2.a=t1.a; 19737 END 19738 ERROR 19739 syntax error at position 26 near 'from' 19740 END 19741 INPUT 19742 select 0x0000000001020003F03F40408484040ADDE40 like 0x256F3B38312A7725; 19743 END 19744 OUTPUT 19745 select 0x0000000001020003F03F40408484040ADDE40 like 0x256F3B38312A7725 from dual 19746 END 19747 INPUT 19748 select from performance_schema.global_variables where variable_name like 'event_scheduler'; 19749 END 19750 ERROR 19751 syntax error at position 12 near 'from' 19752 END 19753 INPUT 19754 select hex(s1) from t1 where s1 = 0xfffd; 19755 END 19756 OUTPUT 19757 select hex(s1) from t1 where s1 = 0xfffd 19758 END 19759 INPUT 19760 select from `information_schema`.`STATISTICS` where `TABLE_NAME` = NULL; 19761 END 19762 ERROR 19763 syntax error at position 12 near 'from' 19764 END 19765 INPUT 19766 select t1.i,t2.i,t3.i from t2 natural right join t3,t1 order by t1.i,t2.i,t3.i; 19767 END 19768 OUTPUT 19769 select t1.i, t2.i, t3.i from t2 natural right join t3, t1 order by t1.i asc, t2.i asc, t3.i asc 19770 END 19771 INPUT 19772 select max(a4) from t1; 19773 END 19774 OUTPUT 19775 select max(a4) from t1 19776 END 19777 INPUT 19778 select truncate(1.5, -2147483649), truncate(1.5, 2147483648); 19779 END 19780 OUTPUT 19781 select truncate(1.5, -2147483649), truncate(1.5, 2147483648) from dual 19782 END 19783 INPUT 19784 select from t1 where not(NULL and a); 19785 END 19786 ERROR 19787 syntax error at position 12 near 'from' 19788 END 19789 INPUT 19790 select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c'); 19791 END 19792 OUTPUT 19793 select distinct a1, a2, b from t1 where a1 > 'a' and a2 > 'a' and b = 'c' 19794 END 19795 INPUT 19796 select repeat('a', cast(2 as unsigned int)); 19797 END 19798 ERROR 19799 syntax error at position 42 near 'int' 19800 END 19801 INPUT 19802 select locate('he','hello',2); 19803 END 19804 OUTPUT 19805 select locate('he', 'hello', 2) from dual 19806 END 19807 INPUT 19808 select from `information_schema`.`TRIGGERS` where `EVENT_OBJECT_TABLE` = NULL; 19809 END 19810 ERROR 19811 syntax error at position 12 near 'from' 19812 END 19813 INPUT 19814 select ST_Overlaps(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), ST_GeomFromText('POLYGON((10 10, 10 4, 4 4, 4 10, 10 10))')); 19815 END 19816 OUTPUT 19817 select ST_Overlaps(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), ST_GeomFromText('POLYGON((10 10, 10 4, 4 4, 4 10, 10 10))')) from dual 19818 END 19819 INPUT 19820 select spid,count(*) from t1 where spid between 1 and 2 group by spid order by spid desc; 19821 END 19822 OUTPUT 19823 select spid, count(*) from t1 where spid between 1 and 2 group by spid order by spid desc 19824 END 19825 INPUT 19826 select right('hello', 0); 19827 END 19828 OUTPUT 19829 select right('hello', 0) from dual 19830 END 19831 INPUT 19832 select space(-18446744073709551615); 19833 END 19834 OUTPUT 19835 select space(-18446744073709551615) from dual 19836 END 19837 INPUT 19838 select b.id, b.betreff from t3 b group by b.id+1 order by match(betreff) against ('+abc' in boolean mode) desc; 19839 END 19840 OUTPUT 19841 select b.id, b.betreff from t3 as b group by b.id + 1 order by match(betreff) against ('+abc' in boolean mode) desc 19842 END 19843 INPUT 19844 select space(18446744073709551617); 19845 END 19846 OUTPUT 19847 select space(18446744073709551617) from dual 19848 END 19849 INPUT 19850 select get_format(DATE, 'USA') as a; 19851 END 19852 OUTPUT 19853 select get_format(`DATE`, 'USA') as a from dual 19854 END 19855 INPUT 19856 select substring_index('aaaaaaaaa1','aaa',-2); 19857 END 19858 OUTPUT 19859 select substring_index('aaaaaaaaa1', 'aaa', -2) from dual 19860 END 19861 INPUT 19862 select p from t2; 19863 END 19864 OUTPUT 19865 select p from t2 19866 END 19867 INPUT 19868 select X.a from t1 AS X group by X.b having (x.a = 1); 19869 END 19870 OUTPUT 19871 select X.a from t1 as X group by X.b having x.a = 1 19872 END 19873 INPUT 19874 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name like 't%' and index_name = 'k' order by table_name; 19875 END 19876 OUTPUT 19877 select table_name, index_type from information_schema.statistics where table_schema = 'test' and table_name like 't%' and index_name = 'k' order by table_name asc 19878 END 19879 INPUT 19880 select from t1 order by a; 19881 END 19882 ERROR 19883 syntax error at position 12 near 'from' 19884 END 19885 INPUT 19886 select from t1 where a like "ABC%"; 19887 END 19888 ERROR 19889 syntax error at position 12 near 'from' 19890 END 19891 INPUT 19892 select from t2_base; 19893 END 19894 ERROR 19895 syntax error at position 12 near 'from' 19896 END 19897 INPUT 19898 select f1 from t1 where f2 <> '0000-00-00 00:00:00' order by f1; 19899 END 19900 OUTPUT 19901 select f1 from t1 where f2 != '0000-00-00 00:00:00' order by f1 asc 19902 END 19903 INPUT 19904 select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10')<time('00:00:00'); 19905 END 19906 OUTPUT 19907 select timediff('2008-09-29 20:10:10', '2008-09-30 20:10:10') < time('00:00:00') from dual 19908 END 19909 INPUT 19910 select from mysql.general_log; 19911 END 19912 ERROR 19913 syntax error at position 12 near 'from' 19914 END 19915 INPUT 19916 select repeat('hello', -1); 19917 END 19918 OUTPUT 19919 select repeat('hello', -1) from dual 19920 END 19921 INPUT 19922 select rpad('hello', 4294967297, '1'); 19923 END 19924 OUTPUT 19925 select rpad('hello', 4294967297, '1') from dual 19926 END 19927 INPUT 19928 select f2 from t1 where f2 between cast("12:1:2" as time) and cast("12:2:2" as time); 19929 END 19930 OUTPUT 19931 select f2 from t1 where f2 between convert('12:1:2', time) and convert('12:2:2', time) 19932 END 19933 INPUT 19934 select extract(DAY_HOUR FROM "1999-01-02 10:11:12"); 19935 END 19936 OUTPUT 19937 select extract(day_hour from '1999-01-02 10:11:12') from dual 19938 END 19939 INPUT 19940 select from t1 where MATCH a,b AGAINST ('+(+(support collections)) +foobar*' IN BOOLEAN MODE); 19941 END 19942 ERROR 19943 syntax error at position 12 near 'from' 19944 END 19945 INPUT 19946 select a1,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1; 19947 END 19948 OUTPUT 19949 select a1, max(c), min(c) from t2 where a2 = 'a' and b = 'b' group by a1 19950 END 19951 INPUT 19952 select fld3 FROM t2 order by fld3 desc limit 5; 19953 END 19954 OUTPUT 19955 select fld3 from t2 order by fld3 desc limit 5 19956 END 19957 INPUT 19958 select 2 between 1 and 3, "monty" between "max" and "my",2=2 and "monty" between "max" and "my" and 3=3; 19959 END 19960 OUTPUT 19961 select 2 between 1 and 3, 'monty' between 'max' and 'my', 2 = 2 and 'monty' between 'max' and 'my' and 3 = 3 from dual 19962 END 19963 INPUT 19964 select f1 from t1 having max(f1)=f1; 19965 END 19966 OUTPUT 19967 select f1 from t1 having max(f1) = f1 19968 END 19969 INPUT 19970 select concat((select x from (select 'a' as x) as t1 ), (select y from (select 'b' as y) as t2 )) from (select 1 union select 2 ) as t3; 19971 END 19972 OUTPUT 19973 select concat((select x from (select 'a' as x from dual) as t1), (select y from (select 'b' as y from dual) as t2)) from (select 1 from dual union select 2 from dual) as t3 19974 END 19975 INPUT 19976 select max(a3) from t1 where a2 is null and a2 = 2; 19977 END 19978 OUTPUT 19979 select max(a3) from t1 where a2 is null and a2 = 2 19980 END 19981 INPUT 19982 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_turkish_ci; 19983 END 19984 OUTPUT 19985 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_turkish_ci 19986 END 19987 INPUT 19988 select insert(_utf32 0x000000610000006200000063,10,2,_utf32 0x000000640000006500000066); 19989 END 19990 ERROR 19991 syntax error at position 14 near 'insert' 19992 END 19993 INPUT 19994 select a,sec_to_time(sum(time_to_sec(t))) from t1 group by a,b; 19995 END 19996 OUTPUT 19997 select a, sec_to_time(sum(time_to_sec(t))) from t1 group by a, b 19998 END 19999 INPUT 20000 select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b), bit_xor(b) from t1 group by a; 20001 END 20002 OUTPUT 20003 select `SQL_BIG_RESULT` as a, count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b), bit_xor(b) from t1 group by a 20004 END 20005 INPUT 20006 select from (t2 join t4 on b + 1 = y) join t1 on t1.c = t4.c; 20007 END 20008 ERROR 20009 syntax error at position 12 near 'from' 20010 END 20011 INPUT 20012 select concat('|',a,'|'), concat('|',b,'|') from t1; 20013 END 20014 OUTPUT 20015 select concat('|', a, '|'), concat('|', b, '|') from t1 20016 END 20017 INPUT 20018 select cast(NULL as BINARY); 20019 END 20020 OUTPUT 20021 select convert(null, BINARY) from dual 20022 END 20023 INPUT 20024 select from v_bug25347; 20025 END 20026 ERROR 20027 syntax error at position 12 near 'from' 20028 END 20029 INPUT 20030 select round(999999999999999999.0, -18); 20031 END 20032 OUTPUT 20033 select round(999999999999999999.0, -18) from dual 20034 END 20035 INPUT 20036 select insert(c1,1,2,'�'),insert('�',1,2,c1) from t1; 20037 END 20038 ERROR 20039 syntax error at position 14 near 'insert' 20040 END 20041 INPUT 20042 select substring_index('the king of the the null',null,3); 20043 END 20044 OUTPUT 20045 select substring_index('the king of the the null', null, 3) from dual 20046 END 20047 INPUT 20048 select t1.col1, t2.col1 from t1, t2 where t1.col1 = t2.col1 group by t1.col1, t2.col1 having col1 = 2; 20049 END 20050 OUTPUT 20051 select t1.col1, t2.col1 from t1, t2 where t1.col1 = t2.col1 group by t1.col1, t2.col1 having col1 = 2 20052 END 20053 INPUT 20054 select name from t2 where name between '�' and '�'; 20055 END 20056 OUTPUT 20057 select `name` from t2 where `name` between '�' and '�' 20058 END 20059 INPUT 20060 select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser1' and host='localhost'; 20061 END 20062 OUTPUT 20063 select db, routine_name, routine_type, proc_priv from mysql.procs_priv where `user` = 'mysqluser1' and host = 'localhost' 20064 END 20065 INPUT 20066 select 'васяz' rlike '[[:<:]]вася[[:>:]]'; 20067 END 20068 OUTPUT 20069 select 'васяz' regexp '[[:<:]]вася[[:>:]]' from dual 20070 END 20071 INPUT 20072 select id, sum(qty) as sqty from t1 group by id having sqty>2; 20073 END 20074 OUTPUT 20075 select id, sum(qty) as sqty from t1 group by id having sqty > 2 20076 END 20077 INPUT 20078 select ST_astext(ST_Intersection(ST_GeomFromText('LINESTRING(0 0, 50 45, 40 50)'), ST_GeomFromText('LINESTRING(50 5, 55 10, 0 45)'))); 20079 END 20080 OUTPUT 20081 select ST_astext(ST_Intersection(ST_GeomFromText('LINESTRING(0 0, 50 45, 40 50)'), ST_GeomFromText('LINESTRING(50 5, 55 10, 0 45)'))) from dual 20082 END 20083 INPUT 20084 select distinct ifnull(group_concat(concat(t1.id, ':', t1.name)), 'shortname') as 'with distinct: cutoff at length of shortname' from t1; 20085 END 20086 OUTPUT 20087 select distinct ifnull(group_concat(concat(t1.id, ':', t1.`name`)), 'shortname') as `with distinct: cutoff at length of shortname` from t1 20088 END 20089 INPUT 20090 select charset(version()); 20091 END 20092 OUTPUT 20093 select charset(version()) from dual 20094 END 20095 INPUT 20096 select from t1 where xxx regexp('is a test of some long text to s'); 20097 END 20098 ERROR 20099 syntax error at position 12 near 'from' 20100 END 20101 INPUT 20102 select char(53647 using utf8mb4); 20103 END 20104 ERROR 20105 syntax error at position 24 near 'using' 20106 END 20107 INPUT 20108 select right('hello', -18446744073709551617); 20109 END 20110 OUTPUT 20111 select right('hello', -18446744073709551617) from dual 20112 END 20113 INPUT 20114 select rpad('hello', -4294967297, '1'); 20115 END 20116 OUTPUT 20117 select rpad('hello', -4294967297, '1') from dual 20118 END 20119 INPUT 20120 select t2.* from (select from t1) as A inner join t2 on A.ID = t2.FID; 20121 END 20122 ERROR 20123 syntax error at position 30 near 'from' 20124 END 20125 INPUT 20126 select col1 as count_col1,col2 from t1 as tmp1 group by col1,col2 having col1 = 10; 20127 END 20128 OUTPUT 20129 select col1 as count_col1, col2 from t1 as tmp1 group by col1, col2 having col1 = 10 20130 END 20131 INPUT 20132 select col_t1, sum(col1) from t1 group by col_t1 having col_t1 > 10 and exists (select sum(t2.col1) from t2 group by t2.col2 having t2.col2 > 'b'); 20133 END 20134 OUTPUT 20135 select col_t1, sum(col1) from t1 group by col_t1 having col_t1 > 10 and exists (select sum(t2.col1) from t2 group by t2.col2 having t2.col2 > 'b') 20136 END 20137 INPUT 20138 select from t1,t2 natural left join t3 order by t1.i,t2.i,t3.i; 20139 END 20140 ERROR 20141 syntax error at position 12 near 'from' 20142 END 20143 INPUT 20144 select from (t1 natural join t2) join (t3 natural join t4) on t1.b = t3.b; 20145 END 20146 ERROR 20147 syntax error at position 12 near 'from' 20148 END 20149 INPUT 20150 select group_concat(t1.b,t2.c) from t1 inner join t2 using(a) group by a; 20151 END 20152 OUTPUT 20153 select group_concat(t1.b, t2.c) from t1 join t2 using (a) group by a 20154 END 20155 INPUT 20156 select T1.a from MYSQLTEST.T1; 20157 END 20158 OUTPUT 20159 select T1.a from MYSQLTEST.T1 20160 END 20161 INPUT 20162 select uncompress(a) from t1; 20163 END 20164 OUTPUT 20165 select uncompress(a) from t1 20166 END 20167 INPUT 20168 select from t1 where word between CAST(0xDF AS CHAR) and CAST(0xDF AS CHAR); 20169 END 20170 ERROR 20171 syntax error at position 12 near 'from' 20172 END 20173 INPUT 20174 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_unicode_ci; 20175 END 20176 OUTPUT 20177 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_unicode_ci 20178 END 20179 INPUT 20180 select -(-(9223372036854775808)); 20181 END 20182 OUTPUT 20183 select - -9223372036854775808 from dual 20184 END 20185 INPUT 20186 select format(col2,7) from t1; 20187 END 20188 OUTPUT 20189 select format(col2, 7) from t1 20190 END 20191 INPUT 20192 select max(t1.connection) into connection from t1; 20193 END 20194 ERROR 20195 syntax error at position 42 near 'connection' 20196 END 20197 INPUT 20198 select hex(_utf32 X'44'); 20199 END 20200 OUTPUT 20201 select hex(_utf32 X'44') from dual 20202 END 20203 INPUT 20204 select a from t1 where a in (1,3); 20205 END 20206 OUTPUT 20207 select a from t1 where a in (1, 3) 20208 END 20209 INPUT 20210 select 1ea10.1a20,1e+ 1e+10 from 1ea10; 20211 END 20212 ERROR 20213 syntax error at position 10 near '1e' 20214 END 20215 INPUT 20216 select date_add("1997-12-31 23:59:59",INTERVAL 1 DAY); 20217 END 20218 OUTPUT 20219 select date_add('1997-12-31 23:59:59', interval 1 DAY) from dual 20220 END 20221 INPUT 20222 select host,db,user,table_name,column_name from mysql.columns_priv where user = 'mysqltest_1' order by host,db,user,table_name,column_name; 20223 END 20224 OUTPUT 20225 select host, db, `user`, table_name, column_name from mysql.columns_priv where `user` = 'mysqltest_1' order by host asc, db asc, `user` asc, table_name asc, column_name asc 20226 END 20227 INPUT 20228 select week("2000-01-06",1) as '2000', week("2001-01-06",1) as '2001', week("2002-01-06",1) as '2002',week("2003-01-06",1) as '2003', week("2004-01-06",1) as '2004', week("2005-01-06",1) as '2005', week("2006-01-06",1) as '2006'; 20229 END 20230 OUTPUT 20231 select week('2000-01-06', 1) as `2000`, week('2001-01-06', 1) as `2001`, week('2002-01-06', 1) as `2002`, week('2003-01-06', 1) as `2003`, week('2004-01-06', 1) as `2004`, week('2005-01-06', 1) as `2005`, week('2006-01-06', 1) as `2006` from dual 20232 END 20233 INPUT 20234 select week(20000106,0) as '0', week(20000106,1) as '1', week(20000106,2) as '2', week(20000106,3) as '3', week(20000106,4) as '4', week(20000106,5) as '5', week(20000106,6) as '6', week(20000106,7) as '7'; 20235 END 20236 OUTPUT 20237 select week(20000106, 0) as `0`, week(20000106, 1) as `1`, week(20000106, 2) as `2`, week(20000106, 3) as `3`, week(20000106, 4) as `4`, week(20000106, 5) as `5`, week(20000106, 6) as `6`, week(20000106, 7) as `7` from dual 20238 END 20239 INPUT 20240 select b from t1 having binary b like ''; 20241 END 20242 OUTPUT 20243 select b from t1 having binary b like '' 20244 END 20245 INPUT 20246 select from t5 natural join ((t1 natural join t2) cross join (t3 natural join t4)); 20247 END 20248 ERROR 20249 syntax error at position 12 near 'from' 20250 END 20251 INPUT 20252 select 1/*!2*/; 20253 END 20254 OUTPUT 20255 select 1 from dual 20256 END 20257 INPUT 20258 select a, t1.* as 'with_alias', b from t1; 20259 END 20260 ERROR 20261 syntax error at position 18 near 'as' 20262 END 20263 INPUT 20264 select char(0xd1,0x8f using utf8mb4); 20265 END 20266 ERROR 20267 syntax error at position 28 near 'using' 20268 END 20269 INPUT 20270 select quote(1/0), quote('Z'); 20271 END 20272 OUTPUT 20273 select quote(1 / 0), quote('Z') from dual 20274 END 20275 INPUT 20276 select left('hello', 4294967295); 20277 END 20278 OUTPUT 20279 select left('hello', 4294967295) from dual 20280 END 20281 INPUT 20282 select count(*) from t1 where v like 'a%'; 20283 END 20284 OUTPUT 20285 select count(*) from t1 where v like 'a%' 20286 END 20287 INPUT 20288 select from_unixtime(2147483648); 20289 END 20290 OUTPUT 20291 select from_unixtime(2147483648) from dual 20292 END 20293 INPUT 20294 select month("0000-00-00"),month(d),month(dt),month(t),month(c) from t1; 20295 END 20296 OUTPUT 20297 select month('0000-00-00'), month(d), month(dt), month(t), month(c) from t1 20298 END 20299 INPUT 20300 select substring(f1,4,1), substring(f1,-4,1) from t2; 20301 END 20302 OUTPUT 20303 select substr(f1, 4, 1), substr(f1, -4, 1) from t2 20304 END 20305 INPUT 20306 select FROM t1; 20307 END 20308 ERROR 20309 syntax error at position 12 near 'FROM' 20310 END 20311 INPUT 20312 select case a when 1 then "one" when 2 then "two" else "nothing" end as fcase, count(*) from t1 group by fcase; 20313 END 20314 OUTPUT 20315 select case a when 1 then 'one' when 2 then 'two' else 'nothing' end as fcase, count(*) from t1 group by fcase 20316 END 20317 INPUT 20318 select distinct t from t1; 20319 END 20320 OUTPUT 20321 select distinct t from t1 20322 END 20323 INPUT 20324 select col1 as count_col1 from t1 as tmp1 group by count_col1 having count_col1 = 10; 20325 END 20326 OUTPUT 20327 select col1 as count_col1 from t1 as tmp1 group by count_col1 having count_col1 = 10 20328 END 20329 INPUT 20330 select s.*, '*', m.*, (s.match_1_h - m.home) UUX from (t2 s left join t1 m on m.match_id = 1) order by UUX desc; 20331 END 20332 OUTPUT 20333 select s.*, '*', m.*, s.match_1_h - m.home as UUX from (t2 as s left join t1 as m on m.match_id = 1) order by UUX desc 20334 END 20335 INPUT 20336 select collation(concat(_latin2'a',_latin2'b')), coercibility(concat(_latin2'a',_latin2'b')); 20337 END 20338 OUTPUT 20339 select collation(concat(_latin2 'a', _latin2 'b')), coercibility(concat(_latin2 'a', _latin2 'b')) from dual 20340 END 20341 INPUT 20342 select grp,group_concat(a,c) from t1 group by grp; 20343 END 20344 OUTPUT 20345 select grp, group_concat(a, c) from t1 group by grp 20346 END 20347 INPUT 20348 select date_add("1997-12-31 23:59:59",INTERVAL "-100 1" YEAR_MONTH); 20349 END 20350 OUTPUT 20351 select date_add('1997-12-31 23:59:59', interval '-100 1' YEAR_MONTH) from dual 20352 END 20353 INPUT 20354 select hex(weight_string('a' as char(0))); 20355 END 20356 ERROR 20357 syntax error at position 38 20358 END 20359 INPUT 20360 select cast(5 as unsigned) -6.0; 20361 END 20362 OUTPUT 20363 select convert(5, unsigned) - 6.0 from dual 20364 END 20365 INPUT 20366 select from t1 where a like "�%"; 20367 END 20368 ERROR 20369 syntax error at position 12 near 'from' 20370 END 20371 INPUT 20372 select sql_big_result t2.id, avg(rating) from t2 group by t2.id; 20373 END 20374 ERROR 20375 syntax error at position 26 20376 END 20377 INPUT 20378 select ST_Astext(ST_Envelope(ST_MPointFromWKB(ST_AsWKB(MultiPoint(Point('0', '-0'),Point('-0', '0'), Point('0', '0')))))) as result; 20379 END 20380 OUTPUT 20381 select ST_Astext(ST_Envelope(ST_MPointFromWKB(ST_AsWKB(MultiPoint(Point('0', '-0'), Point('-0', '0'), Point('0', '0')))))) as result from dual 20382 END 20383 INPUT 20384 select date_add("9999-12-31 23:59:59",INTERVAL 1 SECOND); 20385 END 20386 OUTPUT 20387 select date_add('9999-12-31 23:59:59', interval 1 SECOND) from dual 20388 END 20389 INPUT 20390 select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; 20391 END 20392 OUTPUT 20393 select distinct a1, a2, b from t1 where a2 >= 'b' and b = 'a' group by a1, a2, b 20394 END 20395 INPUT 20396 select hex(char(0x0102 using ucs2)); 20397 END 20398 ERROR 20399 syntax error at position 29 near 'using' 20400 END 20401 INPUT 20402 select f1 from t1 where makedate(2006,1) between date(f1) and date(f3); 20403 END 20404 OUTPUT 20405 select f1 from t1 where makedate(2006, 1) between date(f1) and date(f3) 20406 END 20407 INPUT 20408 select addtime("1997-12-31 23:59:59.999999", "1 1:1:1.000002"); 20409 END 20410 OUTPUT 20411 select addtime('1997-12-31 23:59:59.999999', '1 1:1:1.000002') from dual 20412 END 20413 INPUT 20414 select min(7) from DUAL; 20415 END 20416 OUTPUT 20417 select min(7) from dual 20418 END 20419 INPUT 20420 select from (t1 natural left join t2) natural left join (t3 natural left join t4); 20421 END 20422 ERROR 20423 syntax error at position 12 near 'from' 20424 END 20425 INPUT 20426 select count(distinct x.id_aams) from (select from (select t1.id_aams, t2.* from t1 left join t2 on t2.code_id='G0000000012' and t1.id_aams=t2.id_game where t1.id_aams=1715000360 order by t2.id desc ) as g group by g.id_aams having g.id is null ) as x; 20427 END 20428 ERROR 20429 syntax error at position 51 near 'from' 20430 END 20431 INPUT 20432 select from t1 natural join (t2 natural join (t3 natural join t4)); 20433 END 20434 ERROR 20435 syntax error at position 12 near 'from' 20436 END 20437 INPUT 20438 select c c2 from t1 where c='2'; 20439 END 20440 OUTPUT 20441 select c as c2 from t1 where c = '2' 20442 END 20443 INPUT 20444 select from t1 where not(a > 10); 20445 END 20446 ERROR 20447 syntax error at position 12 near 'from' 20448 END 20449 INPUT 20450 select from t1 where word like CAST(0xDF as CHAR); 20451 END 20452 ERROR 20453 syntax error at position 12 near 'from' 20454 END 20455 INPUT 20456 select from information_schema.schema_privileges where grantee like '%user%' and table_schema !='performance_schema' order by grantee; 20457 END 20458 ERROR 20459 syntax error at position 12 near 'from' 20460 END 20461 INPUT 20462 select from t1 where MATCH(a,b) AGAINST ("indexes" WITH QUERY EXPANSION); 20463 END 20464 ERROR 20465 syntax error at position 12 near 'from' 20466 END 20467 INPUT 20468 select timediff('2008-09-29 20:10:10','2008-09-30 20:10:10'),time('00:00:00'); 20469 END 20470 OUTPUT 20471 select timediff('2008-09-29 20:10:10', '2008-09-30 20:10:10'), time('00:00:00') from dual 20472 END 20473 INPUT 20474 select from information_schema.TABLE_PRIVILEGES where grantee like '%mysqltest_1%'; 20475 END 20476 ERROR 20477 syntax error at position 12 near 'from' 20478 END 20479 INPUT 20480 select max(a3) from t1 where a3 = 'MIN' and a2 = 2; 20481 END 20482 OUTPUT 20483 select max(a3) from t1 where a3 = 'MIN' and a2 = 2 20484 END 20485 INPUT 20486 select a from (select 1 as a) as b; 20487 END 20488 OUTPUT 20489 select a from (select 1 as a from dual) as b 20490 END 20491 INPUT 20492 select lpad(i, 7, ' ') as t from t1; 20493 END 20494 OUTPUT 20495 select lpad(i, 7, ' ') as t from t1 20496 END 20497 INPUT 20498 select distinct 1 from t1,t3 where t1.a=t3.a; 20499 END 20500 OUTPUT 20501 select distinct 1 from t1, t3 where t1.a = t3.a 20502 END 20503 INPUT 20504 select from t1 where a=b; 20505 END 20506 ERROR 20507 syntax error at position 12 near 'from' 20508 END 20509 INPUT 20510 select strcmp("a",NULL),(1<NULL)+0.0,NULL regexp "a",null like "a%","a%" like null; 20511 END 20512 OUTPUT 20513 select strcmp('a', null), (1 < null) + 0.0, null regexp 'a', null like 'a%', 'a%' like null from dual 20514 END 20515 INPUT 20516 select a,c,sum(a) from t1 where a > 10 group by a; 20517 END 20518 OUTPUT 20519 select a, c, sum(a) from t1 where a > 10 group by a 20520 END 20521 INPUT 20522 select ST_astext(g) from t1 where ST_Within(g, ST_GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))')); 20523 END 20524 OUTPUT 20525 select ST_astext(g) from t1 where ST_Within(g, ST_GeomFromText('POLYGON((5 1, 7 1, 7 7, 5 7, 3 3, 5 3, 5 1))')) 20526 END 20527 INPUT 20528 select table_name, is_updatable from information_schema.views where table_schema != 'sys' order by table_name; 20529 END 20530 OUTPUT 20531 select table_name, is_updatable from information_schema.views where table_schema != 'sys' order by table_name asc 20532 END 20533 INPUT 20534 select events.binlog from events; 20535 END 20536 OUTPUT 20537 select events.binlog from events 20538 END 20539 INPUT 20540 select (case 1/0 when "a" then "true" END) | 0; 20541 END 20542 OUTPUT 20543 select case 1 / 0 when 'a' then 'true' end | 0 from dual 20544 END 20545 INPUT 20546 select _latin2'B' in (_latin1'a',_latin1'b'); 20547 END 20548 OUTPUT 20549 select _latin2 'B' in (_latin1 'a', _latin1 'b') from dual 20550 END 20551 INPUT 20552 select soundex(_utf8 0xD091D092D093); 20553 END 20554 OUTPUT 20555 select soundex(_utf8 0xD091D092D093) from dual 20556 END 20557 INPUT 20558 select sum(a) from t1 where a > 10; 20559 END 20560 OUTPUT 20561 select sum(a) from t1 where a > 10 20562 END 20563 INPUT 20564 select from information_schema.partitions where table_schema="test" and table_name="t2"; 20565 END 20566 ERROR 20567 syntax error at position 12 near 'from' 20568 END 20569 INPUT 20570 select a b, b c from t1 as t2; 20571 END 20572 OUTPUT 20573 select a as b, b as c from t1 as t2 20574 END 20575 INPUT 20576 select from t1 where MATCH(a,b) AGAINST ("collections"); 20577 END 20578 ERROR 20579 syntax error at position 12 near 'from' 20580 END 20581 INPUT 20582 select (CASE "two" when "one" then "1" WHEN "two" then "2" END) | 0; 20583 END 20584 OUTPUT 20585 select case 'two' when 'one' then '1' when 'two' then '2' end | 0 from dual 20586 END 20587 INPUT 20588 select uncompress(""); 20589 END 20590 OUTPUT 20591 select uncompress('') from dual 20592 END 20593 INPUT 20594 select a1,a2,b, max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b; 20595 END 20596 OUTPUT 20597 select a1, a2, b, max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1, a2, b 20598 END 20599 INPUT 20600 select from t1, t2 where t1.value64= 9223372036854775807 and t2.value64=9223372036854775807; 20601 END 20602 ERROR 20603 syntax error at position 12 near 'from' 20604 END 20605 INPUT 20606 select from t1 where firstname='john' and firstname = binary 'john'; 20607 END 20608 ERROR 20609 syntax error at position 12 near 'from' 20610 END 20611 INPUT 20612 select str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S.%f"); 20613 END 20614 OUTPUT 20615 select str_to_date('2003-01-02 10:11:12.0012', '%Y-%m-%d %H:%i:%S.%f') from dual 20616 END 20617 INPUT 20618 select 1 from t1 order by t1.b; 20619 END 20620 OUTPUT 20621 select 1 from t1 order by t1.b asc 20622 END 20623 INPUT 20624 select hex(weight_string(cast('aa' as binary(3)))); 20625 END 20626 OUTPUT 20627 select hex(weight_string(convert('aa', binary(3)))) from dual 20628 END 20629 INPUT 20630 select group_concat(distinct f1) from t1; 20631 END 20632 OUTPUT 20633 select group_concat(distinct f1) from t1 20634 END 20635 INPUT 20636 select from information_schema.column_privileges order by grantee; 20637 END 20638 ERROR 20639 syntax error at position 12 near 'from' 20640 END 20641 INPUT 20642 select NULL AND 0, 0 and NULL; 20643 END 20644 OUTPUT 20645 select null and 0, 0 and null from dual 20646 END 20647 INPUT 20648 select substring('hello', 18446744073709551616, 18446744073709551616); 20649 END 20650 OUTPUT 20651 select substr('hello', 18446744073709551616, 18446744073709551616) from dual 20652 END 20653 INPUT 20654 select st_intersects(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 20655 END 20656 OUTPUT 20657 select st_intersects(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 20658 END 20659 INPUT 20660 select count(*), min(7), max(7) from t1m, t2i; 20661 END 20662 OUTPUT 20663 select count(*), min(7), max(7) from t1m, t2i 20664 END 20665 INPUT 20666 select user, QUOTE(host) from mysql.user where user="mysqltest_8"; 20667 END 20668 OUTPUT 20669 select `user`, QUOTE(host) from mysql.`user` where `user` = 'mysqltest_8' 20670 END 20671 INPUT 20672 select a1, min(a2), max(a2) from t1 group by a1; 20673 END 20674 OUTPUT 20675 select a1, min(a2), max(a2) from t1 group by a1 20676 END 20677 INPUT 20678 select from t1 where firstname='john' and binary 'john' = firstname; 20679 END 20680 ERROR 20681 syntax error at position 12 near 'from' 20682 END 20683 INPUT 20684 select -(9223372036854775808); 20685 END 20686 OUTPUT 20687 select -9223372036854775808 from dual 20688 END 20689 INPUT 20690 select hex(weight_string(_utf32 0x10001 collate utf32_unicode_ci)); 20691 END 20692 OUTPUT 20693 select hex(weight_string(_utf32 0x10001 collate utf32_unicode_ci)) from dual 20694 END 20695 INPUT 20696 select distinct b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; 20697 END 20698 OUTPUT 20699 select distinct b from t2 where a2 >= 'b' and b = 'a' group by a1, a2, b 20700 END 20701 INPUT 20702 select from information_schema.user_privileges order by grantee; 20703 END 20704 ERROR 20705 syntax error at position 12 near 'from' 20706 END 20707 INPUT 20708 select t1.*,t2.* from t1 JOIN t2 where t1.a=t2.a; 20709 END 20710 OUTPUT 20711 select t1.*, t2.* from t1 join t2 where t1.a = t2.a 20712 END 20713 INPUT 20714 select grp,group_concat(distinct c order by c desc separator ",") from t1 group by grp; 20715 END 20716 OUTPUT 20717 select grp, group_concat(distinct c order by c desc separator ',') from t1 group by grp 20718 END 20719 INPUT 20720 select extract(YEAR_MONTH FROM "1999-01-02"); 20721 END 20722 OUTPUT 20723 select extract(year_month from '1999-01-02') from dual 20724 END 20725 INPUT 20726 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_estonian_ci; 20727 END 20728 OUTPUT 20729 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_estonian_ci 20730 END 20731 INPUT 20732 select ST_GeomFromText('linestring(-2 -2, 12 7)') into @l; 20733 END 20734 ERROR 20735 syntax error at position 58 near 'l' 20736 END 20737 INPUT 20738 select RANDOM_BYTES(1025); 20739 END 20740 OUTPUT 20741 select RANDOM_BYTES(1025) from dual 20742 END 20743 INPUT 20744 select inet_aton("0.255.255.255.255"); 20745 END 20746 OUTPUT 20747 select inet_aton('0.255.255.255.255') from dual 20748 END 20749 INPUT 20750 select concat_ws(',','',NULL,'a'); 20751 END 20752 OUTPUT 20753 select concat_ws(',', '', null, 'a') from dual 20754 END 20755 INPUT 20756 select insert('hello', -18446744073709551615, -18446744073709551615, 'hi'); 20757 END 20758 ERROR 20759 syntax error at position 14 near 'insert' 20760 END 20761 INPUT 20762 select s1,hex(s1),char_length(s1),octet_length(s1) from t1; 20763 END 20764 OUTPUT 20765 select s1, hex(s1), char_length(s1), octet_length(s1) from t1 20766 END 20767 INPUT 20768 select a1,a2,b,min(c),max(c) from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b; 20769 END 20770 OUTPUT 20771 select a1, a2, b, min(c), max(c) from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and a2 > 'a' group by a1, a2, b 20772 END 20773 INPUT 20774 select st_astext(st_makeenvelope(st_geomfromtext('point(0 0)'), st_geomfromtext('point(2 2)'))); 20775 END 20776 OUTPUT 20777 select st_astext(st_makeenvelope(st_geomfromtext('point(0 0)'), st_geomfromtext('point(2 2)'))) from dual 20778 END 20779 INPUT 20780 select a1,a2,b,min(c),max(c) from t1 where (a2 >= 'b') and (b = 'a') and (c > 'b111') group by a1,a2,b; 20781 END 20782 OUTPUT 20783 select a1, a2, b, min(c), max(c) from t1 where a2 >= 'b' and b = 'a' and c > 'b111' group by a1, a2, b 20784 END 20785 INPUT 20786 select grp,group_concat("(",a,":",c,")") from t1 group by grp; 20787 END 20788 OUTPUT 20789 select grp, group_concat('(', a, ':', c, ')') from t1 group by grp 20790 END 20791 INPUT 20792 select makedate(9999,366); 20793 END 20794 OUTPUT 20795 select makedate(9999, 366) from dual 20796 END 20797 INPUT 20798 select from information_schema.engines WHERE ENGINE="MyISAM"; 20799 END 20800 ERROR 20801 syntax error at position 12 near 'from' 20802 END 20803 INPUT 20804 select cast(concat('184467440','73709551615') as unsigned); 20805 END 20806 OUTPUT 20807 select convert(concat('184467440', '73709551615'), unsigned) from dual 20808 END 20809 INPUT 20810 select +9999999999999999999,-9999999999999999999; 20811 END 20812 OUTPUT 20813 select 9999999999999999999, -9999999999999999999 from dual 20814 END 20815 INPUT 20816 select collation(right(_latin2'a',1)), coercibility(right(_latin2'a',1)); 20817 END 20818 OUTPUT 20819 select collation(right(_latin2 'a', 1)), coercibility(right(_latin2 'a', 1)) from dual 20820 END 20821 INPUT 20822 select ST_GeomFromText('linestring(6 2, 12 1)') into @l; 20823 END 20824 ERROR 20825 syntax error at position 56 near 'l' 20826 END 20827 INPUT 20828 select hex(substr(_utf16 0x00e400e5D800DC00,-2)); 20829 END 20830 OUTPUT 20831 select hex(substr(_utf16 0x00e400e5D800DC00, -2)) from dual 20832 END 20833 INPUT 20834 select 0xbc24421ce6194ab5c260e80af647ae58fdbfca18a19dc8411424 like '%-106%'; 20835 END 20836 OUTPUT 20837 select 0xbc24421ce6194ab5c260e80af647ae58fdbfca18a19dc8411424 like '%-106%' from dual 20838 END 20839 INPUT 20840 select repeat(_utf8'+',3) as h union select NULL; 20841 END 20842 OUTPUT 20843 select repeat(_utf8 '+', 3) as h from dual union select null from dual 20844 END 20845 INPUT 20846 select fld1,fld3 FROM t2 where fld1 like "25050%"; 20847 END 20848 OUTPUT 20849 select fld1, fld3 from t2 where fld1 like '25050%' 20850 END 20851 INPUT 20852 select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; 20853 END 20854 OUTPUT 20855 select `SQL_BIG_RESULT` as a, count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a 20856 END 20857 INPUT 20858 select lpad('hello', 18446744073709551617, '1'); 20859 END 20860 OUTPUT 20861 select lpad('hello', 18446744073709551617, '1') from dual 20862 END 20863 INPUT 20864 select from t1 where MATCH a,b AGAINST ('+collections -supp* -foobar*' IN BOOLEAN MODE); 20865 END 20866 ERROR 20867 syntax error at position 12 near 'from' 20868 END 20869 INPUT 20870 select date_sub("0200-01-01 00:00:01",INTERVAL 1 SECOND); 20871 END 20872 OUTPUT 20873 select date_sub('0200-01-01 00:00:01', interval 1 SECOND) from dual 20874 END 20875 INPUT 20876 select repeat('monty',5),concat('*',space(5),'*'); 20877 END 20878 OUTPUT 20879 select repeat('monty', 5), concat('*', space(5), '*') from dual 20880 END 20881 INPUT 20882 select a1,a2,b,min(c) from t2 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b; 20883 END 20884 OUTPUT 20885 select a1, a2, b, min(c) from t2 where (a1 > 'a' or a1 < '9') and (a2 >= 'b' and a2 < 'z') and b = 'a' and (c < 'h112' or c = 'j121' or c > 'k121' and c < 'm122' or c > 'o122') group by a1, a2, b 20886 END 20887 INPUT 20888 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_latvian_ci; 20889 END 20890 OUTPUT 20891 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_latvian_ci 20892 END 20893 INPUT 20894 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_czech_ci; 20895 END 20896 OUTPUT 20897 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_czech_ci 20898 END 20899 INPUT 20900 select "Test default delimiter; 20901 END 20902 ERROR 20903 syntax error at position 32 near 'Test default delimiter;' 20904 END 20905 INPUT 20906 select from t1 where match a against ("te*" in boolean mode)+0; 20907 END 20908 ERROR 20909 syntax error at position 12 near 'from' 20910 END 20911 INPUT 20912 select sql_buffer_result max(f1)+1 from t1; 20913 END 20914 ERROR 20915 syntax error at position 30 20916 END 20917 INPUT 20918 select t1Aa.col1 from t1aA,t2Aa where t1Aa.col1 = t2aA.col1; 20919 END 20920 OUTPUT 20921 select t1Aa.col1 from t1aA, t2Aa where t1Aa.col1 = t2aA.col1 20922 END 20923 INPUT 20924 select sum(col1) from t1 group by col_t1 having col_t1 in (select sum(t2.col1) from t2 group by t2.col2, t2.col1 having t2.col1 = col_t1); 20925 END 20926 OUTPUT 20927 select sum(col1) from t1 group by col_t1 having col_t1 in (select sum(t2.col1) from t2 group by t2.col2, t2.col1 having t2.col1 = col_t1) 20928 END 20929 INPUT 20930 select hex(char(195)); 20931 END 20932 OUTPUT 20933 select hex(char(195)) from dual 20934 END 20935 INPUT 20936 select hex(substr(_utf16 0x00e400e50068,2)); 20937 END 20938 OUTPUT 20939 select hex(substr(_utf16 0x00e400e50068, 2)) from dual 20940 END 20941 INPUT 20942 select 1, min(1) from t1m where 1=99; 20943 END 20944 OUTPUT 20945 select 1, min(1) from t1m where 1 = 99 20946 END 20947 INPUT 20948 select ST_Overlaps(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), ST_GeomFromText('POLYGON((1 1, 1 4, 4 4, 4 1, 1 1))')); 20949 END 20950 OUTPUT 20951 select ST_Overlaps(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), ST_GeomFromText('POLYGON((1 1, 1 4, 4 4, 4 1, 1 1))')) from dual 20952 END 20953 INPUT 20954 select length(@test_compress_string); 20955 END 20956 OUTPUT 20957 select length(@test_compress_string) from dual 20958 END 20959 INPUT 20960 select st_astext(st_intersection(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))); 20961 END 20962 OUTPUT 20963 select st_astext(st_intersection(ST_GeometryFromText('geometrycollection(polygon((0 0, 2 0, 2 1, 0 1, 0 0)))'), ST_GeometryFromText('geometrycollection(polygon((1 0, 3 0, 3 1, 1 1, 1 0)))'))) from dual 20964 END 20965 INPUT 20966 select st_equals(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 20967 END 20968 OUTPUT 20969 select st_equals(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 20970 END 20971 INPUT 20972 select distinct *,if(1,'',f1) from t1; 20973 END 20974 OUTPUT 20975 select distinct *, if(1, '', f1) from t1 20976 END 20977 INPUT 20978 select hex(_utf8 0x616263FF); 20979 END 20980 OUTPUT 20981 select hex(_utf8 0x616263FF) from dual 20982 END 20983 INPUT 20984 select avg(a) as x from t1 having x=2; 20985 END 20986 OUTPUT 20987 select avg(a) as x from t1 having x = 2 20988 END 20989 INPUT 20990 select s1 from t1 where s1 > 'a' order by s1; 20991 END 20992 OUTPUT 20993 select s1 from t1 where s1 > 'a' order by s1 asc 20994 END 20995 INPUT 20996 select subtime("02:01:01.999999", "01:01:01.999999"); 20997 END 20998 OUTPUT 20999 select subtime('02:01:01.999999', '01:01:01.999999') from dual 21000 END 21001 INPUT 21002 select @@global.profiling_history_size; 21003 END 21004 OUTPUT 21005 select @@global.profiling_history_size from dual 21006 END 21007 INPUT 21008 select collation(trim(TRAILING _latin2' ' FROM _latin2'a')), coercibility(trim(TRAILING _latin2'a' FROM _latin2'a')); 21009 END 21010 ERROR 21011 syntax error at position 39 near '_latin2' 21012 END 21013 INPUT 21014 select left('hello', -4294967296); 21015 END 21016 OUTPUT 21017 select left('hello', -4294967296) from dual 21018 END 21019 INPUT 21020 select insert('hello', 1, 18446744073709551615, 'hi'); 21021 END 21022 ERROR 21023 syntax error at position 14 near 'insert' 21024 END 21025 INPUT 21026 select 1 /bin /boot /cdrom /dev /etc /home /lib /lib32 /lib64 /libx32 /lost+found /media /mnt /opt /proc /root /run /sbin /snap /srv /swapfile /sys /tmp /usr /var long multi line comment */; 21027 END 21028 ERROR 21029 syntax error at position 174 near 'multi' 21030 END 21031 INPUT 21032 select date_add(date,INTERVAL 1 MONTH) from t1; 21033 END 21034 OUTPUT 21035 select date_add(`date`, interval 1 MONTH) from t1 21036 END 21037 INPUT 21038 select substring('hello', -18446744073709551615, 1); 21039 END 21040 OUTPUT 21041 select substr('hello', -18446744073709551615, 1) from dual 21042 END 21043 INPUT 21044 select substring('hello', 1, -4294967296); 21045 END 21046 OUTPUT 21047 select substr('hello', 1, -4294967296) from dual 21048 END 21049 INPUT 21050 select from t1 where word2=CAST(0xDF as CHAR); 21051 END 21052 ERROR 21053 syntax error at position 12 near 'from' 21054 END 21055 INPUT 21056 select from t1 where MATCH(a,b) AGAINST ("collections" WITH QUERY EXPANSION); 21057 END 21058 ERROR 21059 syntax error at position 12 near 'from' 21060 END 21061 INPUT 21062 select user,db from information_schema.processlist; 21063 END 21064 OUTPUT 21065 select `user`, db from information_schema.`processlist` 21066 END 21067 INPUT 21068 select st_touches(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 21069 END 21070 OUTPUT 21071 select st_touches(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 21072 END 21073 INPUT 21074 select i, count(*), variance(s1/s2) from bug22555 group by i order by i; 21075 END 21076 OUTPUT 21077 select i, count(*), variance(s1 / s2) from bug22555 group by i order by i asc 21078 END 21079 INPUT 21080 select from mysqltest_db1.t_column_priv_only; 21081 END 21082 ERROR 21083 syntax error at position 12 near 'from' 21084 END 21085 INPUT 21086 select maketime(10,11,12); 21087 END 21088 OUTPUT 21089 select maketime(10, 11, 12) from dual 21090 END 21091 INPUT 21092 select TRIM("foo" FROM "foo"), TRIM("foo" FROM "foook"), TRIM("foo" FROM "okfoo"); 21093 END 21094 ERROR 21095 syntax error at position 23 near 'FROM' 21096 END 21097 INPUT 21098 select var_samp(s) as 'null', var_pop(s) as '0' from bug22555; 21099 END 21100 OUTPUT 21101 select var_samp(s) as `null`, var_pop(s) as `0` from bug22555 21102 END 21103 INPUT 21104 select version()>="3.23.29"; 21105 END 21106 OUTPUT 21107 select version() >= '3.23.29' from dual 21108 END 21109 INPUT 21110 select f1 from t1 union select f1 from t1; 21111 END 21112 OUTPUT 21113 select f1 from t1 union select f1 from t1 21114 END 21115 INPUT 21116 select concat(':',trim(leading from ' left '),':',trim(trailing from ' right '),':'); 21117 END 21118 ERROR 21119 syntax error at position 36 near 'from' 21120 END 21121 INPUT 21122 select DATE_ADD('20071108', INTERVAL 1 DAY); 21123 END 21124 OUTPUT 21125 select DATE_ADD('20071108', interval 1 DAY) from dual 21126 END 21127 INPUT 21128 select locate(_ujis 0xa1a3,_ujis 0xa1a2a1a3); 21129 END 21130 OUTPUT 21131 select locate(_ujis 0xa1a3, _ujis 0xa1a2a1a3) from dual 21132 END 21133 INPUT 21134 select char(195 using utf8); 21135 END 21136 ERROR 21137 syntax error at position 22 near 'using' 21138 END 21139 INPUT 21140 select a1,a2,b,min(c),max(c) from t2 where (c < 'a0') group by a1,a2,b; 21141 END 21142 OUTPUT 21143 select a1, a2, b, min(c), max(c) from t2 where c < 'a0' group by a1, a2, b 21144 END 21145 INPUT 21146 select ST_NUMPOINTS(ST_EXTERIORRING(ST_buffer(geom,2))) from t1; 21147 END 21148 OUTPUT 21149 select ST_NUMPOINTS(ST_EXTERIORRING(ST_buffer(geom, 2))) from t1 21150 END 21151 INPUT 21152 select 0=0,1>0,1>=1,1<0,1<=0,1!=0,strcmp("abc","abcd"),strcmp("b","a"),strcmp("a","a"); 21153 END 21154 OUTPUT 21155 select 0 = 0, 1 > 0, 1 >= 1, 1 < 0, 1 <= 0, 1 != 0, strcmp('abc', 'abcd'), strcmp('b', 'a'), strcmp('a', 'a') from dual 21156 END 21157 INPUT 21158 select i from t1 where i=1 into k; 21159 END 21160 ERROR 21161 syntax error at position 34 near 'k' 21162 END 21163 INPUT 21164 select s.*, '*', m.*, (s.match_1_h - m.home) UUX from t2 s straight_join t1 m where m.match_id = 1 order by UUX desc; 21165 END 21166 OUTPUT 21167 select s.*, '*', m.*, s.match_1_h - m.home as UUX from t2 as s straight_join t1 as m where m.match_id = 1 order by UUX desc 21168 END 21169 INPUT 21170 select t1.*,t2.* from t1 left join t2 using (a) where t1.a=t2.a; 21171 END 21172 OUTPUT 21173 select t1.*, t2.* from t1 left join t2 using (a) where t1.a = t2.a 21174 END 21175 INPUT 21176 select hex(weight_string('ab')); 21177 END 21178 OUTPUT 21179 select hex(weight_string('ab')) from dual 21180 END 21181 INPUT 21182 select year("0000-00-00"),year(d),year(dt),year(t),year(c) from t1; 21183 END 21184 OUTPUT 21185 select year('0000-00-00'), year(d), year(dt), year(t), year(c) from t1 21186 END 21187 INPUT 21188 select a1,a2,b, max(c) from t2 where a1 >= 'c' or a1 < 'b' group by a1,a2,b; 21189 END 21190 OUTPUT 21191 select a1, a2, b, max(c) from t2 where a1 >= 'c' or a1 < 'b' group by a1, a2, b 21192 END 21193 INPUT 21194 select distinct a2,a1,a2,a1 from t1; 21195 END 21196 OUTPUT 21197 select distinct a2, a1, a2, a1 from t1 21198 END 21199 INPUT 21200 select from information_schema.KEY_COLUMN_USAGE where TABLE_SCHEMA= "test" order by TABLE_SCHEMA, TABLE_NAME, CONSTRAINT_NAME, COLUMN_NAME; 21201 END 21202 ERROR 21203 syntax error at position 12 near 'from' 21204 END 21205 INPUT 21206 select left('hello', -4294967295); 21207 END 21208 OUTPUT 21209 select left('hello', -4294967295) from dual 21210 END 21211 INPUT 21212 select ST_astext(st_difference(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 0 1, 1 1, 1 0, 0 0))'))) as result; 21213 END 21214 OUTPUT 21215 select ST_astext(st_difference(ST_GeomFromText('polygon((0 0, 1 0, 0 1, 0 0))'), ST_GeomFromText('polygon((0 0, 0 1, 1 1, 1 0, 0 0))'))) as result from dual 21216 END 21217 INPUT 21218 select distinct a1,a2,b from t2 where (a2 >= 'b') and (b = 'a') group by a1,a2,b; 21219 END 21220 OUTPUT 21221 select distinct a1, a2, b from t2 where a2 >= 'b' and b = 'a' group by a1, a2, b 21222 END 21223 INPUT 21224 select left('abcd',2); 21225 END 21226 OUTPUT 21227 select left('abcd', 2) from dual 21228 END 21229 INPUT 21230 select min(t1.a5), max(t2.a3) from t1, t2; 21231 END 21232 OUTPUT 21233 select min(t1.a5), max(t2.a3) from t1, t2 21234 END 21235 INPUT 21236 select from t1 where match a against ("+aaa10 +(bbb*)" in boolean mode); 21237 END 21238 ERROR 21239 syntax error at position 12 near 'from' 21240 END 21241 INPUT 21242 select 10.0+cast('a' as decimal); 21243 END 21244 OUTPUT 21245 select 10.0 + convert('a', decimal) from dual 21246 END 21247 INPUT 21248 select from t1 where f1='test' and (f2= sha("test") or f2= sha("TEST")); 21249 END 21250 ERROR 21251 syntax error at position 12 near 'from' 21252 END 21253 INPUT 21254 select FIND_IN_SET(_latin1'B',_latin1'a,b,c,d'); 21255 END 21256 OUTPUT 21257 select FIND_IN_SET(_latin1 'B', _latin1 'a,b,c,d') from dual 21258 END 21259 INPUT 21260 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_swedish_ci; 21261 END 21262 OUTPUT 21263 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_swedish_ci 21264 END 21265 INPUT 21266 select t1.a, group_concat(c order by (select mid(group_concat(c order by a),1,5) from t2 where t2.a=t1.a)) as grp from t1 group by 1; 21267 END 21268 OUTPUT 21269 select t1.a, group_concat(c order by (select mid(group_concat(c order by a asc), 1, 5) from t2 where t2.a = t1.a) asc) as grp from t1 group by 1 21270 END 21271 INPUT 21272 select hex(inet_aton('127')); 21273 END 21274 OUTPUT 21275 select hex(inet_aton('127')) from dual 21276 END 21277 INPUT 21278 select sec_to_time(time_to_sec('-838:59:59')); 21279 END 21280 OUTPUT 21281 select sec_to_time(time_to_sec('-838:59:59')) from dual 21282 END 21283 INPUT 21284 select from t1 where not(a = 10); 21285 END 21286 ERROR 21287 syntax error at position 12 near 'from' 21288 END 21289 INPUT 21290 select TABLE_NAME,COLUMN_NAME,DATA_TYPE,DATETIME_PRECISION from information_schema.columns where TABLE_SCHEMA='mysqltest' order by table_name, column_name; 21291 END 21292 OUTPUT 21293 select TABLE_NAME, COLUMN_NAME, DATA_TYPE, DATETIME_PRECISION from information_schema.`columns` where TABLE_SCHEMA = 'mysqltest' order by table_name asc, column_name asc 21294 END 21295 INPUT 21296 select left('hello',2),right('hello',2),substring('hello',2,2),mid('hello',1,5); 21297 END 21298 OUTPUT 21299 select left('hello', 2), right('hello', 2), substr('hello', 2, 2), mid('hello', 1, 5) from dual 21300 END 21301 INPUT 21302 select date_add("1997-12-31",INTERVAL "1 1" YEAR_MONTH); 21303 END 21304 OUTPUT 21305 select date_add('1997-12-31', interval '1 1' YEAR_MONTH) from dual 21306 END 21307 INPUT 21308 select timestampdiff(month,'1999-09-11','2001-10-10'); 21309 END 21310 OUTPUT 21311 select timestampdiff(month, '1999-09-11', '2001-10-10') from dual 21312 END 21313 INPUT 21314 select hex(convert(s1 using latin1)) from t1; 21315 END 21316 OUTPUT 21317 select hex(convert(s1 using latin1)) from t1 21318 END 21319 INPUT 21320 select 10+'10'; 21321 END 21322 OUTPUT 21323 select 10 + '10' from dual 21324 END 21325 INPUT 21326 select week(19950101),week(19950101,1); 21327 END 21328 OUTPUT 21329 select week(19950101), week(19950101, 1) from dual 21330 END 21331 INPUT 21332 select case _latin1'a' when _latin2'b' then 1 when _latin5'c' collate latin5_turkish_ci then 2 else 3 end; 21333 END 21334 OUTPUT 21335 select case _latin1 'a' when _latin2 'b' then 1 when _latin5 'c' collate latin5_turkish_ci then 2 else 3 end from dual 21336 END 21337 INPUT 21338 select point(b, b) IS NULL, linestring(b) IS NULL, polygon(b) IS NULL, multipoint(b) IS NULL, multilinestring(b) IS NULL, multipolygon(b) IS NULL, geometrycollection(b) IS NULL from t1; 21339 END 21340 OUTPUT 21341 select point(b, b) is null, linestring(b) is null, polygon(b) is null, multipoint(b) is null, multilinestring(b) is null, multipolygon(b) is null, geometrycollection(b) is null from t1 21342 END 21343 INPUT 21344 select from information_schema.table_privileges where grantee like '%user%' and table_schema !='mysql' order by grantee; 21345 END 21346 ERROR 21347 syntax error at position 12 near 'from' 21348 END 21349 INPUT 21350 select lpad('hello', -18446744073709551617, '1'); 21351 END 21352 OUTPUT 21353 select lpad('hello', -18446744073709551617, '1') from dual 21354 END 21355 INPUT 21356 select from t1 into outfile 'tmp1.txt' character set binary; 21357 END 21358 ERROR 21359 syntax error at position 12 near 'from' 21360 END 21361 INPUT 21362 select t1.* from t t0 cross join (t t1 join t t2 on 100=(select count(*) from t t3 left join t t4 on t4.a>t3.a-t0.a)); 21363 END 21364 OUTPUT 21365 select t1.* from t as t0 join (t as t1 join t as t2 on 100 = (select count(*) from t as t3 left join t as t4 on t4.a > t3.a - t0.a)) 21366 END 21367 INPUT 21368 select release_lock("test_lock1"); 21369 END 21370 OUTPUT 21371 select release_lock('test_lock1') from dual 21372 END 21373 INPUT 21374 select trim(leading 'foo' from 'foo'); 21375 END 21376 ERROR 21377 syntax error at position 31 near 'from' 21378 END 21379 INPUT 21380 select distinct id, IFNULL(dsc, '-') from t1; 21381 END 21382 OUTPUT 21383 select distinct id, IFNULL(dsc, '-') from t1 21384 END 21385 INPUT 21386 select from t1 left join t2 on (venue_id = entity_id and match(name) against('aberdeen')) where dt = '2003-05-23 19:30:00'; 21387 END 21388 ERROR 21389 syntax error at position 12 near 'from' 21390 END 21391 INPUT 21392 select col1,count(col1),sum(col1),avg(col1) from t1 group by col1; 21393 END 21394 OUTPUT 21395 select col1, count(col1), sum(col1), avg(col1) from t1 group by col1 21396 END 21397 INPUT 21398 select from t1 where a=_latin1'����'; 21399 END 21400 ERROR 21401 syntax error at position 12 near 'from' 21402 END 21403 INPUT 21404 select conv("18383815659218730760",10,10) + 0; 21405 END 21406 OUTPUT 21407 select conv('18383815659218730760', 10, 10) + 0 from dual 21408 END 21409 INPUT 21410 select t1.a, t1.b, t2.c from t1 left join t2 on t1.a=t2.a and t1.b=t2.b and t2.c=3 where t1.a=1 and t2.c is null; 21411 END 21412 OUTPUT 21413 select t1.a, t1.b, t2.c from t1 left join t2 on t1.a = t2.a and t1.b = t2.b and t2.c = 3 where t1.a = 1 and t2.c is null 21414 END 21415 INPUT 21416 select 'вася ' rlike '[[:<:]]вася[[:>:]]'; 21417 END 21418 OUTPUT 21419 select 'вася ' regexp '[[:<:]]вася[[:>:]]' from dual 21420 END 21421 INPUT 21422 select group_concat(distinct s1) from t1; 21423 END 21424 OUTPUT 21425 select group_concat(distinct s1) from t1 21426 END 21427 INPUT 21428 select ST_Disjoint(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), ST_GeomFromText('POLYGON((10 10, 10 4, 4 4, 4 10, 10 10))')); 21429 END 21430 OUTPUT 21431 select ST_Disjoint(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0))'), ST_GeomFromText('POLYGON((10 10, 10 4, 4 4, 4 10, 10 10))')) from dual 21432 END 21433 INPUT 21434 select insert(_ucs2 0x006100620063,10,2,_ucs2 0x006400650066); 21435 END 21436 ERROR 21437 syntax error at position 14 near 'insert' 21438 END 21439 INPUT 21440 select *, MATCH(a,b) AGAINST("support collections" IN BOOLEAN MODE) as x from t1; 21441 END 21442 OUTPUT 21443 select *, match(a, b) against ('support collections' in boolean mode) as x from t1 21444 END 21445 INPUT 21446 select mysqltest.t1.* from MYSQLTEST.t1; 21447 END 21448 OUTPUT 21449 select mysqltest.t1.* from MYSQLTEST.t1 21450 END 21451 INPUT 21452 select count(*) from t1 where match a against ('aaa*' in boolean mode); 21453 END 21454 ERROR 21455 syntax error at position 38 near 'a' 21456 END 21457 INPUT 21458 select from t1 where field < '2006-11-06 04:08:36.0'; 21459 END 21460 ERROR 21461 syntax error at position 12 near 'from' 21462 END 21463 INPUT 21464 select 'A' like 'a' collate sjis_bin; 21465 END 21466 OUTPUT 21467 select 'A' like 'a' collate sjis_bin from dual 21468 END 21469 INPUT 21470 select strcmp(_koi8r'a' COLLATE koi8r_bin, _koi8r'A'); 21471 END 21472 OUTPUT 21473 select strcmp(_koi8r 'a' collate koi8r_bin, _koi8r 'A') from dual 21474 END 21475 INPUT 21476 select case 1/0 when "a" then "true" else "false" END; 21477 END 21478 OUTPUT 21479 select case 1 / 0 when 'a' then 'true' else 'false' end from dual 21480 END 21481 INPUT 21482 select from t1 where soundex(a) = soundex('test'); 21483 END 21484 ERROR 21485 syntax error at position 12 near 'from' 21486 END 21487 INPUT 21488 select from t1 where word='ae'; 21489 END 21490 ERROR 21491 syntax error at position 12 near 'from' 21492 END 21493 INPUT 21494 select from t1 where a=lpad('xxx',10,' '); 21495 END 21496 ERROR 21497 syntax error at position 12 near 'from' 21498 END 21499 INPUT 21500 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_croatian_ci; 21501 END 21502 OUTPUT 21503 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_croatian_ci 21504 END 21505 INPUT 21506 select column_name from information_schema.columns where table_schema='test' and table_name='t2'; 21507 END 21508 OUTPUT 21509 select column_name from information_schema.`columns` where table_schema = 'test' and table_name = 't2' 21510 END 21511 INPUT 21512 select if(1,st,st) s from t1 order by s; 21513 END 21514 OUTPUT 21515 select if(1, st, st) as s from t1 order by s asc 21516 END 21517 INPUT 21518 select trim('xyz' from null) as "must_be_null"; 21519 END 21520 ERROR 21521 syntax error at position 23 near 'from' 21522 END 21523 INPUT 21524 select a.*, count(b.id) as c from t2 a left join t3 b on a.id=b.order_id group by a.id, a.description having (a.description is not null) and (c=0); 21525 END 21526 OUTPUT 21527 select a.*, count(b.id) as c from t2 as a left join t3 as b on a.id = b.order_id group by a.id, a.description having a.description is not null and c = 0 21528 END 21529 INPUT 21530 select 'mood' sounds like 'mud'; 21531 END 21532 ERROR 21533 syntax error at position 26 near 'like' 21534 END 21535 INPUT 21536 select min(a1), max(a1) from t1 where a1 between 'A' and 'P'; 21537 END 21538 OUTPUT 21539 select min(a1), max(a1) from t1 where a1 between 'A' and 'P' 21540 END 21541 INPUT 21542 select elt(2,1),field(NULL,"a","b","c"); 21543 END 21544 OUTPUT 21545 select elt(2, 1), field(null, 'a', 'b', 'c') from dual 21546 END 21547 INPUT 21548 select charset(null), collation(null), coercibility(null); 21549 END 21550 OUTPUT 21551 select charset(null), collation(null), coercibility(null) from dual 21552 END 21553 INPUT 21554 select from t2 where MATCH inhalt AGAINST ('foobar'); 21555 END 21556 ERROR 21557 syntax error at position 12 near 'from' 21558 END 21559 INPUT 21560 select st_within(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 21561 END 21562 OUTPUT 21563 select st_within(st_union(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 21564 END 21565 INPUT 21566 select collation(group_concat(a)) from t1; 21567 END 21568 OUTPUT 21569 select collation(group_concat(a)) from t1 21570 END 21571 INPUT 21572 select release_lock("test_lock2"); 21573 END 21574 OUTPUT 21575 select release_lock('test_lock2') from dual 21576 END 21577 INPUT 21578 select from information_schema.table_privileges order by grantee; 21579 END 21580 ERROR 21581 syntax error at position 12 near 'from' 21582 END 21583 INPUT 21584 select distinct char(a) from t1; 21585 END 21586 OUTPUT 21587 select distinct char(a) from t1 21588 END 21589 INPUT 21590 select group_concat(distinct a, c) from t1; 21591 END 21592 OUTPUT 21593 select group_concat(distinct a, c) from t1 21594 END 21595 INPUT 21596 select from t1 where a=869751 or a=736494; 21597 END 21598 ERROR 21599 syntax error at position 12 near 'from' 21600 END 21601 INPUT 21602 select min(name),min(concat("*",name,"*")),max(name),max(concat("*",name,"*")) from t2; 21603 END 21604 OUTPUT 21605 select min(`name`), min(concat('*', `name`, '*')), max(`name`), max(concat('*', `name`, '*')) from t2 21606 END 21607 INPUT 21608 select lower(a),lower(b) from t1; 21609 END 21610 OUTPUT 21611 select lower(a), lower(b) from t1 21612 END 21613 INPUT 21614 select 'a' union select concat('a', -0); 21615 END 21616 OUTPUT 21617 select 'a' from dual union select concat('a', -0) from dual 21618 END 21619 INPUT 21620 select null sounds like null; 21621 END 21622 ERROR 21623 syntax error at position 24 near 'like' 21624 END 21625 INPUT 21626 select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2); 21627 END 21628 OUTPUT 21629 select locate(_utf8mb4 0xD091, _utf8mb4 0xD0B0D0B1D0B2) from dual 21630 END 21631 INPUT 21632 select st_equals(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 21633 END 21634 OUTPUT 21635 select st_equals(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_union(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 21636 END 21637 INPUT 21638 select cast(_latin1'ab' AS char) as c1, cast(_latin1'a ' AS char) as c2, cast(_latin1'abc' AS char(2)) as c3, cast(_latin1'a ' AS char(2)) as c4, hex(cast(_latin1'a' AS char(2))) as c5; 21639 END 21640 OUTPUT 21641 select convert(_latin1 'ab', char) as c1, convert(_latin1 'a ', char) as c2, convert(_latin1 'abc', char(2)) as c3, convert(_latin1 'a ', char(2)) as c4, hex(convert(_latin1 'a', char(2))) as c5 from dual 21642 END 21643 INPUT 21644 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_danish_ci; 21645 END 21646 OUTPUT 21647 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_danish_ci 21648 END 21649 INPUT 21650 select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))); 21651 END 21652 OUTPUT 21653 select ST_asWKT(ST_geomfromwkb(0x010100000000000000000024400000000000002440)) from dual 21654 END 21655 INPUT 21656 select right('hello', 18446744073709551617); 21657 END 21658 OUTPUT 21659 select right('hello', 18446744073709551617) from dual 21660 END 21661 INPUT 21662 select timestampdiff(year,'1999-09-11','2001-9-11'); 21663 END 21664 OUTPUT 21665 select timestampdiff(year, '1999-09-11', '2001-9-11') from dual 21666 END 21667 INPUT 21668 select Fld1, max(Fld2) from t1 group by Fld1 having variance(Fld2) is not null; 21669 END 21670 OUTPUT 21671 select Fld1, max(Fld2) from t1 group by Fld1 having variance(Fld2) is not null 21672 END 21673 INPUT 21674 select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2); 21675 END 21676 OUTPUT 21677 select locate(_utf8mb4 0xD0B1, _utf8mb4 0xD0B0D091D0B2) from dual 21678 END 21679 INPUT 21680 select strcmp(date_format(date_sub(localtimestamp(), interval 3 hour),"%T"), utc_time())=0; 21681 END 21682 OUTPUT 21683 select strcmp(date_format(date_sub(localtimestamp(), interval 3 hour), '%T'), utc_time()) = 0 from dual 21684 END 21685 INPUT 21686 select version()>=_latin1"3.23.29"; 21687 END 21688 OUTPUT 21689 select version() >= _latin1 '3.23.29' from dual 21690 END 21691 INPUT 21692 select hex(weight_string(_utf32 0x10000)); 21693 END 21694 OUTPUT 21695 select hex(weight_string(_utf32 0x10000)) from dual 21696 END 21697 INPUT 21698 select a from t1 group by b; 21699 END 21700 OUTPUT 21701 select a from t1 group by b 21702 END 21703 INPUT 21704 select from t2 natural join t1; 21705 END 21706 ERROR 21707 syntax error at position 12 near 'from' 21708 END 21709 INPUT 21710 select a, left(a,1) as b from t1; 21711 END 21712 OUTPUT 21713 select a, left(a, 1) as b from t1 21714 END 21715 INPUT 21716 select v2a.* from v1a natural join v2a; 21717 END 21718 OUTPUT 21719 select v2a.* from v1a natural join v2a 21720 END 21721 INPUT 21722 select SQL_BUFFER_RESULT from t1 WHERE (SEQ = 1); 21723 END 21724 OUTPUT 21725 select SQL_BUFFER_RESULT from t1 where SEQ = 1 21726 END 21727 INPUT 21728 select i, count(*), std(s1/s2) from bug22555 group by i order by i; 21729 END 21730 OUTPUT 21731 select i, count(*), std(s1 / s2) from bug22555 group by i order by i asc 21732 END 21733 INPUT 21734 select from v1 group by id limit 1; 21735 END 21736 ERROR 21737 syntax error at position 12 near 'from' 21738 END 21739 INPUT 21740 select concat('monty',' was here ','again'),length('hello'),char(ascii('h')),ord('h'); 21741 END 21742 OUTPUT 21743 select concat('monty', ' was here ', 'again'), length('hello'), char(ascii('h')), ord('h') from dual 21744 END 21745 INPUT 21746 select t1.*, t2.*, t3.*, t4.* from (t1 natural join t2) natural join (t3 natural join t4); 21747 END 21748 OUTPUT 21749 select t1.*, t2.*, t3.*, t4.* from (t1 natural join t2) natural join (t3 natural join t4) 21750 END 21751 INPUT 21752 select s1 as before_delete_bin from t1 where s1 like 'ペテ%'; 21753 END 21754 OUTPUT 21755 select s1 as before_delete_bin from t1 where s1 like 'ペテ%' 21756 END 21757 INPUT 21758 select from t1 where MATCH(a,b) AGAINST ("indexes" IN BOOLEAN MODE WITH QUERY EXPANSION); 21759 END 21760 ERROR 21761 syntax error at position 12 near 'from' 21762 END 21763 INPUT 21764 select 1 from (select 1 from test.t1) a; 21765 END 21766 OUTPUT 21767 select 1 from (select 1 from test.t1) as a 21768 END 21769 INPUT 21770 select from (t1 join t2 using (b)) natural join (t3 join t4 using (c)); 21771 END 21772 ERROR 21773 syntax error at position 12 near 'from' 21774 END 21775 INPUT 21776 select hex(char(1 using utf8)); 21777 END 21778 ERROR 21779 syntax error at position 24 near 'using' 21780 END 21781 INPUT 21782 select col1 as count_col1,col2 from t1 as tmp1 group by col1,col2 having count_col1 = 10; 21783 END 21784 OUTPUT 21785 select col1 as count_col1, col2 from t1 as tmp1 group by col1, col2 having count_col1 = 10 21786 END 21787 INPUT 21788 select cast(_koi8r'����' as char character set cp1251); 21789 END 21790 OUTPUT 21791 select convert(_koi8r '����', char character set cp1251) from dual 21792 END 21793 INPUT 21794 select timestampdiff(month,'2005-09-11','2003-09-11'); 21795 END 21796 OUTPUT 21797 select timestampdiff(month, '2005-09-11', '2003-09-11') from dual 21798 END 21799 INPUT 21800 select from sakila.film_text where film_id = 984; 21801 END 21802 ERROR 21803 syntax error at position 12 near 'from' 21804 END 21805 INPUT 21806 select cast(pow(2,63) as signed) as pp; 21807 END 21808 OUTPUT 21809 select convert(pow(2, 63), signed) as pp from dual 21810 END 21811 INPUT 21812 select concat(2,3); 21813 END 21814 OUTPUT 21815 select concat(2, 3) from dual 21816 END 21817 INPUT 21818 select from t1 where text1='teststring' or text1 like 'teststring_%'; 21819 END 21820 ERROR 21821 syntax error at position 12 near 'from' 21822 END 21823 INPUT 21824 select date_format('1998-12-31','%x-%v'),date_format('1999-01-01','%x-%v'); 21825 END 21826 OUTPUT 21827 select date_format('1998-12-31', '%x-%v'), date_format('1999-01-01', '%x-%v') from dual 21828 END 21829 INPUT 21830 select find_in_set(f1,f1) as a from t1,(select find_in_set(f1,f1) as b from t1) a; 21831 END 21832 OUTPUT 21833 select find_in_set(f1, f1) as a from t1, (select find_in_set(f1, f1) as b from t1) as a 21834 END 21835 INPUT 21836 select group_concat(hex(c1) order by hex(c1)) from t1 group by c1; 21837 END 21838 OUTPUT 21839 select group_concat(hex(c1) order by hex(c1) asc) from t1 group by c1 21840 END 21841 INPUT 21842 select mbrtouches(ST_GeomFromText("linestring(3 2, 4 2)"), ST_GeomFromText("polygon((0 0, 3 0, 3 3, 0 3, 0 0))")); 21843 END 21844 OUTPUT 21845 select mbrtouches(ST_GeomFromText('linestring(3 2, 4 2)'), ST_GeomFromText('polygon((0 0, 3 0, 3 3, 0 3, 0 0))')) from dual 21846 END 21847 INPUT 21848 select round(1.1e1, 4294967295), truncate(1.1e1, 4294967295); 21849 END 21850 OUTPUT 21851 select round(1.1e1, 4294967295), truncate(1.1e1, 4294967295) from dual 21852 END 21853 INPUT 21854 select from t1 where i = 3|||| show status like 'Slow_queries'|||| drop table t1|||| delimiter; 21855 END 21856 ERROR 21857 syntax error at position 12 near 'from' 21858 END 21859 INPUT 21860 select count(*) from t1 where match a against ('aaaxxx aaayyy aaazzz'); 21861 END 21862 ERROR 21863 syntax error at position 38 near 'a' 21864 END 21865 INPUT 21866 select a.f1 as a, b.f2 as b, a.f1 > b.f2 as gt, a.f1 < b.f2 as lt, a.f1<=>b.f2 as eq from t1 a, t1 b; 21867 END 21868 OUTPUT 21869 select a.f1 as a, b.f2 as b, a.f1 > b.f2 as gt, a.f1 < b.f2 as lt, a.f1 <=> b.f2 as eq from t1 as a, t1 as b 21870 END 21871 INPUT 21872 select FIND_IN_SET(_latin1'B',_latin2'a,b,c,d'); 21873 END 21874 OUTPUT 21875 select FIND_IN_SET(_latin1 'B', _latin2 'a,b,c,d') from dual 21876 END 21877 INPUT 21878 select date,format,concat(str_to_date(date, format),'') as con from t1; 21879 END 21880 OUTPUT 21881 select `date`, `format`, concat(str_to_date(`date`, `format`), '') as con from t1 21882 END 21883 INPUT 21884 select hex(cast('a' as char(2) binary)); 21885 END 21886 ERROR 21887 syntax error at position 38 near 'binary' 21888 END 21889 INPUT 21890 select i, count(*), round(std(o1/o2), 16) from bug22555 group by i order by i; 21891 END 21892 OUTPUT 21893 select i, count(*), round(std(o1 / o2), 16) from bug22555 group by i order by i asc 21894 END 21895 INPUT 21896 select date_format("1997-01-02", concat("%M %W %D ","%Y %y %m %d %h %i %s %w")); 21897 END 21898 OUTPUT 21899 select date_format('1997-01-02', concat('%M %W %D ', '%Y %y %m %d %h %i %s %w')) from dual 21900 END 21901 INPUT 21902 select from t1 where a=concat(_koi8r'����'); 21903 END 21904 ERROR 21905 syntax error at position 12 near 'from' 21906 END 21907 INPUT 21908 select id, sum(qty) as sqty from t1 group by id having sqty>2 and count(qty)>1; 21909 END 21910 OUTPUT 21911 select id, sum(qty) as sqty from t1 group by id having sqty > 2 and count(qty) > 1 21912 END 21913 INPUT 21914 select if( @stamp1 = @stamp2, "correct", "wrong"); 21915 END 21916 OUTPUT 21917 select if(@stamp1 = @stamp2, 'correct', 'wrong') from dual 21918 END 21919 INPUT 21920 select distinct b from t3 group by a order by 1; 21921 END 21922 OUTPUT 21923 select distinct b from t3 group by a order by 1 asc 21924 END 21925 INPUT 21926 select 1, min(1) from t1m where a=99; 21927 END 21928 OUTPUT 21929 select 1, min(1) from t1m where a = 99 21930 END 21931 INPUT 21932 select timestampdiff(month,'2004-09-11','2007-09-11'); 21933 END 21934 OUTPUT 21935 select timestampdiff(month, '2004-09-11', '2007-09-11') from dual 21936 END 21937 INPUT 21938 select min(7) from t2m join t1m; 21939 END 21940 OUTPUT 21941 select min(7) from t2m join t1m 21942 END 21943 INPUT 21944 select 'events_logs_tests' as outside_event; 21945 END 21946 OUTPUT 21947 select 'events_logs_tests' as outside_event from dual 21948 END 21949 INPUT 21950 select 1, max(1) from t1m where a=99; 21951 END 21952 OUTPUT 21953 select 1, max(1) from t1m where a = 99 21954 END 21955 INPUT 21956 select timediff("1997-12-30 23:59:59.000001","1997-12-31 23:59:59.000002"); 21957 END 21958 OUTPUT 21959 select timediff('1997-12-30 23:59:59.000001', '1997-12-31 23:59:59.000002') from dual 21960 END 21961 INPUT 21962 select hex(convert(_eucjpms 0xA5FE41 using ucs2)); 21963 END 21964 OUTPUT 21965 select hex(convert(_eucjpms 0xA5FE41 using ucs2)) from dual 21966 END 21967 INPUT 21968 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_icelandic_ci; 21969 END 21970 OUTPUT 21971 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_icelandic_ci 21972 END 21973 INPUT 21974 select hex(substr(_utf16 0x00e400e5D800DC00,-1)); 21975 END 21976 OUTPUT 21977 select hex(substr(_utf16 0x00e400e5D800DC00, -1)) from dual 21978 END 21979 INPUT 21980 select hex(quote(concat(char(224),char(227),char(230),char(231),char(232),char(234),char(235)))); 21981 END 21982 OUTPUT 21983 select hex(quote(concat(char(224), char(227), char(230), char(231), char(232), char(234), char(235)))) from dual 21984 END 21985 INPUT 21986 select s1 as after_delete_general_ci from t1 where s1 like 'ペテ%'; 21987 END 21988 OUTPUT 21989 select s1 as after_delete_general_ci from t1 where s1 like 'ペテ%' 21990 END 21991 INPUT 21992 select ST_astext(ST_UNION(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))); 21993 END 21994 OUTPUT 21995 select ST_astext(ST_UNION(ST_GeomFromText('POLYGON((0 0, 50 45, 40 50, 0 0))'), ST_GeomFromText('LINESTRING(-10 -10, 200 200, 199 201, -11 -9)'))) from dual 21996 END 21997 INPUT 21998 select substring_index('.tcx.se','.',-2),substring_index('.tcx.se','.tcx',-1); 21999 END 22000 OUTPUT 22001 select substring_index('.tcx.se', '.', -2), substring_index('.tcx.se', '.tcx', -1) from dual 22002 END 22003 INPUT 22004 select a1,min(c),max(c) from t1 where a1 >= 'b' group by a1,a2,b; 22005 END 22006 OUTPUT 22007 select a1, min(c), max(c) from t1 where a1 >= 'b' group by a1, a2, b 22008 END 22009 INPUT 22010 select a1,a2,b,min(c),max(c) from t2 where (a1 >= 'c' or a2 < 'b') and (c > 'b111') group by a1,a2,b; 22011 END 22012 OUTPUT 22013 select a1, a2, b, min(c), max(c) from t2 where (a1 >= 'c' or a2 < 'b') and c > 'b111' group by a1, a2, b 22014 END 22015 INPUT 22016 select extract(SECOND FROM "1999-01-02 10:11:12"); 22017 END 22018 OUTPUT 22019 select extract(second from '1999-01-02 10:11:12') from dual 22020 END 22021 INPUT 22022 select id-5,facility from t1 order by "id-5"; 22023 END 22024 OUTPUT 22025 select id - 5, facility from t1 order by 'id-5' asc 22026 END 22027 INPUT 22028 select insert('hello', -18446744073709551617, 1, 'hi'); 22029 END 22030 ERROR 22031 syntax error at position 14 near 'insert' 22032 END 22033 INPUT 22034 select 'a' like 'a'; 22035 END 22036 OUTPUT 22037 select 'a' like 'a' from dual 22038 END 22039 INPUT 22040 select col1,sum(col1),max(col1),min(col1) from t1 group by col1; 22041 END 22042 OUTPUT 22043 select col1, sum(col1), max(col1), min(col1) from t1 group by col1 22044 END 22045 INPUT 22046 select count(*) from t1 where match a against ('aaazzz'); 22047 END 22048 ERROR 22049 syntax error at position 38 near 'a' 22050 END 22051 INPUT 22052 select round(4, cast(-2 as unsigned)), round(4, 18446744073709551614), round(4, -2); 22053 END 22054 OUTPUT 22055 select round(4, convert(-2, unsigned)), round(4, 18446744073709551614), round(4, -2) from dual 22056 END 22057 INPUT 22058 select cast(sum(distinct df) as signed) from t1; 22059 END 22060 OUTPUT 22061 select convert(sum(distinct df), signed) from t1 22062 END 22063 INPUT 22064 select @@optimizer_prune_level; 22065 END 22066 OUTPUT 22067 select @@optimizer_prune_level from dual 22068 END 22069 INPUT 22070 select count(*) from t1 where match a against ('aaaxxx aaayyy aaazzz' in boolean mode); 22071 END 22072 ERROR 22073 syntax error at position 38 near 'a' 22074 END 22075 INPUT 22076 select concat(c1, repeat('xx', 250)) as cc from t2 group by cc order by 1; 22077 END 22078 OUTPUT 22079 select concat(c1, repeat('xx', 250)) as cc from t2 group by cc order by 1 asc 22080 END 22081 INPUT 22082 select 1 and 2 between 2 and 10, 2 between 2 and 10 and 1; 22083 END 22084 OUTPUT 22085 select 1 and 2 between 2 and 10, 2 between 2 and 10 and 1 from dual 22086 END 22087 INPUT 22088 select count(distinct (f1+1)) from t1 group by f1 with rollup; 22089 END 22090 ERROR 22091 syntax error at position 55 near 'with' 22092 END 22093 INPUT 22094 select -9223372036854775808; 22095 END 22096 OUTPUT 22097 select -9223372036854775808 from dual 22098 END 22099 INPUT 22100 select 1 from (select 2) a order by 0; 22101 END 22102 OUTPUT 22103 select 1 from (select 2 from dual) as a order by 0 asc 22104 END 22105 INPUT 22106 select 0xac14aa84f000d276d66ed9 like '%-107%'; 22107 END 22108 OUTPUT 22109 select 0xac14aa84f000d276d66ed9 like '%-107%' from dual 22110 END 22111 INPUT 22112 select 12%NULL as 'NULL'; 22113 END 22114 OUTPUT 22115 select 12 % null as `NULL` from dual 22116 END 22117 INPUT 22118 select min(a3) from t1 where a2 = 2 and a3 >= 'CHI' and a3 < 'SEA'; 22119 END 22120 OUTPUT 22121 select min(a3) from t1 where a2 = 2 and a3 >= 'CHI' and a3 < 'SEA' 22122 END 22123 INPUT 22124 select from t1 where lower(b)='bbb'; 22125 END 22126 ERROR 22127 syntax error at position 12 near 'from' 22128 END 22129 INPUT 22130 select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (c > 'b111') group by a1,a2,b; 22131 END 22132 OUTPUT 22133 select a1, a2, b, min(c), max(c) from t1 where (a1 >= 'c' or a2 < 'b') and c > 'b111' group by a1, a2, b 22134 END 22135 INPUT 22136 select (case 1/0 when "a" then "true" END) + 0.0; 22137 END 22138 OUTPUT 22139 select case 1 / 0 when 'a' then 'true' end + 0.0 from dual 22140 END 22141 INPUT 22142 select from t1 where a like 'c%'; 22143 END 22144 ERROR 22145 syntax error at position 12 near 'from' 22146 END 22147 INPUT 22148 select from t1 where MATCH a,b AGAINST ('"Now sUPPort"' IN BOOLEAN MODE); 22149 END 22150 ERROR 22151 syntax error at position 12 near 'from' 22152 END 22153 INPUT 22154 select sum(all a),count(all a),avg(all a),std(all a),variance(all a),bit_or(all a),bit_and(all a),min(all a),max(all a),min(all c),max(all c) from t1; 22155 END 22156 ERROR 22157 syntax error at position 15 near 'all' 22158 END 22159 INPUT 22160 select BIN(a) from t1; 22161 END 22162 OUTPUT 22163 select BIN(a) from t1 22164 END 22165 INPUT 22166 select locate(c1,'�'), locate('�',c1) from t1; 22167 END 22168 OUTPUT 22169 select locate(c1, '�'), locate('�', c1) from t1 22170 END 22171 INPUT 22172 select ST_astext(ST_PolyFromWKB(ST_AsWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(1, 0), Point(0, 0)))))); 22173 END 22174 OUTPUT 22175 select ST_astext(ST_PolyFromWKB(ST_AsWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(1, 0), Point(0, 0)))))) from dual 22176 END 22177 INPUT 22178 select count(*) from `load`; 22179 END 22180 OUTPUT 22181 select count(*) from `load` 22182 END 22183 INPUT 22184 select get_lock('test_bug16407', 60); 22185 END 22186 OUTPUT 22187 select get_lock('test_bug16407', 60) from dual 22188 END 22189 INPUT 22190 select date_add(date,INTERVAL "1" QUARTER) from t1; 22191 END 22192 OUTPUT 22193 select date_add(`date`, interval '1' QUARTER) from t1 22194 END 22195 INPUT 22196 select concat('<', user(), '>'), concat('<', current_user(), '>'), database(); 22197 END 22198 OUTPUT 22199 select concat('<', user(), '>'), concat('<', current_user(), '>'), database() from dual 22200 END 22201 INPUT 22202 select month("1997-01-02"),year("98-02-03"),dayofyear("1997-12-31"); 22203 END 22204 OUTPUT 22205 select month('1997-01-02'), year('98-02-03'), dayofyear('1997-12-31') from dual 22206 END 22207 INPUT 22208 select @topic5_id:= 10105; 22209 END 22210 ERROR 22211 syntax error at position 19 near ':' 22212 END 22213 INPUT 22214 select max(b) from t1 where a = 2; 22215 END 22216 OUTPUT 22217 select max(b) from t1 where a = 2 22218 END 22219 INPUT 22220 select from t1 where length(s1)=1 and s1='oe'; 22221 END 22222 ERROR 22223 syntax error at position 12 near 'from' 22224 END 22225 INPUT 22226 select c,table_name from v1 left join information_schema.TABLES v2 on (v1.c=v2.table_name) where v1.c rlike "t[1-5]{1}$" order by c; 22227 END 22228 OUTPUT 22229 select c, table_name from v1 left join information_schema.`TABLES` as v2 on v1.c = v2.table_name where v1.c regexp 't[1-5]{1}$' order by c asc 22230 END 22231 INPUT 22232 select row_count(); 22233 END 22234 OUTPUT 22235 select row_count() from dual 22236 END 22237 INPUT 22238 select 1/*!000002*/; 22239 END 22240 ERROR 22241 syntax error at position 20 near '2' 22242 END 22243 INPUT 22244 select 1, min(a) from t1i where a=99; 22245 END 22246 OUTPUT 22247 select 1, min(a) from t1i where a = 99 22248 END 22249 INPUT 22250 select 0 -9223372036854775808 as result; 22251 END 22252 OUTPUT 22253 select 0 - 9223372036854775808 as result from dual 22254 END 22255 INPUT 22256 select SUBSTRING_INDEX(_latin1'abcdabcdabcd',_latin1'd' COLLATE latin1_bin,2); 22257 END 22258 OUTPUT 22259 select SUBSTRING_INDEX(_latin1 'abcdabcdabcd', _latin1 'd' collate latin1_bin, 2) from dual 22260 END 22261 INPUT 22262 select insert('hello', 1, 4294967297, 'hi'); 22263 END 22264 ERROR 22265 syntax error at position 14 near 'insert' 22266 END 22267 INPUT 22268 select last_day('2005-00-01'); 22269 END 22270 OUTPUT 22271 select last_day('2005-00-01') from dual 22272 END 22273 INPUT 22274 select @ujis3 = CONVERT(@utf83 USING ujis); 22275 END 22276 OUTPUT 22277 select @ujis3 = convert(@utf83 using ujis) from dual 22278 END 22279 INPUT 22280 select 1+1,"a",count(*) from t1 where foo in (2); 22281 END 22282 OUTPUT 22283 select 1 + 1, 'a', count(*) from t1 where foo in (2) 22284 END 22285 INPUT 22286 select distinct a from t1 where a >= '1' order by a desc; 22287 END 22288 OUTPUT 22289 select distinct a from t1 where a >= '1' order by a desc 22290 END 22291 INPUT 22292 select char(53647 using utf8); 22293 END 22294 ERROR 22295 syntax error at position 24 near 'using' 22296 END 22297 INPUT 22298 select 'A' like 'a' collate utf8mb4_bin; 22299 END 22300 OUTPUT 22301 select 'A' like 'a' collate utf8mb4_bin from dual 22302 END 22303 INPUT 22304 select subtime("01:00:00.999999", "02:00:00.999998"); 22305 END 22306 OUTPUT 22307 select subtime('01:00:00.999999', '02:00:00.999998') from dual 22308 END 22309 INPUT 22310 select 1, ST_Intersects(ST_GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), ST_GeomFromText('POINT(10 10)')); 22311 END 22312 OUTPUT 22313 select 1, ST_Intersects(ST_GeomFromText('POLYGON((0 0,20 10,10 30, 0 0))'), ST_GeomFromText('POINT(10 10)')) from dual 22314 END 22315 INPUT 22316 select week("0000-00-00"),week(d),week(dt),week(t),week(c) from t1; 22317 END 22318 OUTPUT 22319 select week('0000-00-00'), week(d), week(dt), week(t), week(c) from t1 22320 END 22321 INPUT 22322 select ST_astext(st_difference(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))); 22323 END 22324 OUTPUT 22325 select ST_astext(st_difference(ST_GeomFromText('multipoint(2 2, 3 3)'), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)')))) from dual 22326 END 22327 INPUT 22328 select from v1b; 22329 END 22330 ERROR 22331 syntax error at position 12 near 'from' 22332 END 22333 INPUT 22334 select command_type, argument from mysql.general_log where thread_id = @thread_id; 22335 END 22336 OUTPUT 22337 select command_type, argument from mysql.general_log where thread_id = @thread_id 22338 END 22339 INPUT 22340 select from t1 where a like binary "%�%"; 22341 END 22342 ERROR 22343 syntax error at position 12 near 'from' 22344 END 22345 INPUT 22346 select a1,a2,b,min(c),max(c) from t1 where (c > 'b111') and (c <= 'g112') group by a1,a2,b; 22347 END 22348 OUTPUT 22349 select a1, a2, b, min(c), max(c) from t1 where c > 'b111' and c <= 'g112' group by a1, a2, b 22350 END 22351 INPUT 22352 select date_sub("1998-01-01 00:00:00",INTERVAL 1 MINUTE); 22353 END 22354 OUTPUT 22355 select date_sub('1998-01-01 00:00:00', interval 1 MINUTE) from dual 22356 END 22357 INPUT 22358 select length(repeat("a",65500)),length(concat(repeat("a",32000),repeat("a",32000))),length(replace("aaaaa","a",concat(repeat("a",10000)))),length(insert(repeat("a",40000),1,30000,repeat("b",50000))); 22359 END 22360 ERROR 22361 syntax error at position 154 near 'insert' 22362 END 22363 INPUT 22364 select date_add(date,INTERVAL 1 HOUR) from t1; 22365 END 22366 OUTPUT 22367 select date_add(`date`, interval 1 HOUR) from t1 22368 END 22369 INPUT 22370 select hex(weight_string(ch)) w, name from t1 order by concat(ch); 22371 END 22372 OUTPUT 22373 select hex(weight_string(ch)) as w, `name` from t1 order by concat(ch) asc 22374 END 22375 INPUT 22376 select 10+'a'; 22377 END 22378 OUTPUT 22379 select 10 + 'a' from dual 22380 END 22381 INPUT 22382 select cast(concat('184467440','73709551615') as signed); 22383 END 22384 OUTPUT 22385 select convert(concat('184467440', '73709551615'), signed) from dual 22386 END 22387 INPUT 22388 select from t3 left join (t2 outr2 join t2 outr join t1) on (outr.pk = t3.pk) and (t1.col_int_key = t3.pk) and isnull(t1.col_date_key) and (outr2.pk <> t3.pk); 22389 END 22390 ERROR 22391 syntax error at position 12 near 'from' 22392 END 22393 INPUT 22394 select group_concat(c1 order by c1) from t1 group by c1 collate utf8_roman_ci; 22395 END 22396 OUTPUT 22397 select group_concat(c1 order by c1 asc) from t1 group by c1 collate utf8_roman_ci 22398 END 22399 INPUT 22400 select distinct s,n1,vs from t1; 22401 END 22402 OUTPUT 22403 select distinct s, n1, vs from t1 22404 END 22405 INPUT 22406 select 1 from t1 where match(a) against ('water' in boolean mode) and b>='2008-08-01'; 22407 END 22408 OUTPUT 22409 select 1 from t1 where match(a) against ('water' in boolean mode) and b >= '2008-08-01' 22410 END 22411 INPUT 22412 select a1,a2,b,min(c),max(c) from t1 where (c between 'b111' and 'g112') or (c between 'd000' and 'i110') group by a1,a2,b; 22413 END 22414 OUTPUT 22415 select a1, a2, b, min(c), max(c) from t1 where c between 'b111' and 'g112' or c between 'd000' and 'i110' group by a1, a2, b 22416 END 22417 INPUT 22418 select min(big),max(big),max(big)-1 from t1 group by a; 22419 END 22420 OUTPUT 22421 select min(big), max(big), max(big) - 1 from t1 group by a 22422 END 22423 INPUT 22424 select SCHEMA_NAME from information_schema.schemata where schema_name='имя_базы_в_кодировке_утф8_длиной_больше_чем_45'; 22425 END 22426 OUTPUT 22427 select SCHEMA_NAME from information_schema.schemata where schema_name = 'имя_базы_в_кодировке_утф8_длиной_больше_чем_45' 22428 END 22429 INPUT 22430 select char(0xd18f using utf8mb4); 22431 END 22432 ERROR 22433 syntax error at position 25 near 'using' 22434 END 22435 INPUT 22436 select st_within(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))); 22437 END 22438 OUTPUT 22439 select st_within(st_intersection(ST_GeomFromText('point(1 1)'), ST_GeomFromText('multipoint(2 2, 3 3)')), st_intersection(ST_GeomFromText('point(0 0)'), ST_GeomFromText('point(1 1)'))) from dual 22440 END 22441 INPUT 22442 select distinct a,c from t1 group by b,c,a having a > 2 order by a desc; 22443 END 22444 OUTPUT 22445 select distinct a, c from t1 group by b, c, a having a > 2 order by a desc 22446 END 22447 INPUT 22448 select count(*) from t1 where name='Matt'; 22449 END 22450 OUTPUT 22451 select count(*) from t1 where `name` = 'Matt' 22452 END 22453 INPUT 22454 select max(t2.a1), max(t1.a1) from t1, t2 where t2.a2=9; 22455 END 22456 OUTPUT 22457 select max(t2.a1), max(t1.a1) from t1, t2 where t2.a2 = 9 22458 END 22459 INPUT 22460 select unix_timestamp('1969-12-01 19:00:01'); 22461 END 22462 OUTPUT 22463 select unix_timestamp('1969-12-01 19:00:01') from dual 22464 END 22465 INPUT 22466 select timestampdiff(month,'2004-09-11','2005-09-11'); 22467 END 22468 OUTPUT 22469 select timestampdiff(month, '2004-09-11', '2005-09-11') from dual 22470 END 22471 INPUT 22472 select "aba" regexp concat("^","a"); 22473 END 22474 OUTPUT 22475 select 'aba' regexp concat('^', 'a') from dual 22476 END 22477 INPUT 22478 select substring('hello', 1, 18446744073709551617); 22479 END 22480 OUTPUT 22481 select substr('hello', 1, 18446744073709551617) from dual 22482 END 22483 INPUT 22484 select ST_Intersects(ST_GeomFromText('LINESTRING(15 10,10 0)'),ST_GeomFromText('POINT(15 10)')) as result; 22485 END 22486 OUTPUT 22487 select ST_Intersects(ST_GeomFromText('LINESTRING(15 10,10 0)'), ST_GeomFromText('POINT(15 10)')) as result from dual 22488 END 22489 INPUT 22490 select date_add(date,INTERVAL 1 SECOND) from t1; 22491 END 22492 OUTPUT 22493 select date_add(`date`, interval 1 SECOND) from t1 22494 END 22495 INPUT 22496 select from t1 order by i1; 22497 END 22498 ERROR 22499 syntax error at position 12 near 'from' 22500 END 22501 INPUT 22502 select from t5 /bin /boot /cdrom /dev /etc /home /lib /lib32 /lib64 /libx32 /lost+found /media /mnt /opt /proc /root /run /sbin /snap /srv /swapfile /sys /tmp /usr /var must be (1),(1) */; 22503 END 22504 ERROR 22505 syntax error at position 12 near 'from' 22506 END 22507 INPUT 22508 select concat("-",a,"-",b,"-") from t1 ignore index (a) where a="hello "; 22509 END 22510 OUTPUT 22511 select concat('-', a, '-', b, '-') from t1 ignore index (a) where a = 'hello ' 22512 END 22513 INPUT 22514 select *, f1 = f2 from t1; 22515 END 22516 OUTPUT 22517 select *, f1 = f2 from t1 22518 END 22519 INPUT 22520 select @x; 22521 END 22522 OUTPUT 22523 select @x from dual 22524 END 22525 INPUT 22526 select f1(1); 22527 END 22528 OUTPUT 22529 select f1(1) from dual 22530 END 22531 INPUT 22532 select from t1 where a > 5 and not(a > 10); 22533 END 22534 ERROR 22535 syntax error at position 12 near 'from' 22536 END 22537 INPUT 22538 select _ujis 0xa1a2a1a3 like concat(_ujis'%',_ujis 0xa2a1, _ujis'%'); 22539 END 22540 OUTPUT 22541 select _ujis 0xa1a2a1a3 like concat(_ujis '%', _ujis 0xa2a1, _ujis '%') from dual 22542 END 22543 INPUT 22544 select substring_index('aaaaaaaaa1','aa',2); 22545 END 22546 OUTPUT 22547 select substring_index('aaaaaaaaa1', 'aa', 2) from dual 22548 END 22549 INPUT 22550 select fld3 from t2 order by fld3 desc limit 10; 22551 END 22552 OUTPUT 22553 select fld3 from t2 order by fld3 desc limit 10 22554 END 22555 INPUT 22556 select format(atan(-2, 2), 6); 22557 END 22558 OUTPUT 22559 select format(atan(-2, 2), 6) from dual 22560 END 22561 INPUT 22562 select hex(-29223372036854775809) as hex_signed, hex(cast(-29223372036854775809 as unsigned)) as hex_unsigned; 22563 END 22564 OUTPUT 22565 select hex(-29223372036854775809) as hex_signed, hex(convert(-29223372036854775809, unsigned)) as hex_unsigned from dual 22566 END 22567 INPUT 22568 select format(pi(), (1+1)); 22569 END 22570 OUTPUT 22571 select format(pi(), 1 + 1) from dual 22572 END 22573 INPUT 22574 select str_to_date(concat('15-01-2001',' 2:59:58.999'), concat('%d-%m-%Y',' ','%H:%i:%s.%f')); 22575 END 22576 OUTPUT 22577 select str_to_date(concat('15-01-2001', ' 2:59:58.999'), concat('%d-%m-%Y', ' ', '%H:%i:%s.%f')) from dual 22578 END 22579 INPUT 22580 select cast('18446744073709551615' as unsigned); 22581 END 22582 OUTPUT 22583 select convert('18446744073709551615', unsigned) from dual 22584 END 22585 INPUT 22586 select from t1 where s1 > 'd' and s1 = 'CH'; 22587 END 22588 ERROR 22589 syntax error at position 12 near 'from' 22590 END 22591 INPUT 22592 select benchmark(100, (select avg(a) from table_26093)); 22593 END 22594 OUTPUT 22595 select benchmark(100, (select avg(a) from table_26093)) from dual 22596 END 22597 INPUT 22598 select date(left(f1+0,8)) from t1 group by 1; 22599 END 22600 OUTPUT 22601 select date(left(f1 + 0, 8)) from t1 group by 1 22602 END 22603 INPUT 22604 select @@GLOBAL.expire_logs_days into @save_expire_logs_days; 22605 END 22606 ERROR 22607 syntax error at position 61 near 'save_expire_logs_days' 22608 END 22609 INPUT 22610 select from t1 where a=if(b<10,_ucs2 0x0062,_ucs2 0x00C0); 22611 END 22612 ERROR 22613 syntax error at position 12 near 'from' 22614 END 22615 INPUT 22616 select distinct left(name,1) as name from t1; 22617 END 22618 OUTPUT 22619 select distinct left(`name`, 1) as `name` from t1 22620 END 22621 INPUT 22622 select @@character_set_filesystem; 22623 END 22624 OUTPUT 22625 select @@character_set_filesystem from dual 22626 END 22627 INPUT 22628 select ctime, hour(ctime) from t1; 22629 END 22630 OUTPUT 22631 select ctime, hour(ctime) from t1 22632 END 22633 INPUT 22634 select from t1 order by (oct(a)); 22635 END 22636 ERROR 22637 syntax error at position 12 near 'from' 22638 END 22639 INPUT 22640 select hex(char(0x010203 using utf32)); 22641 END 22642 ERROR 22643 syntax error at position 31 near 'using' 22644 END 22645 INPUT 22646 select ST_geometryfromtext(b) IS NULL, ST_geometryfromwkb(b) IS NULL, ST_astext(b) IS NULL, ST_aswkb(b) IS NULL, ST_geometrytype(b) IS NULL, ST_centroid(b) IS NULL, ST_envelope(b) IS NULL, ST_startpoint(b) IS NULL, ST_endpoint(b) IS NULL, ST_exteriorring(b) IS NULL, ST_pointn(b, 1) IS NULL, ST_geometryn(b, 1) IS NULL, ST_interiorringn(b, 1) IS NULL, multipoint(b) IS NULL, ST_isempty(b) IS NULL, ST_issimple(b) IS NULL, ST_isclosed(b) IS NULL, ST_dimension(b) IS NULL, ST_numgeometries(b) IS NULL, ST_numinteriorrings(b) IS NULL, ST_numpoints(b) IS NULL, ST_area(b) IS NULL, ST_length(b) IS NULL, ST_srid(b) IS NULL, ST_x(b) IS NULL, ST_y(b) IS NULL from t1; 22647 END 22648 OUTPUT 22649 select ST_geometryfromtext(b) is null, ST_geometryfromwkb(b) is null, ST_astext(b) is null, ST_aswkb(b) is null, ST_geometrytype(b) is null, ST_centroid(b) is null, ST_envelope(b) is null, ST_startpoint(b) is null, ST_endpoint(b) is null, ST_exteriorring(b) is null, ST_pointn(b, 1) is null, ST_geometryn(b, 1) is null, ST_interiorringn(b, 1) is null, multipoint(b) is null, ST_isempty(b) is null, ST_issimple(b) is null, ST_isclosed(b) is null, ST_dimension(b) is null, ST_numgeometries(b) is null, ST_numinteriorrings(b) is null, ST_numpoints(b) is null, ST_area(b) is null, ST_length(b) is null, ST_srid(b) is null, ST_x(b) is null, ST_y(b) is null from t1 22650 END 22651 INPUT 22652 select inet6_ntoa(null),inet6_aton(null); 22653 END 22654 OUTPUT 22655 select inet6_ntoa(null), inet6_aton(null) from dual 22656 END 22657 INPUT 22658 select timestampdiff(SQL_TSI_MINUTE, '2001-02-01 12:59:59', '2001-05-01 12:58:59') as a; 22659 END 22660 OUTPUT 22661 select timestampdiff(SQL_TSI_MINUTE, '2001-02-01 12:59:59', '2001-05-01 12:58:59') as a from dual 22662 END 22663 INPUT 22664 select date_add("1997-12-31 23:59:59",INTERVAL 100000 SECOND); 22665 END 22666 OUTPUT 22667 select date_add('1997-12-31 23:59:59', interval 100000 SECOND) from dual 22668 END 22669 INPUT 22670 select n,d,unix_timestamp(t) from t2; 22671 END 22672 OUTPUT 22673 select n, d, unix_timestamp(t) from t2 22674 END 22675 INPUT 22676 select date_add('1998-01-30',Interval '2:1' year_month); 22677 END 22678 OUTPUT 22679 select date_add('1998-01-30', interval '2:1' year_month) from dual 22680 END 22681 INPUT 22682 select substring('abc', cast(2 as unsigned int)); 22683 END 22684 ERROR 22685 syntax error at position 47 near 'int' 22686 END 22687 INPUT 22688 select length(a) from t1; 22689 END 22690 OUTPUT 22691 select length(a) from t1 22692 END 22693 INPUT 22694 select min(a) from t1 group by inet_ntoa(a); 22695 END 22696 OUTPUT 22697 select min(a) from t1 group by inet_ntoa(a) 22698 END 22699 INPUT 22700 select _latin1'B' between _latin1'a' and _latin2'b'; 22701 END 22702 OUTPUT 22703 select _latin1 'B' between _latin1 'a' and _latin2 'b' from dual 22704 END 22705 INPUT 22706 select a1,a2,b, max(c) from t2 where (c < 'a0') or (c > 'b1') group by a1,a2,b; 22707 END 22708 OUTPUT 22709 select a1, a2, b, max(c) from t2 where c < 'a0' or c > 'b1' group by a1, a2, b 22710 END 22711 INPUT 22712 select count(*) from information_schema.events; 22713 END 22714 OUTPUT 22715 select count(*) from information_schema.events 22716 END 22717 INPUT 22718 select var_samp(s) as 'null', var_pop(s) as 'null' from bug22555; 22719 END 22720 OUTPUT 22721 select var_samp(s) as `null`, var_pop(s) as `null` from bug22555 22722 END 22723 INPUT 22724 select get_format(TIME, 'internal') as a; 22725 END 22726 OUTPUT 22727 select get_format(`TIME`, 'internal') as a from dual 22728 END 22729 INPUT 22730 select repeat('hello', 4294967295); 22731 END 22732 OUTPUT 22733 select repeat('hello', 4294967295) from dual 22734 END 22735 INPUT 22736 select from t1 where word like binary 0xDF; 22737 END 22738 ERROR 22739 syntax error at position 12 near 'from' 22740 END 22741 INPUT 22742 select count(*), min(7), max(7) from t2m, t1i; 22743 END 22744 OUTPUT 22745 select count(*), min(7), max(7) from t2m, t1i 22746 END 22747 INPUT 22748 select from t1 left join t2 on t1.a=t2.a where not (t2.a <=> t1.a); 22749 END 22750 ERROR 22751 syntax error at position 12 near 'from' 22752 END 22753 INPUT 22754 select 'aa' like 'a%'; 22755 END 22756 OUTPUT 22757 select 'aa' like 'a%' from dual 22758 END 22759 INPUT 22760 select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20)))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17))'))) as result; 22761 END 22762 OUTPUT 22763 select ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((0 -14,13 -8),(-5 -3,8 7),(-6 18,17 -11,-12 19,19 5),(16 11,9 -5),(17 -5,5 10),(-4 17,6 4),(-12 15,17 13,-18 11,15 10),(7 0,2 -16,-18 13,-6 4),(-17 -6,-6 -7,1 4,-18 0)),MULTILINESTRING((-11 -2,17 -14),(18 -12,18 -8),(-13 -16,9 16,9 -10,-7 20),(-14 -5,10 -9,4 1,17 -8),(-9 -4,-2 -12,9 -13,-5 4),(15 17,13 20)))'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTILINESTRING((-13 -18,-16 0),(17 11,-1 11,-18 -19,-4 -18),(-8 -8,-15 -13,3 -18,6 8)),LINESTRING(5 16,0 -9,-6 4,-15 17))'))) as result from dual 22764 END 22765 INPUT 22766 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf32_esperanto_ci; 22767 END 22768 OUTPUT 22769 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf32_esperanto_ci 22770 END 22771 INPUT 22772 select hex(29223372036854775809) as hex_signed, hex(cast(29223372036854775809 as unsigned)) as hex_unsigned; 22773 END 22774 OUTPUT 22775 select hex(29223372036854775809) as hex_signed, hex(convert(29223372036854775809, unsigned)) as hex_unsigned from dual 22776 END 22777 INPUT 22778 select object_id, ST_geometrytype(geo), ST_ISSIMPLE(GEO), ST_ASTEXT(ST_centroid(geo)) from t1 where object_id=85998; 22779 END 22780 OUTPUT 22781 select object_id, ST_geometrytype(geo), ST_ISSIMPLE(GEO), ST_ASTEXT(ST_centroid(geo)) from t1 where object_id = 85998 22782 END 22783 INPUT 22784 select hex(cast(9007199254740994 as decimal(30,0))); 22785 END 22786 OUTPUT 22787 select hex(convert(9007199254740994, decimal(30, 0))) from dual 22788 END 22789 INPUT 22790 select 98 + count(distinct a1,a2,b) from t1 where (a1 > 'a') and (a2 > 'a'); 22791 END 22792 OUTPUT 22793 select 98 + count(distinct a1, a2, b) from t1 where a1 > 'a' and a2 > 'a' 22794 END 22795 INPUT 22796 select left('hello', 4294967297); 22797 END 22798 OUTPUT 22799 select left('hello', 4294967297) from dual 22800 END 22801 INPUT 22802 select count(*) from sakila.film_text; 22803 END 22804 OUTPUT 22805 select count(*) from sakila.film_text 22806 END 22807 INPUT 22808 select date_format("1997-12-31 23:59:59.000002", "%f"); 22809 END 22810 OUTPUT 22811 select date_format('1997-12-31 23:59:59.000002', '%f') from dual 22812 END 22813 INPUT 22814 select domain from t1 where concat('@', trim(leading '.' from concat('.', domain))) = '@test.de'; 22815 END 22816 ERROR 22817 syntax error at position 62 near 'from' 22818 END 22819 INPUT 22820 select from t1 natural left join (t4 natural join t5) where t4.y > 7; 22821 END 22822 ERROR 22823 syntax error at position 12 near 'from' 22824 END 22825 INPUT 22826 select release_lock("test_lock2_1"); 22827 END 22828 OUTPUT 22829 select release_lock('test_lock2_1') from dual 22830 END 22831 INPUT 22832 select from t1 where misc > 5 and bool is null; 22833 END 22834 ERROR 22835 syntax error at position 12 near 'from' 22836 END 22837 INPUT 22838 select from (select from t3 natural join t4) as t34 natural right join (select from t1 natural join t2) as t12; 22839 END 22840 ERROR 22841 syntax error at position 12 near 'from' 22842 END 22843 INPUT 22844 select from t7 where concat(s1 collate latin1_general_ci,s1 collate latin1_swedish_ci) = 'AA'; 22845 END 22846 ERROR 22847 syntax error at position 12 near 'from' 22848 END 22849 INPUT 22850 select from (select from t1 union all select from t1) a; 22851 END 22852 ERROR 22853 syntax error at position 12 near 'from' 22854 END 22855 INPUT 22856 select coalesce('�',c1), coalesce(null,c1) from t1; 22857 END 22858 OUTPUT 22859 select coalesce('�', c1), coalesce(null, c1) from t1 22860 END 22861 INPUT 22862 select val, count(*) from t1 group by val; 22863 END 22864 OUTPUT 22865 select val, count(*) from t1 group by val 22866 END 22867 INPUT 22868 select aes_encrypt(NULL,"a"); 22869 END 22870 OUTPUT 22871 select aes_encrypt(null, 'a') from dual 22872 END 22873 INPUT 22874 select FIELD('B','A','B'); 22875 END 22876 OUTPUT 22877 select FIELD('B', 'A', 'B') from dual 22878 END 22879 INPUT 22880 select hex(@utf84:= CONVERT(@ujis4 USING utf8)); 22881 END 22882 ERROR 22883 syntax error at position 19 near ':' 22884 END 22885 INPUT 22886 select (select dt.a from (select 1 as a, t2.a as b from t2 having t1.a) dt where dt.b=t1.a) as subq from t1; 22887 END 22888 OUTPUT 22889 select (select dt.a from (select 1 as a, t2.a as b from t2 having t1.a) as dt where dt.b = t1.a) as subq from t1 22890 END 22891 INPUT 22892 select hex(unhex("1")), hex(unhex("12")), hex(unhex("123")), hex(unhex("1234")), hex(unhex("12345")), hex(unhex("123456")); 22893 END 22894 OUTPUT 22895 select hex(unhex('1')), hex(unhex('12')), hex(unhex('123')), hex(unhex('1234')), hex(unhex('12345')), hex(unhex('123456')) from dual 22896 END 22897 INPUT 22898 select count(*) from t1; 22899 END 22900 OUTPUT 22901 select count(*) from t1 22902 END 22903 INPUT 22904 select FROM t4 where fld3='bonfire'; 22905 END 22906 ERROR 22907 syntax error at position 12 near 'FROM' 22908 END 22909 INPUT 22910 select ST_AsText(a) from t1 where MBRContains(ST_GeomFromText('Polygon((0 0, 0 2, 2 2, 2 0, 0 0))'), a) and MBRContains(ST_GeomFromText('Polygon((0 0, 0 7, 7 7, 7 0, 0 0))'), a); 22911 END 22912 OUTPUT 22913 select ST_AsText(a) from t1 where MBRContains(ST_GeomFromText('Polygon((0 0, 0 2, 2 2, 2 0, 0 0))'), a) and MBRContains(ST_GeomFromText('Polygon((0 0, 0 7, 7 7, 7 0, 0 0))'), a) 22914 END 22915 INPUT 22916 select group_concat(c1 order by binary c1 separator '') from t1 group by c1 collate utf16_spanish_ci; 22917 END 22918 OUTPUT 22919 select group_concat(c1 order by binary c1 asc separator '') from t1 group by c1 collate utf16_spanish_ci 22920 END 22921 INPUT 22922 select cast('1.2' as decimal(3,2)); 22923 END 22924 OUTPUT 22925 select convert('1.2', decimal(3, 2)) from dual 22926 END 22927 INPUT 22928 select concat(a,if(b>10,_ucs2 0x0061,_ucs2 0x0062)) from t1; 22929 END 22930 OUTPUT 22931 select concat(a, if(b > 10, _ucs2 0x0061, _ucs2 0x0062)) from t1 22932 END 22933 INPUT 22934 select date_add("1997-12-31 23:59:59",INTERVAL 100000 MONTH); 22935 END 22936 OUTPUT 22937 select date_add('1997-12-31 23:59:59', interval 100000 MONTH) from dual 22938 END 22939 INPUT 22940 select from t2 order by name; 22941 END 22942 ERROR 22943 syntax error at position 12 near 'from' 22944 END 22945 INPUT 22946 select RANDOM_BYTES(0); 22947 END 22948 OUTPUT 22949 select RANDOM_BYTES(0) from dual 22950 END 22951 INPUT 22952 select a1,a2,b,min(c),max(c) from t1 where a1 < 'd' group by a1,a2,b; 22953 END 22954 OUTPUT 22955 select a1, a2, b, min(c), max(c) from t1 where a1 < 'd' group by a1, a2, b 22956 END 22957 INPUT 22958 select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a); 22959 END 22960 OUTPUT 22961 select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) 22962 END 22963 INPUT 22964 select t from t1 where t=0xD0B1D0B1212223D0B1D0B1D0B1D0B1; 22965 END 22966 OUTPUT 22967 select t from t1 where t = 0xD0B1D0B1212223D0B1D0B1D0B1D0B1 22968 END 22969 INPUT 22970 select cast('18446744073709551616' as unsigned); 22971 END 22972 OUTPUT 22973 select convert('18446744073709551616', unsigned) from dual 22974 END 22975 INPUT 22976 select 5; 22977 END 22978 OUTPUT 22979 select 5 from dual 22980 END 22981 INPUT 22982 select from t1 where not(NULL or a); 22983 END 22984 ERROR 22985 syntax error at position 12 near 'from' 22986 END 22987 INPUT 22988 select log(-2,1); 22989 END 22990 OUTPUT 22991 select log(-2, 1) from dual 22992 END 22993 INPUT 22994 select least(_latin1'a',_latin2'b',_latin5'c' collate latin5_turkish_ci); 22995 END 22996 OUTPUT 22997 select least(_latin1 'a', _latin2 'b', _latin5 'c' collate latin5_turkish_ci) from dual 22998 END 22999 INPUT 23000 select bar from t1 having instr(group_concat(bar), "test") > 0; 23001 END 23002 OUTPUT 23003 select bar from t1 having instr(group_concat(bar), 'test') > 0 23004 END 23005 INPUT 23006 select substring_index('the king of the the hill',' the ',-1); 23007 END 23008 OUTPUT 23009 select substring_index('the king of the the hill', ' the ', -1) from dual 23010 END 23011 INPUT 23012 select from t6; 23013 END 23014 ERROR 23015 syntax error at position 12 near 'from' 23016 END 23017 INPUT 23018 select from t1 where city = 'Durban '; 23019 END 23020 ERROR 23021 syntax error at position 12 near 'from' 23022 END 23023 INPUT 23024 select max(t1.a1) from t1, t2; 23025 END 23026 OUTPUT 23027 select max(t1.a1) from t1, t2 23028 END 23029 INPUT 23030 select count(a) from t1 where a = 100; 23031 END 23032 OUTPUT 23033 select count(a) from t1 where a = 100 23034 END 23035 INPUT 23036 select hex(weight_string('S')); 23037 END 23038 OUTPUT 23039 select hex(weight_string('S')) from dual 23040 END 23041 INPUT 23042 select hex(cast(0x20000000000000 as decimal(30,0)) + 2); 23043 END 23044 OUTPUT 23045 select hex(convert(0x20000000000000, decimal(30, 0)) + 2) from dual 23046 END 23047 INPUT 23048 select f1 from t1 where cast("2006-1-1" as date) between date(f1) and date(f3); 23049 END 23050 OUTPUT 23051 select f1 from t1 where convert('2006-1-1', date) between date(f1) and date(f3) 23052 END 23053 INPUT 23054 select substring('hello', -4294967295, 1); 23055 END 23056 OUTPUT 23057 select substr('hello', -4294967295, 1) from dual 23058 END 23059 INPUT 23060 select from t1 where value <=> value; 23061 END 23062 ERROR 23063 syntax error at position 12 near 'from' 23064 END 23065 INPUT 23066 select f3 from t1 where f3 between cast("2006-1-1 12:1:1" as datetime) and cast("2006-1-1 12:1:2" as datetime); 23067 END 23068 OUTPUT 23069 select f3 from t1 where f3 between convert('2006-1-1 12:1:1', datetime) and convert('2006-1-1 12:1:2', datetime) 23070 END 23071 INPUT 23072 select from t1 left join t2 on venue_id = entity_id where match(name) against('aberdeen') and dt = '2003-05-23 19:30:00'; 23073 END 23074 ERROR 23075 syntax error at position 12 near 'from' 23076 END 23077 INPUT 23078 select concat('|', text1, '|') from t1 where text1='teststring '; 23079 END 23080 OUTPUT 23081 select concat('|', text1, '|') from t1 where text1 = 'teststring ' 23082 END 23083 INPUT 23084 select Host,Db,User,Table_name,Column_name,Column_priv from mysql.columns_priv; 23085 END 23086 OUTPUT 23087 select Host, Db, `User`, Table_name, Column_name, Column_priv from mysql.columns_priv 23088 END 23089 INPUT 23090 select from t1 group by f1; 23091 END 23092 ERROR 23093 syntax error at position 12 near 'from' 23094 END 23095 INPUT 23096 select tt.* from (select from t1) as tt order by 1, 2; 23097 END 23098 ERROR 23099 syntax error at position 30 near 'from' 23100 END 23101 INPUT 23102 select @@key_cache_block_size; 23103 END 23104 OUTPUT 23105 select @@key_cache_block_size from dual 23106 END 23107 INPUT 23108 select from `information_schema`.`PARTITIONS` where `TABLE_SCHEMA` = NULL; 23109 END 23110 ERROR 23111 syntax error at position 12 near 'from' 23112 END 23113 INPUT 23114 select space(18446744073709551615); 23115 END 23116 OUTPUT 23117 select space(18446744073709551615) from dual 23118 END 23119 INPUT 23120 select ST_astext(ST_envelope(ST_PolyFromWKB(ST_AsWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(1, 0), Point(0, 0))))))); 23121 END 23122 OUTPUT 23123 select ST_astext(ST_envelope(ST_PolyFromWKB(ST_AsWKB(Polygon(LineString(Point(0, 0), Point(30, 0), Point(30, 30), Point(1, 0), Point(0, 0))))))) from dual 23124 END