From f89f20583287fd49e54f4e0818f2d7ea46b58034 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Tue, 16 Aug 2011 03:32:06 +0200 Subject: [PATCH] Bug 654496: Duplicate bug detection doesn't work when using Oracle r/a=mkanat --- Bugzilla/Bug.pm | 4 ++-- Bugzilla/DB/Oracle.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 40bf3af2e0..c9ccf541d3 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -554,8 +554,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 f444129e14..d91eb428e6 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 { -- 2.47.2