man DBI:
---------------8<---------------
...
The transaction behaviour of the "disconnect" method is, sadly,
undefined.  Some database systems (such as Oracle and Ingres) will
automatically commit any outstanding changes, but others (such as
Informix) will rollback any outstanding changes.  Applications not
using "AutoCommit" should explicitly call "commit" or "rollback"
before calling "disconnect".
...
---------------8<---------------

Jie Zhang wrote:
> Hi,
> 
> If I initiate a connection using autocommit=0 in DBI and I don't do a
> explicit connection->commit(), should transactions automatically commit
> after I do an explicit connection->disconnect()?  I was expecting an
> automatica rollback.  But the testing result is just the opposite.
> 
> For example:
> my $databaseHandle = DBI->connect( "", "[EMAIL PROTECTED]", "$pass",
> {AutoCommit => 0}, "Oracle" )
> deleteRecord;
> $databaseHandle->disconnect();
> 
> Should the delete query be commited?
> 
> thanks,
> 
> Jie
> 
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to