On Fri, 2003-11-14 at 02:50, Christophe Musielak wrote:
> my $db = DBI->connect($dsn,$user, $password, { AutoCommit => 1,
> RaiseError => 1 } )||
> die "ERROR NO_CONNECTION_TO_POSTMASTER\n";
> 
> print "$db"."\n";
> 
> print "".$db->{AutoCommit}."\n";
> 
> $db->{AutoCommit} = 0;
> 
> print "".$db->{AutoCommit}."\n";
> 
> my $db2 = DBI->connect($dsn,$user, $password, { AutoCommit => 1,
> RaiseError => 1 } )||
> die "ERROR NO_CONNECTION_TO_POSTMASTER\n";
> 
> print "$db"."\n";
> print "".$db->{AutoCommit}."\n";
> 
> -----------------------------
> 
> And here is the result :
> 
> Database::Dbh = Apache::DBI::db=HASH(0x8f95d28)
> Database::Dbh =1
> Database::Dbh =  # ok AutoCommit Off
> Database::Dbh = Apache::DBI::db=HASH(0x8f95d28) # ok same handler
> Database::Dbh =1 <<<<<<< AutoCommit back On !!

Thanks for the example, now I understand the issue and I can reproduce
it on my system.

> Is this a normal behave of Apache::DBI or am i missing something?

I don't think this is intentional, and it certainly seems like incorrect
behavior.  DBI does some very strange things internally with TIE in
order to allow you to set these attributes, and I think that is getting
confused somehow.  I'm not an expert on DBI internals, so I don't know
exactly where the problem is.  You should probably try writing to the
dbi-users list.  I'll try to look into it a little more later if I have
some time.

If you do find an answer, please post it to this list.

- Perrin

-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Reply via email to