id	summary	reporter	owner	description	type	status	priority	component	severity	resolution	keywords	cc	release
3088	Error in MySQL Query Syntax	abidoon@gmail.com	rjollos	Trac detected an internal error:\r\n\r\n!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")\r\n\r\nMost recent call last:\r\n{{{\r\n    * File "/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/main.py", line 417, in _dispatch_request\r\n      Code fragment:\r\n       412. try:\r\n       413. if not env and env_error:\r\n       414. raise HTTPInternalError(env_error)\r\n       415. try:\r\n       416. dispatcher = RequestDispatcher(env)\r\n       417. dispatcher.dispatch(req)\r\n       418. except RequestDone:\r\n       419. pass\r\n       420. resp = req._response or []\r\n       421.  \r\n       422. except HTTPException, e:\r\n      Local variables:\r\n      Name_Value\r\n      after _[u' except RequestDone:', u' pass', u' resp = ...\r\n      before _[u' try:', u' if not env and env_error:', u' raise ...\r\n      dispatcher _<trac.web.main.RequestDispatcher object at 0x2aaad0d9ab10>\r\n      e _<_mysql_exceptions.ProgrammingError instance at 0x2aaad0d82518>\r\n      env _<trac.env.Environment object at 0x2aaaccfc4ad0>\r\n      env_error _None\r\n      exc_info _(<class _mysql_exceptions.ProgrammingError at 0x2aaace3e24d0>, ...\r\n      filename _'/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/main.py'\r\n      frames _[{'function': '_dispatch_request', 'lines_before': [u' try:', u' ...\r\n      has_admin _True\r\n      line _u' dispatcher.dispatch(req)'\r\n      lineno _416\r\n      message _u'ProgrammingError: (1064, "You have an error in your SQL syntax; check ...\r\n      req _<Request "GET u'/stractistics'">\r\n      resp _[]\r\n      tb _<traceback object at 0x2aaad0d82c68>\r\n      tb_hide _None\r\n      traceback _'Traceback (most recent call last):\\n File ...\r\n    * File "/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/main.py", line 197, in dispatch\r\n      Code fragment:\r\n       192. req.args.get('__FORM_TOKEN') != req.form_token:\r\n       193. raise HTTPBadRequest('Missing or invalid form token. '\r\n       194. 'Do you have cookies enabled?')\r\n       195.  \r\n       196. # Process the request and render the template\r\n       197. resp = chosen_handler.process_request(req)\r\n       198. if resp:\r\n       199. if len(resp) == 2: # Clearsilver\r\n       200. chrome.populate_hdf(req)\r\n       201. template, content_type = \\\r\n       202. self._post_process_request(req, *resp)\r\n      Local variables:\r\n      Name_Value\r\n      chosen_handler _<stractistics.web_ui.StractisticsModule object at 0x2aaad0d80cd0>\r\n      chrome _<trac.web.chrome.Chrome object at 0x2aaad0d9a790>\r\n      err _(<class _mysql_exceptions.ProgrammingError at 0x2aaace3e24d0>, ...\r\n      handler _<stractistics.web_ui.StractisticsModule object at 0x2aaad0d80cd0>\r\n      req _<Request "GET u'/stractistics'">\r\n      self _<trac.web.main.RequestDispatcher object at 0x2aaad0d9ab10>\r\n    * File "build/bdist.linux-x86_64/egg/stractistics/web_ui.py", line 116, in process_request\r\n      Local variables:\r\n      Name_Value\r\n      config _{'wiki_ignored_authors': [], 'repository_ignored_authors': [], ...\r\n      db _<trac.db.pool.PooledConnection object at 0x2aaad0d82440>\r\n      elem _('User reports', 'user_reports')\r\n      links _[('Project reports', '/stractistics/project_reports'), ('User reports', ...\r\n      module _None\r\n      req _<Request "GET u'/stractistics'">\r\n      self _<stractistics.web_ui.StractisticsModule object at 0x2aaad0d80cd0>\r\n      strac_ref _'/stractistics'\r\n    * File "build/bdist.linux-x86_64/egg/stractistics/global_reports.py", line 31, in global_reports\r\n      Local variables:\r\n      Name_Value\r\n      config _{'wiki_ignored_authors': [], 'repository_ignored_authors': [], ...\r\n      db _<trac.db.pool.PooledConnection object at 0x2aaad0d82440>\r\n      end_date _datetime.datetime(2008, 5, 28, 11, 9, 29, 652479)\r\n      req _<Request "GET u'/stractistics'">\r\n      start_date _datetime.datetime(2008, 3, 5, 11, 9, 29, 652479)\r\n      weeks_back _12\r\n    * File "build/bdist.linux-x86_64/egg/stractistics/global_reports.py", line 64, in _repository_activity\r\n      Local variables:\r\n      Name_Value\r\n      AUTHORS_LIMIT _5\r\n      WEEKS_NUMBER _12\r\n      config _{'wiki_ignored_authors': [], 'repository_ignored_authors': [], ...\r\n      db _<trac.db.pool.PooledConnection object at 0x2aaad0d82440>\r\n      end_date _datetime.datetime(2008, 5, 28, 11, 9, 29, 652479)\r\n      ignored_authors _''\r\n      req _<Request "GET u'/stractistics'">\r\n      start_date _datetime.datetime(2008, 3, 5, 11, 9, 29, 652479)\r\n      weeks_back _12\r\n    * File "build/bdist.linux-x86_64/egg/stractistics/global_reports.py", line 113, in _most_active_repository_authors\r\n      Local variables:\r\n      Name_Value\r\n      AUTHORS_LIMIT _5\r\n      authors _[]\r\n      db _<trac.db.pool.PooledConnection object at 0x2aaad0d82440>\r\n      end_date _datetime.datetime(2008, 5, 28, 11, 9, 29, 652479)\r\n      ignored_authors _''\r\n      map_rows _<function map_rows at 0x2aaad0d855f0>\r\n      sql_expr _'\\n SELECT r.author AS author, COUNT( r.author ) AS commits \\n FROM ...\r\n      start_date _datetime.datetime(2008, 3, 5, 11, 9, 29, 652479)\r\n    * File "build/bdist.linux-x86_64/egg/stractistics/util.py", line 117, in execute_sql_expression\r\n      Local variables:\r\n      Name_Value\r\n      cursor _<trac.db.util.IterableCursor object at 0x2aaad0d9e6a8>\r\n      db _<trac.db.pool.PooledConnection object at 0x2aaad0d82440>\r\n      map_rows _<function map_rows at 0x2aaad0d855f0>\r\n      sql_expr _'\\n SELECT r.author AS author, COUNT( r.author ) AS commits \\n FROM ...\r\n    * File "/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/db/util.py", line 51, in execute\r\n      Code fragment:\r\n        46. # -- In case of SQL errors, uncomment the following 'print' statements\r\n        47. # print 'execute', repr(sql)\r\n        48. if args:\r\n        49. # print repr(args)\r\n        50. return self.cursor.execute(sql_escape_percent(sql), args)\r\n        51. return self.cursor.execute(sql)\r\n        52.  \r\n        53. def executemany(self, sql, args=None):\r\n        54. # print 'executemany', repr(sql)\r\n        55. if args:\r\n        56. # print repr(args)\r\n      Local variables:\r\n      Name_Value\r\n      args _None\r\n      self _<trac.db.util.IterableCursor object at 0x2aaad0d9e6a8>\r\n      sql _'\\n SELECT r.author AS author, COUNT( r.author ) AS commits \\n FROM ...\r\n    * File "/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/db/util.py", line 51, in execute\r\n      Code fragment:\r\n        46. # -- In case of SQL errors, uncomment the following 'print' statements\r\n        47. # print 'execute', repr(sql)\r\n        48. if args:\r\n        49. # print repr(args)\r\n        50. return self.cursor.execute(sql_escape_percent(sql), args)\r\n        51. return self.cursor.execute(sql)\r\n        52.  \r\n        53. def executemany(self, sql, args=None):\r\n        54. # print 'executemany', repr(sql)\r\n        55. if args:\r\n        56. # print repr(args)\r\n      Local variables:\r\n      Name_Value\r\n      args _None\r\n      self _<trac.db.util.IterableCursor object at 0x2aaad0d9ea28>\r\n      sql _'\\n SELECT r.author AS author, COUNT( r.author ) AS commits \\n FROM ...\r\n    * File "/usr/lib64/python2.4/site-packages/MySQLdb/cursors.py", line 163, in execute\r\n      Code fragment:\r\n       158. self.errorhandler(self, TypeError, m)\r\n       159. except:\r\n       160. exc, value, tb = exc_info()\r\n       161. del tb\r\n       162. self.messages.append((exc, value))\r\n       163. self.errorhandler(self, exc, value)\r\n       164. self._executed = query\r\n       165. self._warning_check()\r\n       166. return r\r\n       167.  \r\n       168. def executemany(self, query, args):\r\n      Local variables:\r\n      Name_Value\r\n      ListType _<type 'list'>\r\n      TupleType _<type 'tuple'>\r\n      args _None\r\n      charset _'utf8'\r\n      db _<weakproxy at 0x2aaace3f8d08 to Connection at 0x2aaabcc7dfe0>\r\n      exc _<class _mysql_exceptions.ProgrammingError at 0x2aaace3e24d0>\r\n      exc_info _<built-in function exc_info>\r\n      query _'\\n SELECT r.author AS author, COUNT( r.author ) AS commits \\n FROM ...\r\n      self _<MySQLdb.cursors.Cursor object at 0x2aaad0d9b190>\r\n      value _<_mysql_exceptions.ProgrammingError instance at 0x2aaad0d82518>\r\n    * File "/usr/lib64/python2.4/site-packages/MySQLdb/connections.py", line 35, in defaulterrorhandler\r\n      Code fragment:\r\n        30. cursor.messages.append(error)\r\n        31. else:\r\n        32. connection.messages.append(error)\r\n        33. del cursor\r\n        34. del connection\r\n        35. raise errorclass, errorvalue\r\n        36.  \r\n        37.  \r\n        38. class Connection(_mysql.connection):\r\n        39.  \r\n        40. """MySQL Database Connection Object"""\r\n      Local variables:\r\n      Name_Value\r\n      error _(<class _mysql_exceptions.ProgrammingError at 0x2aaace3e24d0>, ...\r\n      errorclass _<class _mysql_exceptions.ProgrammingError at 0x2aaace3e24d0>\r\n      errorvalue _<_mysql_exceptions.ProgrammingError instance at 0x2aaad0d82518>\r\n\r\nFile "/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/main.py", line 417, in _dispatch_request\r\n  dispatcher.dispatch(req)\r\nFile "/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/web/main.py", line 197, in dispatch\r\n  resp = chosen_handler.process_request(req)\r\nFile "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\r\n  return self.cursor.execute(sql)\r\nFile "/usr/lib/python2.4/site-packages/Trac-0.11rc1-py2.4.egg/trac/db/util.py", line 51, in execute\r\n  return self.cursor.execute(sql)\r\nFile "/usr/lib64/python2.4/site-packages/MySQLdb/cursors.py", line 163, in execute\r\n  self.errorhandler(self, exc, value)\r\nFile "/usr/lib64/python2.4/site-packages/MySQLdb/connections.py", line 35, in defaulterrorhandler\r\n  raise errorclass, errorvalue\r\n}}}\r\n\r\n{{{\r\nSystem Information:\r\n\r\nUser Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14\r\nTrac: _0.11rc1\r\nPython: _2.4.3 (#1, Mar 14 2007, 19:01:42) [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)]\r\nsetuptools: _0.6c8\r\nMySQL: _server: "5.1.22-rc-log", client: "5.0.22", thread-safe: 0\r\nMySQLdb: _1.2.1\r\nGenshi: _0.5dev-r852\r\nmod_python: _3.2.8\r\nSubversion: _1.4.2 (r22196)\r\njQuery:_1.2.3\r\n}}}	defect	new	highest	StractisticsPlugin	blocker			dagomez@gmv.com, mjrecena@gmv.com	0.11
