[DBAL-55] Nested transaction emulation doesn't support rollback inside a nested transaction Created: 29/Sep/10  Updated: 01/Oct/10  Resolved: 01/Oct/10

Status: Resolved
Project: Doctrine DBAL
Component/s: None
Affects Version/s: 2.0.0-BETA4
Fix Version/s: 2.0.0-RC1-RC3

Type: Bug Priority: Major
Reporter: Lukas Kahwe Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


It seems like beginTransaction() counts transaction nesting levels, but it doesnt set a savepoint when starting a new nesting level, nor does it therefore support rollbacks when rolling back inside a nested transaction. This means that I could call rollback() and it doesnt actually do anything, which imho is a bug.

The feature of using savepoints to emulate nested transactions properly seems to be present in Doctrine1.

Comment by Lukas Kahwe [ 30/Sep/10 ]

ok .. i am working on a patch

Comment by Benjamin Eberlei [ 30/Sep/10 ]

I guess we need new methods on AbstractPlatform to return the SQL to set, release and rollback a savepoint and then extend the Doctrine\DBAL\Connection to work with that.

Comment by Lukas Kahwe [ 30/Sep/10 ]

yup .. thats what i am doing

Comment by Lukas Kahwe [ 30/Sep/10 ]

did some initial work: http://github.com/lsmith77/dbal/tree/savepoints

not quite sure about the changes i had to do in the unittest.
probably should add new unit tests too.
also there are a couple of questions i have in the connection class

Comment by Benjamin Eberlei [ 01/Oct/10 ]


Generated at Thu Aug 27 17:33:37 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.