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

        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: