#2805 closed task (wontfix)

trac making bogus SQL queries

Reported by: strk Owned by: sac@…
Priority: normal Milestone: Unplanned
Component: SysAdmin Keywords: trac, postgresql
Cc:

Description

I found these errors in the PostgreSQL 12 log, on tracsvn machine:

2022-09-14 05:46:09 GMT ERROR:  column reference "description" is ambiguous at character 176
2022-09-14 05:46:09 GMT STATEMENT:  SELECT p.value AS __color__,
           id AS ticket, summary, component, version, milestone, t.type AS type,
           owner, status,
           time AS created,  
           changetime AS _changetime, description AS _description,
           reporter AS _reporter
          FROM ticket t
          LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
          WHERE status <> 'closed'
          ORDER BY ticket DESC, milestone, t.type, time

The logs do not contain the name of the database (HINT: we should add that) but it does sound like coming from trac. I don't know if it's a custom query or a core query, but it is bogus.

Change History (2)

comment:1 by robe, 22 months ago

it's most likely a custom query. PostGIS and Live had many of these that I fixed a while ago. It happened after the trac upgrade because they added a description column to a bunch of tables so past queries where the description column was not table qualified broke.

comment:2 by robe, 22 months ago

Resolution: wontfix
Status: newclosed

I see at least one broken on mapguide.

https://trac.osgeo.org/mapguide/report/9

one broken on gdal https://trac.osgeo.org/gdal/report/9

But I don't have admin rights to fix those.

At any rate I suspect the logs you are seeing are a result of crawlers trying to access those reports and many on archived trackers. So I don't think it's worth fixing.

Note: See TracTickets for help on using tickets.