Subject: | Use of uninitialized value $user_only in uc |
Running
#!perl -w
use DBI();
use DBD::Oracle();
my $att = { RaiseError => 1 };
$att->{ora_session_mode} = DBD::Oracle::ORA_SYSDBA
| DBD::Oracle::OCI_PRELIM_AUTH;
my @cxn = ('dbi:Oracle:', undef, undef, $att );
my $dbh = DBI->connect( @cxn );
$dbh->disconnect;
gives
Use of uninitialized value $user_only in uc ...
at Oracle.pm line 310.
The attached patch fixes this.
Subject: | Oracle.pm.diff |
--- Oracle.160 Mon Apr 01 17:42:12 2013
+++ Oracle.pm Tue Apr 16 09:46:36 2013
@@ -304,7 +304,7 @@
unless (length $user_only) {
$user_only = $dbh->selectrow_array(q{
SELECT SYS_CONTEXT('userenv','session_user') FROM DUAL
- });
+ })||'';
$dbh_inner->{Username} = $user_only;
# these two are just for backwards compatibility
$dbh_inner->{USER} = $dbh_inner->{CURRENT_USER} = uc $user_only;