]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 505826: Allow boolean searches on the Comment field in Oracle.
authormkanat%bugzilla.org <>
Sun, 13 Dec 2009 21:13:27 +0000 (21:13 +0000)
committermkanat%bugzilla.org <>
Sun, 13 Dec 2009 21:13:27 +0000 (21:13 +0000)
Patch by Xiaoou Wu <xiaoou.wu@oracle.com> r=mkanat, a=mkanat

Bugzilla/DB/Oracle.pm

index 4f19269a694f5f3a0782b7b107af2b4f8e5dcf17..8018233720c175e17bd3adf5c7f38d0247652298 100644 (file)
@@ -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);