From 9e7eab5037ebe808f5344aa5376fbe65529c553d Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sun, 22 May 2005 20:46:55 +0000 Subject: Bug 291539: Flags get duplicated if multiple inclusions apply - Patch by Frédéric Buclin r=joel a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/FlagType.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Bugzilla/FlagType.pm') diff --git a/Bugzilla/FlagType.pm b/Bugzilla/FlagType.pm index d07bb0b65..fdf790e75 100644 --- a/Bugzilla/FlagType.pm +++ b/Bugzilla/FlagType.pm @@ -249,7 +249,9 @@ sub match { my @criteria = sqlify_criteria($criteria, \@tables); # Build the query, grouping the types if we are counting flags. - my $select_clause = "SELECT " . join(", ", @columns); + # DISTINCT is used in order to count flag types only once when + # they appear several times in the flaginclusions table. + my $select_clause = "SELECT DISTINCT " . join(", ", @columns); my $from_clause = "FROM " . join(" ", @tables); my $where_clause = "WHERE " . join(" AND ", @criteria); -- cgit v1.2.3-24-g4f1b