summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-12-13 22:13:27 +0100
committermkanat%bugzilla.org <>2009-12-13 22:13:27 +0100
commit1f2dc1d01e232afb236f382f85609853aac6868d (patch)
tree5904fed9ecb6e37c2fbe9ef1ae6d2214a17af43a /Bugzilla/DB
parent6b3943deaa1f0572668c0411ad0dc0193c4f8991 (diff)
downloadbugzilla-1f2dc1d01e232afb236f382f85609853aac6868d.tar.gz
bugzilla-1f2dc1d01e232afb236f382f85609853aac6868d.tar.xz
Bug 505826: Allow boolean searches on the Comment field in Oracle.
Patch by Xiaoou Wu <xiaoou.wu@oracle.com> r=mkanat, a=mkanat
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r--Bugzilla/DB/Oracle.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/Bugzilla/DB/Oracle.pm b/Bugzilla/DB/Oracle.pm
index 4f19269a6..801823372 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);