You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Patrick Mulvany <pa...@firedrake.org> on 2003/09/30 12:35:36 UTC

[Patch] Apache::DBI Clean Transaction handling

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


Re: [Patch] Apache::DBI Clean Transaction handling

Posted by Stas Bekman <st...@stason.org>.
Patrick Mulvany wrote:
> 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.
[...]

Patrick, you are better off sending requests for feedback to the modperl list, 
not the developers list. You may need to contact Ask with any doc patches, not 
the list.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org