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)
Tracking
()
RESOLVED
FIXED
Bugzilla 5.0
People
(Reporter: mtyson, Assigned: mtyson)
Details
Attachments
(2 files)
|
288 bytes,
patch
|
glob
:
review+
|
Details | Diff | Splinter Review |
|
544 bytes,
patch
|
Details | Diff | Splinter 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 3•10 years ago
|
||
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? :(
| Assignee | ||
Comment 4•10 years ago
|
||
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.
Description
•