Opened 16 years ago
Last modified 20 months ago
#3088 new defect
Error in MySQL Query Syntax — at Initial Version
Reported by: | Owned by: | dagomez | |
---|---|---|---|
Priority: | highest | Component: | StractisticsPlugin |
Severity: | blocker | Keywords: | |
Cc: | dagomez, mjrecena@… | Trac Release: | 0.11 |
Description
Trac detected an internal error:
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 ')\n GROUP BY r.author \n ORDER BY commits DESC \n LIMIT 5' at line 3")
Most recent call last:
- File "/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/main.py", line 417, in _dispatch_request
Code fragment:
- try:
- if not env and env_error:
- raise HTTPInternalError(env_error)
- try:
- dispatcher = RequestDispatcher(env)
- dispatcher.dispatch(req)
- except RequestDone:
- pass
- resp = req._response or []
- except HTTPException, e:
- File "/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/main.py", line 197, in dispatch
Code fragment:
- req.args.get('FORM_TOKEN') != req.form_token:
- raise HTTPBadRequest('Missing or invalid form token. '
- 'Do you have cookies enabled?')
- # Process the request and render the template
- resp = chosen_handler.process_request(req)
- if resp:
- if len(resp) == 2: # Clearsilver
- chrome.populate_hdf(req)
- template, content_type = \
- self._post_process_request(req, *resp)
- File "build/bdist.linux-x86_64/egg/stractistics/web_ui.py", line 116, in process_request Local variables: Name Value config {'wiki_ignored_authors': [], 'repository_ignored_authors': [], ... db <trac.db.pool.PooledConnection object at 0x2aaad0d82440> elem ('User reports', 'user_reports') links [('Project reports', '/stractistics/project_reports'), ('User reports', ... module None req <Request "GET u'/stractistics'"> self <stractistics.web_ui.StractisticsModule object at 0x2aaad0d80cd0> strac_ref '/stractistics'
- File "build/bdist.linux-x86_64/egg/stractistics/global_reports.py", line 31, in global_reports Local variables: Name Value config {'wiki_ignored_authors': [], 'repository_ignored_authors': [], ... db <trac.db.pool.PooledConnection object at 0x2aaad0d82440> end_date datetime.datetime(2008, 5, 28, 11, 9, 29, 652479) req <Request "GET u'/stractistics'"> start_date datetime.datetime(2008, 3, 5, 11, 9, 29, 652479) weeks_back 12
- File "build/bdist.linux-x86_64/egg/stractistics/global_reports.py", line 64, in _repository_activity Local variables: Name Value AUTHORS_LIMIT 5 WEEKS_NUMBER 12 config {'wiki_ignored_authors': [], 'repository_ignored_authors': [], ... db <trac.db.pool.PooledConnection object at 0x2aaad0d82440> end_date datetime.datetime(2008, 5, 28, 11, 9, 29, 652479) ignored_authors req <Request "GET u'/stractistics'"> start_date datetime.datetime(2008, 3, 5, 11, 9, 29, 652479) weeks_back 12
- File "build/bdist.linux-x86_64/egg/stractistics/global_reports.py", line 113, in _most_active_repository_authors Local variables: Name Value AUTHORS_LIMIT 5 authors [] db <trac.db.pool.PooledConnection object at 0x2aaad0d82440> end_date datetime.datetime(2008, 5, 28, 11, 9, 29, 652479) ignored_authors map_rows <function map_rows at 0x2aaad0d855f0> sql_expr '\n SELECT r.author AS author, COUNT( r.author ) AS commits \n FROM ... start_date datetime.datetime(2008, 3, 5, 11, 9, 29, 652479)
- File "build/bdist.linux-x86_64/egg/stractistics/util.py", line 117, in execute_sql_expression Local variables: Name Value cursor <trac.db.util.IterableCursor object at 0x2aaad0d9e6a8> db <trac.db.pool.PooledConnection object at 0x2aaad0d82440> map_rows <function map_rows at 0x2aaad0d855f0> sql_expr '\n SELECT r.author AS author, COUNT( r.author ) AS commits \n FROM ...
- File "/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/db/util.py", line 51, in execute
Code fragment:
- # -- In case of SQL errors, uncomment the following 'print' statements
- # print 'execute', repr(sql)
- if args:
- # print repr(args)
- return self.cursor.execute(sql_escape_percent(sql), args)
- return self.cursor.execute(sql)
- def executemany(self, sql, args=None):
- # print 'executemany', repr(sql)
- if args:
- # print repr(args)
- File "/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/db/util.py", line 51, in execute
Code fragment:
- # -- In case of SQL errors, uncomment the following 'print' statements
- # print 'execute', repr(sql)
- if args:
- # print repr(args)
- return self.cursor.execute(sql_escape_percent(sql), args)
- return self.cursor.execute(sql)
- def executemany(self, sql, args=None):
- # print 'executemany', repr(sql)
- if args:
- # print repr(args)
- File "/usr/lib64/python2.4/site-packages/MySQLdb/cursors.py", line 163, in execute
Code fragment:
- self.errorhandler(self, TypeError, m)
- except:
- exc, value, tb = exc_info()
- del tb
- self.messages.append((exc, value))
- self.errorhandler(self, exc, value)
- self._executed = query
- self._warning_check()
- return r
- def executemany(self, query, args):
- File "/usr/lib64/python2.4/site-packages/MySQLdb/connections.py", line 35, in defaulterrorhandler
Code fragment:
- cursor.messages.append(error)
- else:
- connection.messages.append(error)
- del cursor
- del connection
- raise errorclass, errorvalue
- class Connection(_mysql.connection):
- """MySQL Database Connection Object"""
File "/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/main.py", line 417, in _dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/main.py", line 197, in dispatch
resp = chosen_handler.process_request(req)
File "build/bdist.linux-x86_64/egg/stractistics/web_ui.py", line 116, in process_requestFile "build/bdist.linux-x86_64/egg/stractistics/global_reports.py", line 31, in global_reportsFile "build/bdist.linux-x86_64/egg/stractistics/global_reports.py", line 64, in _repository_activityFile "build/bdist.linux-x86_64/egg/stractistics/global_reports.py", line 113, in _most_active_repository_authorsFile "build/bdist.linux-x86_64/egg/stractistics/util.py", line 117, in execute_sql_expressionFile "/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/db/util.py", line 51, in execute
return self.cursor.execute(sql)
File "/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/db/util.py", line 51, in execute
return self.cursor.execute(sql)
File "/usr/lib64/python2.4/site-packages/MySQLdb/cursors.py", line 163, in execute
self.errorhandler(self, exc, value)
File "/usr/lib64/python2.4/site-packages/MySQLdb/connections.py", line 35, in defaulterrorhandler
raise errorclass, errorvalue
System Information:
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 Trac: 0.11rc1 Python: 2.4.3 (#1, Mar 14 2007, 19:01:42) [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] setuptools: 0.6c8 MySQL: server: "5.1.22-rc-log", client: "5.0.22", thread-safe: 0 MySQLdb: 1.2.1 Genshi: 0.5dev-r852 mod_python: 3.2.8 Subversion: 1.4.2 (r22196) jQuery: 1.2.3