Commit 9ed763d9 authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 421064: [Oracle] whine.pl crashes and doesn't work

Patch By Xiaoou Wu <xiaoou.wu@oracle.com> r=mkanat, a=mkanat
parent 0a566f92
...@@ -171,8 +171,11 @@ sub sql_date_format { ...@@ -171,8 +171,11 @@ sub sql_date_format {
sub sql_interval { sub sql_interval {
my ($self, $interval, $units) = @_; my ($self, $interval, $units) = @_;
if ($units =~ /YEAR|MONTH/i) {
return "INTERVAL " . $self->quote($interval) . " $units"; return "NUMTOYMINTERVAL($interval,'$units')";
} else{
return "NUMTODSINTERVAL($interval,'$units')";
}
} }
sub sql_position { sub sql_position {
...@@ -490,7 +493,7 @@ sub bz_setup_database { ...@@ -490,7 +493,7 @@ sub bz_setup_database {
} }
package Bugzilla::DB::Oracle::st; package Bugzilla::DB::Oracle::st;
use base qw(DBD::Oracle::st); use base qw(DBI::st);
sub fetchrow_arrayref { sub fetchrow_arrayref {
my $self = shift; my $self = shift;
...@@ -546,4 +549,12 @@ sub fetchall_hashref { ...@@ -546,4 +549,12 @@ sub fetchall_hashref {
return $ref; return $ref;
} }
sub fetch {
my $self = shift;
my $row = $self->SUPER::fetch(@_);
if ($row) {
Bugzilla::DB::Oracle::_fix_arrayref($row);
}
return $row;
}
1; 1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment