Opened 8 years ago
Last modified 8 years ago
#12399 closed defect
Not unique table/alias: 'priority' when priority enums are removed and priority custom field is added — at Version 1
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.11 |
Component: | query system | Version: | 1.0-stable |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
All of priority enums are removed and priority
as custom field is added, query system raises an OperationalError
on MySQL.
2016-03-14 12:03:35,208 Trac[util] DEBUG: SQL: SELECT COUNT(*) FROM (SELECT t.id AS id,t.summary AS summary,t.status AS status,t.type AS type,t.milestone AS milestone,t.component AS component,t.time AS time,t.changetime AS changetime,t.owner AS owner,priority.value AS priority_value,`priority`.value AS `priority` FROM ticket AS t LEFT OUTER JOIN ticket_custom AS `priority` ON (`priority`.ticket=t.id AND `priority`.name='priority') LEFT OUTER JOIN enum AS priority ON (priority.type='priority' AND priority.name=priority) WHERE ((COALESCE(t.status,'')!=%s) AND (COALESCE(t.owner,'')=%s)) ORDER BY COALESCE(priority.value,'')='',CAST(priority.value AS signed),t.id) AS x 2016-03-14 12:03:35,208 Trac[util] DEBUG: args: [u'closed', u'admin'] 2016-03-14 12:03:35,208 Trac[util] DEBUG: execute exception: OperationalError(1066, "Not unique table/alias: 'priority'")
The issue doesn't raise on Trac 0.12.7 and MySQL.
Note:
See TracTickets
for help on using tickets.