diff options
author | mkanat%bugzilla.org <> | 2008-06-30 04:34:36 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2008-06-30 04:34:36 +0200 |
commit | 9ed763d945ffe2a468871d4731f3bd001caab21c (patch) | |
tree | 71a86656b3adfe151854510d489e16f90a88f2e1 | |
parent | 0a566f92417aa741828413b00585f48f72b5c639 (diff) | |
download | bugzilla-9ed763d945ffe2a468871d4731f3bd001caab21c.tar.gz bugzilla-9ed763d945ffe2a468871d4731f3bd001caab21c.tar.xz |
Bug 421064: [Oracle] whine.pl crashes and doesn't work
Patch By Xiaoou Wu <xiaoou.wu@oracle.com> r=mkanat, a=mkanat
-rw-r--r-- | Bugzilla/DB/Oracle.pm | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Bugzilla/DB/Oracle.pm b/Bugzilla/DB/Oracle.pm index 19ebbb2c5..82d040dbf 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; |