Doctrine 1
  1. Doctrine 1
  2. DC-1022

Doctrine migration does not set version when MySQL autocommit is false

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Migrations
    • Labels:
      None
    • Environment:
      RHEL 6.0, mysql 5.1.52

      Description

      With autocommit set to off in mysqld, Doctrine_Migration::setCurrentVersion() does not have any effect. This is because the method uses raw PDO calls, which are discarded without either autocommit or an explicit COMMIT;.

      We patched Doctrine as in the attachment. It works for us, but may not be the best general solution.

      The patch only fixes this one issue. There are likely many areas in Doctrine that rely upon autocommit behavior in MySQL. We will continue to look for them, and supply patches as we find them. However, as we are only concerned about MySQL, our solutions will probably not apply to other PDO drivers.

        Activity

        Adam Fineman created issue -
        Adam Fineman made changes -
        Field Original Value New Value
        Description With autocommit set to off in mysqld, {{Doctrine_Migration::setCurrentVersion()}} does not have any effect. This is because the method uses raw PDO calls, which are discarded without either autocommit or an explicit {{COMMIT;}}.

        We patched Doctrine as in the attachment. It works for us, but may not be the best general solution.
        With autocommit set to off in mysqld, {{Doctrine_Migration::setCurrentVersion()}} does not have any effect. This is because the method uses raw PDO calls, which are discarded without either autocommit or an explicit {{COMMIT;}}.

        We patched Doctrine as in the attachment. It works for us, but may not be the best general solution.

        The patch only fixes this one issue. There are likely many areas in Doctrine that rely upon autocommit behavior in MySQL. We will continue to look for them, and supply patches as we find them. However, as we are only concerned about MySQL, our solutions will probably not apply to other PDO drivers.
        Guilherme Blanco made changes -
        Fix Version/s 1.2.4 [ 10063 ]

        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=DC-1022, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Adam Fineman
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: