[Dbix-class] ROLLBACK seems to be skipped on 0.08

Brandon Black blblack at gmail.com
Fri Oct 19 14:59:57 GMT 2007


On 10/19/07, Jesper Krogh <jesper at krogh.cc> wrote:
> > On 10/18/07, Jesper Krogh <jesper at krogh.cc> wrote:
> >> There is a change in the behaviour of
> >> $schema->txn_rollback from 0.07* to 0.08*
> No rollback present for 0.08
>

I think I see the problem in the code, but I'm still flipping it
around in my head to decide the best course of action.  The essentials
of the problem is that DBIC supports fake nested transactions, and it
tracks this with a transaction_depth attribute, so that it doesn't
take real action until the outermost transaction is done.  However,
the implementation is clearly flawed with AutoCommit off.

To confirm, do your results improve if you comment out your
->txn_begin lines?  I believe this will make the depth counter work
correctly, and txn_begin is really a functional no-op with autocommit
off anyways.  I suspect the same bug affects commits too (assuming one
started with txn_begin without autocommit), not just rollbacks, so I
wouldn't expect this to be a very subtle problem.

-- Brandon



More information about the DBIx-Class mailing list