summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB/Oracle.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/DB/Oracle.pm')
-rw-r--r--Bugzilla/DB/Oracle.pm19
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;