Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^8: Tricks with DBI

by thor (Priest)
on Dec 26, 2005 at 15:46 UTC ( #519158=note: print w/ replies, xml ) Need Help??

in reply to Re^7: Tricks with DBI
in thread Tricks with DBI

I was thinking about the OPs problem over dinner yesterday. I would imagine that the problem exists when you've got one handle open for read and you need to open another one with exactly the same statement. I wonder if prepare_cached could be changed to instead of just storing one handle, store an arrayref of them. When prepare_cached was called, it would go to the appropriate arrayref (via a hash lookup), and start iterating, calling $sth->{Active} on each until it finds one that isn't active, at which point it returns that one. If it fails to find an inactive one, it creates a new one and stores it. In the general case, you'd have only one stored. But, in cases like the OPs, it would just magically work. :)


The only easy day was yesterday

Comment on Re^8: Tricks with DBI

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://519158]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2015-11-29 09:10 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (750 votes), past polls