I have just built DBD::Oracle 1.23 on the following platform
OS: SUSE Linux Enterprise Server 10 (x86_64)
perl: 5.10.0 (64bit)
Oracle: 10.2.0.4 (64bit)
DBI: 1.607
I am happy to report that all is well ... except ...
When I first ran 'make test', three of the tests in t/58object.t
failed. I have found that this was because I ran the tests as
an externally identified user ( i.e. with ORACLE_USER=/ ).
The tests work if I run them as a user identified by a password.
The reason for this is that the script attempts to deduce the
current schema name from the logon credentials. Since an
externally identified user does not present a user name when
logging on, this does not work.
Below my sig is a patch against the distribution, which fixes this by
fetching the schema name from the database after logon.
I apologise for failing to notice this when testing 1.23-rc3.
I must have used a password when running 'make test'.
--
Charles Jardine - Computing Service, University of Cambridge
[email protected] Tel: +44 1223 334506, Fax: +44 1223 334679
--- DBD-Oracle-1.23/t/58object.t 2009-04-29 16:04:18.000000000 +0100
+++ DBD-Oracle-1.23.patched/t/58object.t 2009-05-01 10:55:47.657766467 +0
100
@@ -5,7 +5,7 @@
use strict;
use Data::Dumper;
-use Test::More tests => 34;
+use Test::More tests => 35;
unshift @INC ,'t';
require 'nchar_test_lib.pl';
@@ -25,8 +25,6 @@
PrintError => 0,
ora_objects => 1 });
-my ($schema) = $dbuser =~ m{^([^/]*)};
-
# Test ora_objects flag
cmp_ok($dbh->{ora_objects}, 'eq', '1', 'ora_objects flag is set to 1');
@@ -36,6 +34,10 @@
# check that our db handle is good
isa_ok($dbh, "DBI::db");
+ok(my $schema = $dbh->selectrow_array(
+ "select sys_context('userenv', 'current_schema') from dual"
+), 'Fetch current schema name');
+
my $obj_prefix = "dbd_test_";
my $super_type = "${obj_prefix}_type_A";
my $sub_type = "${obj_prefix}_type_B";