Karl Forner wrote:
I'm  experiencing a very strange problem : in short, I could not reconnect
to a DB using DBI once I successfully connected then failed (with bad
password for example), IN THAT ORDER.

I made a script reproducing the bug:
=================
#!/usr/bin/env perl
use strict;
use warnings;
use DBI;

my $dsn = 'dbi:Oracle:sid=TITI;host=xxx.yyy.zzz.com;port=1521';
my $user        = 'toto';
my $password    = $user;
my $options =  { AutoCommit => 0 };
my @goodinfo = ($dsn, $user, $password, $options);
my @badinfo = ($dsn, $user, '', $options);

test(@goodinfo);
test(@badinfo);
test(@goodinfo);
test(@goodinfo);

sub test {
    my $dbh;
    eval { $dbh = DBI->connect(@_) };
    warn "$...@\n" if $@;
    print $dbh ? "Ok" : "NOK";
    print "\n";
}

========

so I expect to get "OK NOK OK OK".
But on one computer I get "OK NOK NOK NOK", and on another I get the
expected stuff (using the same database)

But if I do
test(@badinfo);
 test(@goodinfo);
test(@goodinfo);

I get "NOK OK OK" on both !!!!!!!

Is this a bug ??

Thanks
Karl Forner

P.S

Here are the configs :

working computer:
arch: ia64
OS: Suse ES 9
perl -v :  v5.8.6
DBI: 1.607
DBD::Oracle: 1.16

buggy computer:
arch: i686
OS : ubuntu 8.04
perl -v :  v5.8.8
DBI: 1.601
DBD::Oracle: 1.22


I think if you add add "ora_envhp => 0" to your options it will work.
See the DBD::Oracle pod for an explanation.

Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com

Reply via email to