diff options
author | mkanat%bugzilla.org <> | 2007-12-13 10:14:32 +0100 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2007-12-13 10:14:32 +0100 |
commit | a4b66874db35b0ad64257b202dc48d43924eb14e (patch) | |
tree | b8bc2ff96e223c326810d5d9c032286d61e2b1da /Bugzilla/DB/Oracle.pm | |
parent | 5c779ad57796cf6c1f88efe2f3b88b1b96144004 (diff) | |
download | bugzilla-a4b66874db35b0ad64257b202dc48d43924eb14e.tar.gz bugzilla-a4b66874db35b0ad64257b202dc48d43924eb14e.tar.xz |
Bug 408032: [Oracle] Make bzdbcopy.pl work with Oracle
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=mkanat
Diffstat (limited to 'Bugzilla/DB/Oracle.pm')
-rw-r--r-- | Bugzilla/DB/Oracle.pm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Bugzilla/DB/Oracle.pm b/Bugzilla/DB/Oracle.pm index 509dedaa1..a970e3193 100644 --- a/Bugzilla/DB/Oracle.pm +++ b/Bugzilla/DB/Oracle.pm @@ -406,7 +406,30 @@ sub quote_identifier { return $id; } +##################################################################### +# Protected "Real Database" Schema Information Methods +##################################################################### +sub bz_table_columns_real { + my ($self, $table) = @_; + $table = uc($table); + my @cols = $self->SUPER::bz_table_columns_real($table); + return map { lc($_) } @cols; +} + +sub bz_table_list_real { + my ($self) = @_; + # Oracle only accepts the username in uppercase. + my $db_user = uc(Bugzilla->localconfig->{db_user}); + my $table_sth = $self->table_info(undef, $db_user, undef, "TABLE"); + my @tables = @{$self->selectcol_arrayref($table_sth, { Columns => [3] })}; + # Oracle returns uppercase table names, but Bugzilla expects lowercase + # names. + @tables = map { lc($_) } @tables; + # Oracle has certain tables that start with DR$_IDX. + @tables = grep { $_ !~ /^dr\$/ } @tables; + return @tables; +} ##################################################################### # Custom Database Setup |