Code

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#46 closed defect (fixed)

Refactor DATE_TRUNC() and EXTRACT() database code for MySQL

Reported by: Umair Owned by: adrian
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: UI/UX:

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")

Attachments (0)

Change History (2)

comment:1 Changed 9 years ago by adrian

  • Summary changed from SQL for MySQL might be broken to Refactor DATE_TRUNC() and EXTRACT() database code for MySQL

comment:2 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [159] and [161].

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.