On Wed, Feb 11, 2004 at 08:15:12AM -0500, Andrew Pimlott wrote:
> 
> > p.s.  The plan is to have a way for a driver to indicate if it's in a
> > transaction and, for drivers that can, use that to skip the warning.
> 
> Ok, so you'd like to issue the warning in the dangerous case only, but
> DBI doesn't have the necessary information.  That seems like a rather
> conspicuous flaw in the design, but I'm glad there's a plan to fix it!

Calling it a "conspicuous flaw in the design" glosses over the fact
that many drivers and database API's can't tell if they are or not.
(And it can't be very conspicuious as the warning has been there for
many years and few people have commented on it.)

I generally only add something to the DBI when the DBI can 'fake it'
for drivers that can't do it themselves. In this case the DBI will
count execute()/do() calls and reset the counter on commit()/rollback().
Then the counter can be used to control the warning for drivers that
can't tell if they're in a transaction or not.

Tinm.

Reply via email to