SELECT QUARTER("0000-00-00") suceeds when it should have failed

Bug #321684 reported by Aarti Pai
10
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
High
Jay Pipes

Bug Description

drizzletest: At line 39: query 'SELECT QUARTER("0000-00-00")' succeeded - should have failed with errno 1686...

T

SELECT QUARTER("0000-00-00");
QUARTER("0000-00-00")
0

Revision history for this message
Aarti Pai (aarti-pai) wrote :

The QUARTER() function succeeds in these instances where it should have failed - Invalid dates:
See /home/aarti/repos/temporal-data/tests/suite/temporal/t/quarter.test

#--error 1686
#SELECT QUARTER("0000-01-01");
#--error 1686
#SELECT QUARTER("0001-00-01");
#--error 1686
#SELECT QUARTER("0001-01-00");
#--error 1686
#SELECT QUARTER("2000-02-30");

SELECT QUARTER('07-31-2009');
QUARTER('07-31-2009')
NULL
Warnings:
Warning 1292 Incorrect datetime value: '07-31-2009'

SELECT QUARTER('1976-15-15');
QUARTER('1976-15-15')
NULL

SELECT QUARTER('0000-00-00');
QUARTER('0000-00-00')
0

SELECT QUARTER('2008-12-00');
QUARTER('2008-12-00')
4

Revision history for this message
Aarti Pai (aarti-pai) wrote :

This bug is related to #321682

Revision history for this message
Jay Pipes (jaypipes) wrote :

Another temporal issue. We should not allow invalid datetimes at any time.

Changed in drizzle:
assignee: nobody → jaypipes
importance: Undecided → High
milestone: none → cirrus
status: New → Confirmed
Revision history for this message
Jay Pipes (jaypipes) wrote :

Fix is in ~jaypipes/drizzle/temporal

Changed in drizzle:
status: Confirmed → Fix Committed
Jay Pipes (jaypipes)
Changed in drizzle:
milestone: cirrus → tarball
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.