From: mkanat%bugzilla.org <> Date: Sun, 13 Dec 2009 21:13:27 +0000 (+0000) Subject: Bug 505826: Allow boolean searches on the Comment field in Oracle. X-Git-Tag: bugzilla-3.5.3~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f2dc1d01e232afb236f382f85609853aac6868d;p=thirdparty%2Fbugzilla.git Bug 505826: Allow boolean searches on the Comment field in Oracle. Patch by Xiaoou Wu r=mkanat, a=mkanat --- diff --git a/Bugzilla/DB/Oracle.pm b/Bugzilla/DB/Oracle.pm index 4f19269a69..8018233720 100644 --- a/Bugzilla/DB/Oracle.pm +++ b/Bugzilla/DB/Oracle.pm @@ -347,6 +347,10 @@ sub adjust_statement { # Oracle need no 'AS' $nonstring =~ s/\bAS\b//ig; + + # Take the first 4000 chars for comparison + $nonstring =~ s/\(\s*(longdescs_\d+\.thetext|attachdata_\d+\.thedata)/ + \(DBMS_LOB.SUBSTR\($1, 4000, 1\)/ig; # Look for a LIMIT clause ($limit) = ($nonstring =~ m(/\* LIMIT (\d*) \*/)o);