Bug #22824 | strict, datetime, NULL, wrong warning | ||
---|---|---|---|
Submitted: | 29 Sep 2006 13:08 | Modified: | 8 May 2007 17:16 |
Reporter: | Matthias Leich | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.1 | OS: | Any |
Assigned to: | Ramil Kalimullin | CPU Architecture: | Any |
[29 Sep 2006 13:08]
Matthias Leich
[29 Sep 2006 13:11]
Matthias Leich
test script
Attachment: ml003.test (application/octet-stream, text), 597 bytes.
[21 Dec 2006 9:58]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/17256 ChangeSet@1.2336, 2006-12-21 13:53:34+04:00, ramil@mysql.com +3 -0 Fix for bug #22824: strict, datetime, NULL, wrong warning During optimization we replace NULL with 0 for not null date{time} fields, so uset MODE_NO_ZERO_DATE flag for a while as we don't want to give extra warnings.
[6 Apr 2007 14:37]
Timour Katchaounov
I am not sure whether this is a problem or not, but after the fix, the result is that if we have a '0000-00-00' row in the table (which is not the same as NULL), then executing: SELECT COUNT(*) FROM t1 WHERE t1.dt1 IS NULL; still gives no warning. Do you think this is intended behavior?
[26 Apr 2007 11:37]
Bugs System
Pushed into 5.0.42
[26 Apr 2007 11:38]
Bugs System
Pushed into 5.1.18-beta
[8 May 2007 17:16]
Paul DuBois
Noted in 5.0.42, 5.1.18 changelogs. SELECT COUNT(*) from a table containing a DATETIME NOT NULL column could produce spurious warnings with the NO_ZERO_DATE SQL mode enabled.