[Dbix-class] transaction depth not reset in 0.08003

Jonathan Tweed jonathan at tweed.name
Wed Jul 18 20:20:45 GMT 2007


On 18 Jul 2007, at 20:11, Brandon Black wrote:

> On 7/18/07, Richard Jolly <Richard.Jolly at bbc.co.uk> wrote:
>> Hi,
>>
>> We've just been trying upgrading to 0.08003 from 0.07000. Mostly  
>> fine,
>> but one problem with transactions. If a transaction fails the
>> transaction depth is not reset. The end result is that if you have  
>> two
>> failing transactions in a row, the second is actually not in a
>> transaction.
>>
>
> Someone mentioned this on irc the other day too.  I've made a little
> bit of headway, in that the source of the problem seems to be that
> $dbh->{AutoCommit} seems to have the wrong value.  I haven't figured
> out why yet, but if you put in some debugging (print STDERR)
> statements in Storage::DBI in the txn_* funcs, you can see
> $dbh->{AutoCommit} being false when it should be true...

Yeah this is exactly what we were seeing (I work with Richard).

AutoCommit was somehow an empty string rather than 1, which meant  
that transaction_depth wasn't getting reset to 0. As to what's  
causing that we have no idea.

Cheers
Jonathan



More information about the Dbix-class mailing list