Let's not get carried away with this thread.

When a DBI database handle is destroyed, either by the ref count
reaching 0 or by the 'global destruction' that happens when the
perl interpreter exits, the DESTROY method is called.

The DESTROY method naturally disconnects the database connection.

Database APIs differ in how they respond to a 'graceful disconnect'
in terms of transactions. Some will trigger a rollback while others,
including Oracle, will commit.

For databases which commit this means that if the program aborts for
any reason and incomplete transaction may be commited. Not good!

So the DBI issues a rollback if the DESTROY method is called while
the handle is still active and AutoCommit is false. It also issues
a warning if Warn is true (as it is by default).

All I'm proposing to change is to add a way for drivers to indicate
if they are in a transaction or not, and then to use that to disable
the warning.

Tim.

Reply via email to