Skip to content

Loading…

DBAL-55: Nested transaction emulation doesn't support rollback inside a nested transaction #1758

Closed
doctrinebot opened this Issue · 6 comments

2 participants

@doctrinebot

Jira issue originally created by user @lsmith77:

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.

@doctrinebot

Comment created by @lsmith77:

ok .. i am working on a patch

@doctrinebot

Comment created by @beberlei:

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.

@doctrinebot

Comment created by @lsmith77:

yup .. thats what i am doing

@doctrinebot

Comment created by @lsmith77:

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

@doctrinebot

Comment created by @beberlei:

merged.

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added the Bug label
@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0.0-RC1-RC3 milestone
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.