From: Frédéric Buclin Date: Tue, 16 Aug 2011 01:33:23 +0000 (+0200) Subject: Bug 654496: Duplicate bug detection doesn't work when using Oracle X-Git-Tag: bugzilla-4.0.3~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7de3ef2e9898af3e629436d49c32d79630f2b0dc;p=thirdparty%2Fbugzilla.git Bug 654496: Duplicate bug detection doesn't work when using Oracle r/a=mkanat --- diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 62259f57ac..98d2825385 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -526,8 +526,8 @@ sub possible_duplicates { FROM bugs INNER JOIN bugs_fulltext ON bugs.bug_id = bugs_fulltext.bug_id WHERE ($where_sql) $product_sql - ORDER BY relevance DESC, bug_id DESC - LIMIT $sql_limit", {Slice=>{}}); + ORDER BY relevance DESC, bug_id DESC " . + $dbh->sql_limit($sql_limit), {Slice=>{}}); my @actual_dupe_ids; # Resolve duplicates into their ultimate target duplicates. diff --git a/Bugzilla/DB/Oracle.pm b/Bugzilla/DB/Oracle.pm index b800a1e622..df815c9a82 100644 --- a/Bugzilla/DB/Oracle.pm +++ b/Bugzilla/DB/Oracle.pm @@ -177,7 +177,7 @@ sub sql_fulltext_search { my ($self, $column, $text, $label) = @_; $text = $self->quote($text); trick_taint($text); - return "CONTAINS($column,$text,$label)", "SCORE($label)"; + return "CONTAINS($column,$text,$label) > 0", "SCORE($label)"; } sub sql_date_format {