diff options
author | mkanat%kerio.com <> | 2005-03-16 09:27:14 +0100 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-03-16 09:27:14 +0100 |
commit | b99cbd1d893ff0a730ab7187f409bcdf3c6f4aeb (patch) | |
tree | b2769bdde9c44eefd7834dcbc18e67e66d6d1aa9 /request.cgi | |
parent | 94dcd5edee079a1bb67a0011711d25a4be0f14c6 (diff) | |
download | bugzilla-b99cbd1d893ff0a730ab7187f409bcdf3c6f4aeb.tar.gz bugzilla-b99cbd1d893ff0a730ab7187f409bcdf3c6f4aeb.tar.xz |
Bug 174295: ANSI SQL requires all columns in SELECT to be in GROUP BY, unless they are in "aggregate" functions
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=joel, a=myk
Diffstat (limited to 'request.cgi')
-rwxr-xr-x | request.cgi | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/request.cgi b/request.cgi index fa37344e2..7f3e6351c 100755 --- a/request.cgi +++ b/request.cgi @@ -206,8 +206,15 @@ sub queue { # Group the records by flag ID so we don't get multiple rows of data # for each flag. This is only necessary because of the code that # removes flags on bugs the user is unauthorized to access. - $query .= " GROUP BY flags.id " . - "HAVING cntuseringroups = cntbugingroups OR canseeanyway "; + $query .= ' ' . $dbh->sql_group_by('flags.id', + 'flagtypes.name, flags.status, flags.bug_id, bugs.short_desc, + products.name, components.name, flags.attach_id, + attachments.description, requesters.realname, + requesters.login_name, requestees.realname, + requestees.login_name, flags.creation_date, + cclist_accessible, bugs.reporter, bugs.reporter_accessible, + bugs.assigned_to'); + $query .= " HAVING cntuseringroups = cntbugingroups OR canseeanyway "; # Group the records, in other words order them by the group column # so the loop in the display template can break them up into separate |