]> 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:06:53 +0000 (14:06 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Fri, 7 Dec 2012 13:06:53 +0000 (14:06 +0100)
r=dkl a=LpSolit

Bugzilla/Search.pm

index 542b9afec5df7b9c17c4fc616ada7fad5dbf49ff..18a22173245ea5520779331d88932954e9bafc9b 100644 (file)
@@ -2281,7 +2281,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};