From: mkanat%bugzilla.org <> Date: Mon, 30 Jun 2008 02:34:36 +0000 (+0000) Subject: Bug 421064: [Oracle] whine.pl crashes and doesn't work X-Git-Tag: bugzilla-3.3.1~282 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ed763d945ffe2a468871d4731f3bd001caab21c;p=thirdparty%2Fbugzilla.git Bug 421064: [Oracle] whine.pl crashes and doesn't work Patch By Xiaoou Wu r=mkanat, a=mkanat --- diff --git a/Bugzilla/DB/Oracle.pm b/Bugzilla/DB/Oracle.pm index 19ebbb2c58..82d040dbff 100644 --- a/Bugzilla/DB/Oracle.pm +++ b/Bugzilla/DB/Oracle.pm @@ -171,8 +171,11 @@ sub sql_date_format { sub sql_interval { my ($self, $interval, $units) = @_; - - return "INTERVAL " . $self->quote($interval) . " $units"; + if ($units =~ /YEAR|MONTH/i) { + return "NUMTOYMINTERVAL($interval,'$units')"; + } else{ + return "NUMTODSINTERVAL($interval,'$units')"; + } } sub sql_position { @@ -490,7 +493,7 @@ sub bz_setup_database { } package Bugzilla::DB::Oracle::st; -use base qw(DBD::Oracle::st); +use base qw(DBI::st); sub fetchrow_arrayref { my $self = shift; @@ -545,5 +548,13 @@ sub fetchall_hashref { } return $ref; } - + +sub fetch { + my $self = shift; + my $row = $self->SUPER::fetch(@_); + if ($row) { + Bugzilla::DB::Oracle::_fix_arrayref($row); + } + return $row; +} 1;