﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
46	Refactor DATE_TRUNC() and EXTRACT() database code for MySQL	Umair	Adrian Holovaty	"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"")
"	defect	closed	contrib.admin		normal	fixed			Unreviewed	0	0	0	0	0	0
