~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/func_time.test

  • Committer: Jay Pipes
  • Date: 2009-01-30 04:38:21 UTC
  • mto: This revision was merged to the branch mainline in revision 830.
  • Revision ID: jpipes@serialcoder-20090130043821-4d7jg2ftabefamxb
Fixes for the QUARTER() function to use new Temporal system and throw
errors on bad datetime values.

Added test case for QUARTER() function and modified func_time.test existing
test to correctly throw errors and report NULL, not 0 on NULL input.

Show diffs side-by-side

added added

removed removed

Lines of Context:
218
218
select dayofmonth("0000-00-00"),dayofmonth(d),dayofmonth(dt),dayofmonth(t),dayofmonth(c) from t1;
219
219
--error 1686 # 0000-00-00 is not a damn date.
220
220
select month("0000-00-00"),month(d),month(dt),month(t),month(c) from t1;
 
221
--error 1686 # 0000-00-00 not a date
221
222
select quarter("0000-00-00"),quarter(d),quarter(dt),quarter(t),quarter(c) from t1;
222
223
select week("0000-00-00"),week(d),week(dt),week(t),week(c) from t1;
223
224
--error 1686 # Argh.  0000-00-00 is not a date.