~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/func_time.result

  • Committer: Brian Aker
  • Date: 2009-02-18 19:27:32 UTC
  • mfrom: (873.1.17 temporal-new)
  • Revision ID: brian@tangent.org-20090218192732-ype4iscybtftjk2y
Merge Jay

Show diffs side-by-side

added added

removed removed

Lines of Context:
385
385
select year("0000-00-00"),year(d),year(dt),year(t),year(c) from t1;
386
386
ERROR HY000: Received an invalid datetime value '0000-00-00'.
387
387
select to_days("0000-00-00"),to_days(d),to_days(dt),to_days(c) from t1;
388
 
to_days("0000-00-00")   to_days(d)      to_days(dt)     to_days(c)
389
 
NULL    NULL    NULL    NULL
390
 
Warnings:
391
 
Warning 1292    Incorrect datetime value: '0000-00-00'
 
388
ERROR HY000: Received an invalid datetime value '0000-00-00'.
392
389
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;
393
390
ERROR HY000: Received an invalid datetime value '0000-00-00'.
394
391
drop table t1;
653
650
Warnings:
654
651
Warning 1264    Out of range value for column 'time' at row 1
655
652
drop table t1;
656
 
select last_day('2000-02-05') as f1, last_day('2002-12-31') as f2,
657
 
last_day('2003-03-32') as f3, last_day('2003-04-01') as f4,
658
 
last_day('2001-01-01 01:01:01') as f5, last_day(NULL),
659
 
last_day('2001-02-12');
660
 
f1      f2      f3      f4      f5      last_day(NULL)  last_day('2001-02-12')
661
 
2000-02-29      2002-12-31      NULL    2003-04-30      2001-01-31      NULL    2001-02-28
662
 
Warnings:
663
 
Warning 1292    Incorrect datetime value: '2003-03-32'
 
653
select last_day('2000-02-05');
 
654
last_day('2000-02-05')
 
655
2000-02-29
 
656
select last_day('2002-12-31');
 
657
last_day('2002-12-31')
 
658
2002-12-31
 
659
select last_day('2003-03-32');
 
660
ERROR HY000: Received an invalid datetime value '2003-03-32'.
 
661
select last_day('2003-04-01');
 
662
last_day('2003-04-01')
 
663
2003-04-30
 
664
select last_day('2001-01-01 01:01:01');
 
665
last_day('2001-01-01 01:01:01')
 
666
2001-01-31
 
667
select last_day(NULL);
 
668
last_day(NULL)
 
669
NULL
 
670
select last_day('2001-02-12');
 
671
last_day('2001-02-12')
 
672
2001-02-28
664
673
create table t1 select last_day('2000-02-05') as a,
665
674
from_days(to_days("960101")) as b;
666
675
describe t1;
720
729
3
721
730
DROP TABLE t1;
722
731
select last_day('2005-00-00');
723
 
last_day('2005-00-00')
724
 
NULL
725
 
Warnings:
726
 
Warning 1292    Incorrect datetime value: '2005-00-00'
 
732
ERROR HY000: Received an invalid datetime value '2005-00-00'.
727
733
select last_day('2005-00-01');
728
 
last_day('2005-00-01')
729
 
NULL
730
 
Warnings:
731
 
Warning 1292    Incorrect datetime value: '2005-00-01'
 
734
ERROR HY000: Received an invalid datetime value '2005-00-01'.
732
735
select last_day('2005-01-00');
733
 
last_day('2005-01-00')
734
 
NULL
735
 
Warnings:
736
 
Warning 1292    Incorrect datetime value: '2005-01-00'
 
736
ERROR HY000: Received an invalid datetime value '2005-01-00'.
737
737
select monthname(str_to_date(null, '%m')), monthname(str_to_date(null, '%m')),
738
738
monthname(str_to_date(1, '%m')), monthname(str_to_date(0, '%m'));
739
739
ERROR HY000: Received an invalid datetime value '0000-01-00'.
899
899
H
900
900
5
901
901
select last_day('0000-00-00');
902
 
last_day('0000-00-00')
903
 
NULL
 
902
ERROR HY000: Received an invalid datetime value '0000-00-00'.
904
903
End of 4.1 tests
905
904
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
906
905
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;