From a9624e2ce485a6de1edce381331ae1dd6f0185fe Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Sat, 3 Nov 2012 00:18:32 +0100 Subject: Bug 804505: Oracle crashes when typing "word1 word2" in QuickSearch with "ORA-29907: found duplicate labels in primary invocations" r=dkl a=LpSolit --- Bugzilla/DB/Oracle.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Bugzilla/DB/Oracle.pm') diff --git a/Bugzilla/DB/Oracle.pm b/Bugzilla/DB/Oracle.pm index 4a69db16d..ebf59533f 100644 --- a/Bugzilla/DB/Oracle.pm +++ b/Bugzilla/DB/Oracle.pm @@ -56,6 +56,8 @@ use constant BLOB_TYPE => { ora_type => ORA_BLOB }; use constant MIN_LONG_READ_LEN => 32 * 1024; use constant FULLTEXT_OR => ' OR '; +our $fulltext_label = 0; + sub new { my ($class, $params) = @_; my ($user, $pass, $host, $dbname, $port) = @@ -171,11 +173,13 @@ sub sql_from_days{ return " TO_DATE($date,'J') "; } + sub sql_fulltext_search { - my ($self, $column, $text, $label) = @_; + my ($self, $column, $text) = @_; $text = $self->quote($text); trick_taint($text); - return "CONTAINS($column,$text,$label) > 0", "SCORE($label)"; + $fulltext_label++; + return "CONTAINS($column,$text,$fulltext_label) > 0", "SCORE($fulltext_label)"; } sub sql_date_format { -- cgit v1.2.3-24-g4f1b