Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-55

Nested transaction emulation doesn't support rollback inside a nested transaction

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-BETA4
    • Fix Version/s: 2.0.0-RC1-RC3
    • Component/s: None
    • 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.

        Activity

        Lukas Kahwe created issue -
        Hide
        Lukas Kahwe added a comment -

        ok .. i am working on a patch

        Show
        Lukas Kahwe added a comment - ok .. i am working on a patch
        Hide
        Benjamin Eberlei added a comment -

        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.

        Show
        Benjamin Eberlei added a comment - 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.
        Hide
        Lukas Kahwe added a comment -

        yup .. thats what i am doing

        Show
        Lukas Kahwe added a comment - yup .. thats what i am doing
        Hide
        Lukas Kahwe added a comment -

        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

        Show
        Lukas Kahwe added a comment - 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
        Hide
        Benjamin Eberlei added a comment -

        merged.

        Show
        Benjamin Eberlei added a comment - merged.
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0.0-RC1 [ 10094 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 11960 ] jira-feedback2 [ 17668 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17668 ] jira-feedback3 [ 20023 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DBAL-55, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Lukas Kahwe
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: