Modify

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#5893 closed defect (duplicate)

SQL query failures with MySQL

Reported by: anonymous Owned by: echo0101
Priority: normal Component: TracTicketStatsPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.11

Description

How to Reproduce

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

(please provide additional details here)

User Agent was: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.1 (KHTML, like Gecko) Chrome/4.0.213.1 Safari/532.1

System Information

Trac 0.11.4
Python 2.6.1 (r261:67515, Apr 12 2009, 03:51:25)
[GCC 4.3.2]
setuptools 0.6c9
MySQL server: "5.1.34", client: "5.1.34", thread-safe: 1
MySQLdb 1.2.2
Genshi 0.5.1
Pygments 1.0
Subversion 1.6.4 (r38063)
jQuery: 1.2.6

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 435, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 205, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-i686/egg/ticketstats/ticketstats.py", line 196, in process_request
    last_num_open = self._get_num_open_tix(last_date, milestone, req)
  File "build/bdist.linux-i686/egg/ticketstats/ticketstats.py", line 114, in _get_num_open_tix
    cursor.execute("SELECT t.type AS type, owner, status, time AS created FROM ticket t, enum p WHERE p.name = t.priority AND p.type = 'priority' AND created <= %s %s" % (to_timestamp(at_date), ma_milestone_str))
  File "/usr/lib/python2.6/site-packages/trac/db/util.py", line 51, in execute
    return self.cursor.execute(sql)
  File "/usr/lib/python2.6/site-packages/MySQLdb/cursors.py", line 166, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.6/site-packages/MySQLdb/connections.py", line 35, in defaulterrorhandler
    raise errorclass, errorvalue
OperationalError: (1054, "Unknown column 'created' in 'where clause'")


Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by rjollos

  • Resolution set to duplicate
  • Status changed from new to closed

MySQL compatibility issue with plugin. Duplicate of #5568, which has a patch.

comment:2 Changed 4 years ago by rjollos

  • Summary changed from Fail to start Tracticketstats 2.1 in trac 0.11.4 to SQL query failures with MySQL

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.