MantisBT: master-1.2.x c6ab7a0c

Author Committer Branch Timestamp Parent
dregad dregad master-1.2.x 2011-08-10 00:10 master-1.2.x 9ff8adc9
Affected Issues  0013228: APPLICATION ERROR #401 Bug in SQL query in bugnote_api.php
Changeset

Fix 0013228: SQL error in bugnote_api.php with PostgreSQL

ERROR: column "u.realname" must appear in the GROUP BY clause or be used in an
aggregate function

Bug was introduced in release 1.2.6, commit c4c0a01e1f715aea775a36d3a6c7bc8bd74b5b8b.
A new column was added to 2 SQL statements' SELECT clause, but the GROUP BY
was not updated to match.

This passed testing, as MySQL is more (too?) permissive and allows the SELECT
clause to refer to ungrouped columns that are not in aggregate functions.

This commit also removes unnecessary "u.id" column from the group by clause.

mod - core/bugnote_api.php Diff File