Bug 291539: Flags get duplicated if multiple inclusions apply - Patch by Fr�d�ric Buclin <LpSolit@gmail.com> r=joel a=justdave

This commit is contained in:
lpsolit%gmail.com 2005-05-22 13:46:55 +00:00
parent d5590be210
commit c04f50c613

View File

@ -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);