Modify

Opened 17 years ago

Closed 17 years ago

#2488 closed defect (fixed)

MySQL SQL error /trac/screenshots

Reported by: john_wegis@… Owned by: Radek Bartoň
Priority: normal Component: ScreenshotsPlugin
Severity: normal Keywords: mysql
Cc: Trac Release: 0.10

Description

Not sure if the MySQL database is officially supported or not. The plugin seems to install correctly though. When I click on the "Screenshots" link (/trac/screenshots) in the header I get this error. All the components of the ScreenshotsPlugin are enabled.

Here's my configuration:

Python: 2.3.4
Trac: 0.10.4
TracTags: 0.6
Apache 2.0.52 + mod_wsgi-1.3
MySQL: 5.0.45
OS: Linux (CentOS) 2.6.9

Here's the error:

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.3/site-packages/TracScreenshots-0.5-py2.3.egg/tracscreenshots/core.py", line 100, in process_request
    template, data, content_type = self._do_actions(req, actions)
  File "/usr/lib/python2.3/site-packages/TracScreenshots-0.5-py2.3.egg/tracscreenshots/core.py", line 397, in _do_actions
    enabled_components, enabled_versions)
  File "/usr/lib/python2.3/site-packages/TracScreenshots-0.5-py2.3.egg/tracscreenshots/api.py", line 86, in get_filtered_screenshots
    cursor.execute(sql, versions + components)
  File "/usr/lib/python2.3/site-packages/trac/db/util.py", line 51, in execute
    return self.cursor.execute(sql)
  File "/usr/lib/python2.3/site-packages/trac/db/util.py", line 51, in execute
    return self.cursor.execute(sql)
  File "/usr/lib/python2.3/site-packages/MySQLdb/cursors.py", line 163, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.3/site-packages/MySQLdb/connections.py", line 35, 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 ') OR c.component IN ()' at line 1")

Attachments (0)

Change History (1)

comment:1 Changed 17 years ago by Radek Bartoň

Resolution: fixed
Status: newclosed

The problem was with empty IN() statement but according to MySQL manual there is no mention that IN() statement could not be empty. Try it with r3161, should be OK.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Radek Bartoň.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.