[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


 Description   

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.



 Comments   
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 ]

merged.

Generated at Wed Apr 23 17:01:27 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.