summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Flag.pm
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-03-16 09:27:14 +0100
committermkanat%kerio.com <>2005-03-16 09:27:14 +0100
commitb99cbd1d893ff0a730ab7187f409bcdf3c6f4aeb (patch)
treeb2769bdde9c44eefd7834dcbc18e67e66d6d1aa9 /Bugzilla/Flag.pm
parent94dcd5edee079a1bb67a0011711d25a4be0f14c6 (diff)
downloadbugzilla-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 'Bugzilla/Flag.pm')
-rw-r--r--Bugzilla/Flag.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm
index ea60eebe4..7245edbfa 100644
--- a/Bugzilla/Flag.pm
+++ b/Bugzilla/Flag.pm
@@ -567,6 +567,8 @@ sub GetBug {
# Returns a hash of information about a target bug.
my ($id) = @_;
+ my $dbh = Bugzilla->dbh;
+
# Save the currently running query (if any) so we do not overwrite it.
&::PushGlobalSQLState();
@@ -574,8 +576,9 @@ sub GetBug {
COUNT(bug_group_map.group_id)
FROM bugs LEFT JOIN bug_group_map
ON (bugs.bug_id = bug_group_map.bug_id)
- WHERE bugs.bug_id = $id
- GROUP BY bugs.bug_id");
+ WHERE bugs.bug_id = $id " .
+ $dbh->sql_group_by('bugs.bug_id',
+ 'short_desc, product_id, component_id'));
my $bug = { 'id' => $id };