Bug #60468 CURDATE() comparison not returning correct results
Submitted: 14 Mar 2011 23:11 Modified: 15 Apr 2011 4:21
Reporter: eric maksim Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server: Data Types Severity:S2 (Serious)
Version:5.1.47 OS:Linux
Assigned to: CPU Architecture:Any
Tags: regression

[14 Mar 2011 23:11] eric maksim
When comparing CURDATE to a date data type in a table, the less than or equal to works:

event_post <= CURDATE()

whereas the greater than or equal to returns no results

event_date >= CURDATE()

This error does not occur in version 5.2.33 and was only found after migrating the database to a version 5.1.47.

How to repeat:
Two table fields of type date are set, one as a post date (when something was posted), and another as an event data (when the event occurs).  Making sure that the the post date is prior to CURDATE() and event date is after CURDATE().  Generate query to find all rows between the two dates.
[15 Mar 2011 4:21] Valeriy Kravchuk
Please, check if the same problem happens with current server version, 5.1.56, and send complete test case if it does.
[15 Apr 2011 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".