~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/parser.test

  • Committer: Andrew Hutchings
  • Date: 2011-01-21 11:23:19 UTC
  • mto: (2100.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2101.
  • Revision ID: andrew@linuxjedi.co.uk-20110121112319-nj1cvg0yt3nnf2rr
Add errors page to drizzle client docs
Add link to specific error in migration docs
Minor changes to migration docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
440
440
# Bug#24736: UDF functions parsed as Stored Functions
441
441
#
442
442
 
 
443
# This used to do this:
443
444
# Verify that the syntax for calling UDF : foo(expr AS param, ...)
444
445
# can not be used when calling native functions
445
 
 
446
 
# Native function with 1 argument
 
446
#
 
447
# but that's all nuts, so we allow named parameters now - although the names are
 
448
# currently just ignored.
447
449
 
448
450
select abs(3);
449
451
select abs(3 AS three);
450
452
select abs(3 three);
451
453
select abs(3 AS "three");
452
454
select abs(3 "three");
453
455
 
454
456
# Native function with 2 arguments
521
519
#   atan(10) from 64-bit version returns 1.4711276743037345
522
520
--replace_result 1.4711276743037345 1.4711276743037347
523
521
select atan(10);
524
522
select atan(10 AS p1);
525
523
select atan(10 p1);
526
524
select atan(10 AS "p1");
527
525
select atan(10 "p1");
528
526
 
529
527
select atan(10, 20);
530
528
select atan(10 AS p1, 20);
531
529
select atan(10 p1, 20);
532
530
select atan(10 AS "p1", 20);
533
531
select atan(10 "p1", 20);
534
532
select atan(10, 20 AS p2);
535
533
select atan(10, 20 p2);
536
534
select atan(10, 20 AS "p2");
537
535
select atan(10, 20 "p2");
538
536
select atan(10 AS p1, 20 AS p2);
539
537
 
540
538
#
585
570
SELECT t1.* FROM t1 AS t0, { OJ t2 INNER JOIN t1 ON (t1.a1=t2.a1) } WHERE t0.a3=2;
586
571
SELECT t1.*,t2.* FROM { OJ ((t1 INNER JOIN t2 ON (t1.a1=t2.a2)) LEFT OUTER JOIN t3 ON t3.a3=t2.a1)};
587
572
SELECT t1.*,t2.* FROM { OJ ((t1 LEFT OUTER JOIN t2 ON t1.a3=t2.a2) INNER JOIN t3 ON (t3.a1=t2.a2))};
 
573
#
 
574
# MySQL didn't follow the SQL standard on CROSS. INNER requires ON, but
 
575
# CROSS does not make use of ON.
 
576
#
 
577
--error ER_PARSE_ERROR 
588
578
SELECT t1.*,t2.* FROM { OJ (t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a2) CROSS JOIN t3 ON (t3.a2=t2.a3)};
 
579
SELECT t1.*,t2.* FROM { OJ (t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a2) INNER JOIN t3 ON (t3.a2=t2.a3)};
589
580
SELECT * FROM {oj t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a3} WHERE t1.a2 > 10;
590
581
SELECT {fn CONCAT(a1,a2)} FROM t1;
591
582
UPDATE t3 SET a4={d '1789-07-14'} WHERE a1=0;