summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB/Oracle.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-02-26 21:52:40 +0100
committerlpsolit%gmail.com <>2009-02-26 21:52:40 +0100
commitc9a255ebf46695b350cc5a9f917247537b5be911 (patch)
tree1ec0d5c0f36536157f2672e961565dfa4c8256bb /Bugzilla/DB/Oracle.pm
parentb4765a3ca8eb898a752f4a77bc9d4a520ee499c7 (diff)
downloadbugzilla-c9a255ebf46695b350cc5a9f917247537b5be911.tar.gz
bugzilla-c9a255ebf46695b350cc5a9f917247537b5be911.tar.xz
Bug 477745: [Oracle] Search doesn't work because of sql_string_until - Patch by Xiaoou <xiaoou.wu@oracle.com> r/a=mkanat
Diffstat (limited to 'Bugzilla/DB/Oracle.pm')
-rw-r--r--Bugzilla/DB/Oracle.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/Bugzilla/DB/Oracle.pm b/Bugzilla/DB/Oracle.pm
index 83ece2a05..23b97a0d2 100644
--- a/Bugzilla/DB/Oracle.pm
+++ b/Bugzilla/DB/Oracle.pm
@@ -149,6 +149,13 @@ sub sql_string_concat {
return 'CONCAT(' . join(', ', @params) . ')';
}
+sub sql_string_until {
+ my ($self, $string, $substring) = @_;
+ return "SUBSTR($string, 1, "
+ . $self->sql_position($substring, $string)
+ . " - 1)";
+}
+
sub sql_to_days {
my ($self, $date) = @_;