#46 closed defect (fixed)
Refactor DATE_TRUNC() and EXTRACT() database code for MySQL
Reported by: | Umair | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | contrib.admin | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
It's a Windows XP SP 2, Apache 2.0.54, Python 2.41, Mod_python 3.14, MySQL 4 setup.
You can reproduce the bug in several cases. One of them is to click the filters in the Users page. Also
ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near month' FROM polls_polls.pub_date) = '7' AND polls_polls.pub_date BETWEEN '2005-' at line 1")
Another example would be using date_hierarchy = 'pub_date', to get
ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('year', polls_polls.pub_date) FROM polls_polls GROUP BY 1 ORDER BY 1 ASC' at line 1")
Change History (2)
comment:1 by , 19 years ago
Summary: | SQL for MySQL might be broken → Refactor DATE_TRUNC() and EXTRACT() database code for MySQL |
---|
comment:2 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in [159] and [161].