Closed Bug 1145438 Opened 10 years ago Closed 10 years ago

DB Crash under postgres when using alias column in buglist.cgi

Categories

(Bugzilla :: Database, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: mtyson, Assigned: mtyson)

Details

Attachments

(2 files)

Attached patch Group by skipSplinter Review
Postgres does not allow aggregates in a group by column. When you add the alias column to your list of columns in buglist.cgi, it will crash with the following: DBD::Pg::db selectall_arrayref failed: ERROR: aggregate functions are not allowed in GROUP BY LINE 17: ...,map_component.name,bugs.short_desc,bugs.delta_ts,STRING_AGG... Attached is a patch to add alias to the GROUP_BY_SKIP constant in Bugzilla/Search.pm Tested on postgres 9.3 with trunk code.
Attachment #8580377 - Flags: review?(glob)
Comment on attachment 8580377 [details] [diff] [review] Group by skip Review of attachment 8580377 [details] [diff] [review]: ----------------------------------------------------------------- r=glob
Attachment #8580377 - Flags: review?(glob) → review+
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 5c8594a..377de9b master -> master To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git f5fb20f..5813ef5 5.0 -> 5.0
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: approval5.0+
Flags: approval+
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 5.0
Version: 5.1 → 5.0
Comment on attachment 8580377 [details] [diff] [review] Group by skip use constant GROUP_BY_SKIP => qw( > longdescs.count > percentage_complete > tag >+ alias > ); Could you keep this list sorted alphabetically, please? :(
Attached patch Fix the orderingSplinter Review
Oops, sorry about messing up the ordering. This should fix it.
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 4aa1485..7559020 master -> master To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 485ad42..516f99e 5.0 -> 5.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: