Bug #22902 | Query not able to use an index when comparing against results of SYSDATE() | ||
---|---|---|---|
Submitted: | 2 Oct 2006 19:28 | Modified: | 30 Jul 2007 19:15 |
Reporter: | Matthew Montgomery | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | 5.0.24, 5.1 BK | OS: | Linux (Linux) |
Assigned to: | Paul DuBois | CPU Architecture: | Any |
Tags: | NOW, Optimizer, SYSDATE |
[2 Oct 2006 19:28]
Matthew Montgomery
[2 Oct 2006 20:20]
Sveta Smirnova
Thank you for the report. Verified as described on Linux using last 5.0 and 5.1 BK sources and following table: CREATE TABLE `incidents` ( `created` date DEFAULT NULL, KEY `created` (`created`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 filled by 31 random rows.
[30 Jul 2007 12:36]
Evgeny Potemkin
Optimizer can't use indexes for the SYSDATE() because it isn't static and there is nothing can be done for it.
[30 Jul 2007 19:13]
Paul DuBois
This has become a Documentation bug. Resetting category and status accordingly.
[30 Jul 2007 19:15]
Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.