Bug #32417 Query with datefield=NOW() and enumfield='value'
Submitted: 15 Nov 2007 17:55 Modified: 20 Dec 2007 17:48
Reporter: Felix S Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version: OS:Solaris
Assigned to: CPU Architecture:Any

[15 Nov 2007 17:55] Felix S
Description:
Working:
SELECT * FROM table WHERE enumfield='value'
SELECT * FROM table WHERE datefield=NOW()
SELECT * FROM table WHERE datefield=NOW() AND intfield=5

Not Working:
SELECT * FROM table WHERE datefield=NOW() AND enumfield='value'

Fix:
SELECT * FROM table WHERE datefield=CURDATE() AND enumfield='value'

How to repeat:
Create a Table with a DATE and a ENUM Field, and try to query them both...
[15 Nov 2007 18:02] Valeriy Kravchuk
Thank you for a problem report. Please, specify the exact server version, x.y.z, and send a complete test case, with CREATE TABLE and data.
[16 Nov 2007 13:35] Felix S
I tried to reproduce the error, but i failed.
I created the new Table and datefield=NOW() don't work. (it works in mysql4)

Somehow it works in mysql5 when the table comes from mysql4, but then the mentioned Problem occurred.

Anyhow date=now() is "wrong" anyway... but strange, that it worked...
[20 Nov 2007 17:48] MySQL Verification Team
Could you please provide the complete test script (tables, insert commands,
queries, bad result and what is expected). Thanks in advance.
[21 Dec 2007 0: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".