Hi,

Please can I have some feed back on this. This patch fixes the noted issue in 
the Apache::DBI POD.

        Note, that this CleanupHandler will only be used, if
        the initial data_source sets AutoCommit => 0. It will not be used, if 
        AutoCommit will be turned off, after the connect has been done.

This is not strictly the only case where this happens. Came accross an issue
when trying to reduce creation of handles on a site.

Currently Apache::DBI makes the assumption that it AutoCommit => 1 then the
handle does not need cleaning up. This is not neccessarily true as begin_work 
switches off the AutoCommit for one transaction.

To be safe the handle should always be cleaned up otherwise next time it is 
requested it may be mid transaction. This patch does not seem to effect 
performance in the general case although it does have a minor hit.

Also any of the DBI variables for a connection can be altered post connection 
which results in the cached handle becomming corruptedi for the next request. 
Especially nasty can beLongTruncOk being changed behind your back.

Patch is against the Apache::DBI v0.7 CVS tree. Tested against MP1 on Linux/
Solaris.

Please can I have some feed back from people using Apache::DBI and begin_work
who have experienced strange behaviour on there system. Hope it helps

Paddy

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to