#11433 closed defect (fixed)
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 '== 'status' \n ORDER BY tc.time' at line 4")
Reported by: | Zinway | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | TracTicketStatsPlugin |
Severity: | normal | Keywords: | |
Cc: | tuhui@… | Trac Release: | 1.0 |
Description
How to Reproduce
While doing a GET operation on /ticketstats
, Trac issued an internal error.
(please provide additional details here)
Request parameters:
{}
User agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1712.4 Safari/537.36
System Information
Trac | 1.0.1
|
Trac | 1.0.1
|
Babel | 0.9.4
|
Docutils | 0.6
|
Genshi | 0.6 (without speedups)
|
mod_wsgi | 3.4 (WSGIProcessGroup WSGIApplicationGroup %{GLOBAL})
|
MySQL | server: "5.1.71", client: "5.1.71", thread-safe: 1
|
MySQLdb | 1.2.3c1
|
Pygments | 1.4
|
Python | 2.6.6 (r266:84292, Nov 22 2013, 12:16:22) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
|
Python | 2.6.6 (r266:84292, Nov 22 2013, 12:16:22) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
|
pytz | 2010h
|
pytz | 2010h
|
setuptools | 0.6
|
setuptools | 0.6
|
Subversion | 1.7.4 (r1295709)
|
jQuery | 1.7.2
|
Enabled Plugins
AutocompleteUsers | 0.4.2dev-r0
|
CKIntegration | 1.1dev
|
GridModify | 0.1.6dev-r0
|
IniAdmin | 0.3-r0
|
LoomingClouds | 0.12r1
|
TicketCalendarPlugin | 0.12.0.2
|
TracAccountManager | 0.5dev-r0
|
TracAnnouncer | 1.0dev-r0
|
TracCAS | 2.0.1
|
TracCustomFieldAdmin | 0.2.8-r0
|
TracDragDrop | 0.12.0.11-r0
|
TracPermRedirect | 3.0
|
TracSubcomponents | 1.2.0
|
TracTags | 0.6
|
TracTicketCharts | 0.2dev-r0
|
Tracticketstats | 3.0.0dev-r0
|
TracUserManagerPlugin | 0.5dev-r0
|
TracWorkflowAdmin | 0.12.0.2
|
Python Traceback
Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/web/main.py", line 497, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/web/main.py", line 214, in dispatch resp = chosen_handler.process_request(req) File "/usr/lib/python2.6/site-packages/Tracticketstats-3.0.0dev_r0-py2.6.egg/ticketstats/ticketstats.py", line 119, in process_request last_num_open = get_num_open_tix(db, last_date, milestone) File "/usr/lib/python2.6/site-packages/Tracticketstats-3.0.0dev_r0-py2.6.egg/ticketstats/ticketstats.py", line 237, in get_num_open_tix ORDER BY tc.time""" % milestone_str, args) File "/usr/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/db/util.py", line 65, in execute return self.cursor.execute(sql_escape_percent(sql), args) File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute self.errorhandler(self, exc, value) File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue 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 '== 'status' \n ORDER BY tc.time' at line 4")
Attachments (6)
Change History (17)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Cc: | tuhui@… added; anonymous removed |
---|---|
Status: | new → accepted |
It looks like I've made a pretty stupid error in using the incorrect equality operator. Please report back if the fix I push next works for you.
comment:4 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Please reopen if you find that the issue is not fixed.
Changed 11 years ago by
Attachment: | no_data.png added |
---|
comment:5 Changed 11 years ago by
comment:6 follow-up: 7 Changed 11 years ago by
Do you think it is an issue with Flash player (#11440), or that the query is incorrect?
comment:7 Changed 11 years ago by
Changed 11 years ago by
Changed 11 years ago by
Changed 11 years ago by
Changed 11 years ago by
comment:8 Changed 11 years ago by
I have fixed the issue about no data.
Finally I find that there is no error with the scripts,just something wrong with the cdn of YUI website.
The url of charts.swf is not found,then I download the YUI.zip and use the local js sources.
With a flush,the chart is out. :)
comment:9 Changed 11 years ago by
What version of YUI did you download? In #11440, I was suggesting we might try the new version, 3.14.
comment:10 follow-up: 11 Changed 11 years ago by
2.9.0 The path of js files is different between 2.9.0 and 3.14
Changed 11 years ago by
Attachment: | ts.03.00.jpg added |
---|
#11447 was closed as duplicate.