Edgewall Software
Modify

Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#10829 closed defect (cantfix)

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 'id < 5' at line 1")

Reported by: xiao.sun Owned by:
Priority: normal Milestone:
Component: general Version: 0.12.2
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

How to Reproduce

While doing a GET operation on /ticket/5, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'id': u'5'}

User agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.4) Gecko/20100101 Firefox/10.0.4

System Information

Trac 0.12.2
Babel 0.9.5
Genshi 0.6
MySQL server: "5.1.40-log", client: "5.0.77", thread-safe: 1
MySQLdb 1.2.3
Pygments 1.1.1
Python 2.7.3 (default, Aug 29 2012, 17:27:06)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]
setuptools 0.6c11
jQuery 1.4.2

Enabled Plugins

Py2Plugins4Trac 0.1

Python Traceback

Traceback (most recent call last):
  File "/data1/www/htdocs/157/py2om/1/lib/Trac-0.12.2-.egg/trac/web/main.py", line 511, in _dispatch_request
    dispatcher.dispatch(req)
  File "/data1/www/htdocs/157/py2om/1/lib/Trac-0.12.2-.egg/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/data1/www/htdocs/157/py2om/1/lib/Trac-0.12.2-.egg/trac/ticket/web_ui.py", line 169, in process_request
    return self._process_ticket_request(req)
  File "/data1/www/htdocs/157/py2om/1/lib/Trac-0.12.2-.egg/trac/ticket/web_ui.py", line 620, in _process_ticket_request
    (self.env.project_id, ticket.id,))
  File "/data1/www/htdocs/157/py2om/1/lib/Trac-0.12.2-.egg/trac/db/util.py", line 65, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/local/sae/python/lib/python2.7/site-packages/MySQLdb/cursors.py", line 174, in execute
    self.errorhandler(self, exc, value)
  File "/usr/local/sae/python/lib/python2.7/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 'id < 5' at line 1")

Attachments (0)

Change History (1)

comment:1 by Remy Blank, 12 years ago

Resolution: cantfix
Status: newclosed

The string project_id doesn't appear anywhere in Trac, but it's mentioned in the traceback above. So this is a patched version of Trac. Please report the issue to the patch maintainer.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.