Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#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 Adrian Holovaty, 19 years ago

Summary: SQL for MySQL might be brokenRefactor DATE_TRUNC() and EXTRACT() database code for MySQL

comment:2 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

Fixed in [159] and [161].

Note: See TracTickets for help on using tickets.
Back to Top