]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 818007: Searching by commenter is slow
authorFrédéric Buclin <LpSolit@gmail.com>
Fri, 7 Dec 2012 13:04:38 +0000 (14:04 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Fri, 7 Dec 2012 13:04:38 +0000 (14:04 +0100)
r=dkl a=LpSolit

Bugzilla/Search.pm

index 22e837d462ddf0dc42a6f0fb7bd7405ca97445de..b9c37b4ed385e726bcf7d033de01498c50a42bd3 100644 (file)
@@ -2282,7 +2282,7 @@ sub _user_nonchanged {
             my $table = $first_join->{table};
             my $columns = "bug_id";
             $columns .= ",isprivate" if @{ $first_join->{extra} };
-            my $new_table = "SELECT $columns FROM $table AS $as $join_sql";
+            my $new_table = "SELECT DISTINCT $columns FROM $table AS $as $join_sql";
             $first_join->{table} = "($new_table)";
             # We always want to LEFT JOIN the generated table.
             delete $first_join->{join};