]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 654496: Duplicate bug detection doesn't work when using Oracle
authorFrédéric Buclin <LpSolit@gmail.com>
Tue, 16 Aug 2011 01:30:14 +0000 (03:30 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Tue, 16 Aug 2011 01:30:14 +0000 (03:30 +0200)
r/a=mkanat

Bugzilla/Bug.pm
Bugzilla/DB/Oracle.pm

index aa4eddd4c4d5d0123ce03fa33b0e304cf7eab34a..8b322031b844da258ab4a9b944ac8280a194f05e 100644 (file)
@@ -559,8 +559,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.
index f444129e14804c0ac17aac5ec190184293d3956b..d91eb428e6899a9332694918b6033ae2c5cc5008 100644 (file)
@@ -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 {