Commit 9e7eab50 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 291539: Flags get duplicated if multiple inclusions apply - Patch by…

Bug 291539: Flags get duplicated if multiple inclusions apply - Patch by Frédéric Buclin <LpSolit@gmail.com> r=joel a=justdave
parent ca07b6eb
...@@ -249,7 +249,9 @@ sub match { ...@@ -249,7 +249,9 @@ sub match {
my @criteria = sqlify_criteria($criteria, \@tables); my @criteria = sqlify_criteria($criteria, \@tables);
# Build the query, grouping the types if we are counting flags. # 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 $from_clause = "FROM " . join(" ", @tables);
my $where_clause = "WHERE " . join(" AND ", @criteria); my $where_clause = "WHERE " . join(" AND ", @criteria);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment