Subscription.add and Subscription._update_priority incorrectly use CURRENT_TIMESTAMP on BIGINT column
|Reported by:||anonymous||Owned by:||hasienda|
The subscription table columns time and changetime are BIGINT as per most of the rest of Trac, which stores time data as microseconds since Unix epoch. However, AnnouncerPlugin uses CURRENT_TIMESTAMP when inserting the data, which returns an ISO-8601 string, and this is not appropriate for the given column type. With MySQL backend, MySQL silently mangles the data to “2010”; with PostgreSQL backend, an error is raised (cannot cast type timestamp with time zone to bigint). This means the plugin does not work at all on Postgres, and works incorrectly on MySQL.
Change History (10)
comment:3 in reply to: ↑ 1 Changed 4 years ago by hasienda
- Keywords database API added
- Severity changed from normal to major