Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Apache::DBI and AutoCommit

by antitrust (Initiate)
on Feb 20, 2006 at 13:32 UTC ( #531402=perlquestion: print w/ replies, xml ) Need Help??
antitrust has asked for the wisdom of the Perl Monks concerning the following question:

AutoCommit flag resets on my database handle, every time I call "connect_cached". Is this a known "feature" or am I missing something?

The problem is that I "begin_work" a transaction and do some queries. If now I call "connect_cached", it returns me the same handle (at least dbh with the same mysql_thread_id), but AutoCommit flag on that handle is set to 1! How is that possible?

Comment on Apache::DBI and AutoCommit
Re: Apache::DBI and AutoCommit
by rdfield (Priest) on Feb 20, 2006 at 14:32 UTC
    Apache::DBI is transparent in use (it says so in the docs), thus just calling "connect" is fine. The DBI docs say "the behaviour of this method differs in several respects from the behaviour of persistent connections implemented by Apache::DBI" about connect_cached. So I guess using Apache::DBI and then calling connect_cached could be the causing some conflicts.

    rdfield

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://531402]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2014-09-01 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (299 votes), past polls