Edgewall Software

Opened 9 years ago

Last modified 8 years ago

#12112 closed defect

Duplicate column name 'priority_value' is raised in custom query with MySQL — at Initial Version

Reported by: Jun Omae Owned by:
Priority: normal Milestone: 1.2
Component: query system Version: 0.12-stable
Severity: normal Keywords: mysql
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When priority_value is defined as custom field and filter with the field, the following error is raised on MySQL with Trac 0.12-stable and 1.0-stable. No errors on SQLite and PostgreSQL.

2015-06-25 16:30:00,151 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
  File "/venv/trac/1.0.6.post2/lib/python2.5/site-packages/trac/web/main.py", line 534, in _dispatch_request
    dispatcher.dispatch(req)
  File "/venv/trac/1.0.6.post2/lib/python2.5/site-packages/trac/web/main.py", line 227, in dispatch
    resp = chosen_handler.process_request(req)
  File "/venv/trac/1.0.6.post2/lib/python2.5/site-packages/trac/ticket/query.py", line 984, in process_request
    return self.display_html(req, query)
  File "/venv/trac/1.0.6.post2/lib/python2.5/site-packages/trac/ticket/query.py", line 1082, in display_html
    tickets = query.execute(req)
  File "/venv/trac/1.0.6.post2/lib/python2.5/site-packages/trac/ticket/query.py", line 301, in execute
    self.num_items = self._count(sql, args)
  File "/venv/trac/1.0.6.post2/lib/python2.5/site-packages/trac/ticket/query.py", line 282, in _count
    % sql, args)[0][0]
  File "/venv/trac/1.0.6.post2/lib/python2.5/site-packages/trac/db/api.py", line 124, in execute
    return db.execute(query, params)
  File "/venv/trac/1.0.6.post2/lib/python2.5/site-packages/trac/db/util.py", line 128, in execute
    cursor.execute(query, params if params is not None else [])
  File "/venv/trac/1.0.6.post2/lib/python2.5/site-packages/trac/db/util.py", line 72, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/venv/py25/lib/python2.5/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/venv/py25/lib/python2.5/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
OperationalError: (1060, "Duplicate column name 'priority_value'")

Change History (0)

Note: See TracTickets for help on using tickets.