~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/parser.test

  • Committer: Monty Taylor
  • Date: 2008-11-16 23:47:43 UTC
  • mto: (584.1.10 devel)
  • mto: This revision was merged to the branch mainline in revision 589.
  • Revision ID: monty@inaugust.com-20081116234743-c38gmv0pa2kdefaj
Broke out cached_item.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
create table CURDATE (a int);
35
35
 
36
36
--error ER_PARSE_ERROR
 
37
create table CURTIME(a int);
 
38
--error ER_PARSE_ERROR
 
39
create table CURTIME (a int);
 
40
 
 
41
--error ER_PARSE_ERROR
37
42
create table DATE_ADD(a int);
38
43
--error ER_PARSE_ERROR
39
44
create table DATE_ADD (a int);
181
186
create table CURDATE (a int);
182
187
 
183
188
--error ER_PARSE_ERROR
 
189
create table CURTIME(a int);
 
190
--error ER_PARSE_ERROR
 
191
create table CURTIME (a int);
 
192
 
 
193
--error ER_PARSE_ERROR
184
194
create table DATE_ADD(a int);
185
195
--error ER_PARSE_ERROR
186
196
create table DATE_ADD (a int);
346
356
 
347
357
# Test coverage with edge conditions
348
358
 
 
359
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
349
360
select pi(3.14);
350
361
 
 
362
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
351
363
select tan();
 
364
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
352
365
select tan(1, 2);
353
366
 
 
367
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
354
368
select makedate(1);
 
369
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
355
370
select makedate(1, 2, 3);
356
371
 
 
372
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
 
373
select maketime();
 
374
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
 
375
select maketime(1);
 
376
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
 
377
select maketime(1, 2);
 
378
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
 
379
select maketime(1, 2, 3, 4);
 
380
 
 
381
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
357
382
select atan();
 
383
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
358
384
select atan2(1, 2, 3);
359
385
 
 
386
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
360
387
select concat();
361
388
select concat("foo");
362
389
 
 
390
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
363
391
select concat_ws();
 
392
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
364
393
select concat_ws("foo");
365
394
 
 
395
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
366
396
select elt();
 
397
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
367
398
select elt(1);
368
399
 
 
400
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
369
401
select export_set();
 
402
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
370
403
select export_set("p1");
 
404
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
371
405
select export_set("p1", "p2");
 
406
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
372
407
select export_set("p1", "p2", "p3", "p4", "p5", "p6");
373
408
 
 
409
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
374
410
select field();
 
411
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
375
412
select field("p1");
376
413
 
 
414
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
377
415
select from_unixtime();
 
416
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
378
417
select from_unixtime(1, 2, 3);
379
418
 
 
419
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
380
420
select unix_timestamp(1, 2);
381
421
 
 
422
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
382
423
select greatest();
 
424
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
383
425
select greatest(12);
384
426
 
 
427
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
385
428
select last_insert_id(1, 2);
386
429
 
 
430
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
387
431
select least();
 
432
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
388
433
select least(12);
389
434
 
 
435
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
390
436
select locate();
 
437
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
391
438
select locate(1);
 
439
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
392
440
select locate(1, 2, 3, 4);
393
441
 
 
442
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
394
443
select log();
 
444
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
395
445
select log(1, 2, 3);
396
446
 
 
447
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
397
448
select make_set();
 
449
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
398
450
select make_set(1);
399
451
 
 
452
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
 
453
select master_pos_wait();
 
454
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
 
455
select master_pos_wait(1);
 
456
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
 
457
select master_pos_wait(1, 2, 3, 4);
 
458
 
 
459
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
400
460
select rand(1, 2, 3);
401
461
 
 
462
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
402
463
select round(1, 2, 3);
403
464
 
 
465
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
 
466
select yearweek();
 
467
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
 
468
select yearweek(1, 2, 3);
 
469
 
404
470
#
405
471
# Bug#24736: UDF functions parsed as Stored Functions
406
472
#
558
589
DROP TABLE IF EXISTS t1;
559
590
--enable_warnings
560
591
 
 
592
SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
 
593
SELECT STR_TO_DATE('10:00 PM', '%h:%i %p') + INTERVAL (INTERVAL(1,2,3) + 1) MINUTE;
561
594
SELECT "1997-12-31 23:59:59" + INTERVAL 1 SECOND;
562
595
SELECT 1 + INTERVAL(1,0,1,2) + 1;
563
596
SELECT INTERVAL(1,0,1,2) + 1;