From: Frédéric Buclin Date: Fri, 7 Dec 2012 13:09:04 +0000 (+0100) Subject: Bug 818007: Searching by commenter is slow X-Git-Tag: bugzilla-4.2.5~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=317c9afd691564304f448066b961554eb966039a;p=thirdparty%2Fbugzilla.git Bug 818007: Searching by commenter is slow r=dkl a=LpSolit --- diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index 95f03a6ae8..656d163ea8 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -2269,7 +2269,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};