Modify

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#5893 closed defect (duplicate)

SQL query failures with MySQL

Reported by: anonymous Owned by: Prentice Wongvibulsin
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 14 years ago by Ryan J Ollos

Resolution: duplicate
Status: newclosed

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

comment:2 Changed 14 years ago by Ryan J Ollos

Summary: Fail to start Tracticketstats 2.1 in trac 0.11.4SQL query failures with MySQL

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Prentice Wongvibulsin.
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.