From: lpsolit%gmail.com <> Date: Thu, 26 Feb 2009 20:52:40 +0000 (+0000) Subject: Bug 477745: [Oracle] Search doesn't work because of sql_string_until - Patch by Xiaoo... X-Git-Tag: bugzilla-3.3.4~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9a255ebf46695b350cc5a9f917247537b5be911;p=thirdparty%2Fbugzilla.git Bug 477745: [Oracle] Search doesn't work because of sql_string_until - Patch by Xiaoou r/a=mkanat --- diff --git a/Bugzilla/DB/Oracle.pm b/Bugzilla/DB/Oracle.pm index 83ece2a05b..23b97a0d2a 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) = @_;