Ticket #873 (closed defect: fixed)

Opened 16 months ago

Last modified 16 months ago

Transactions do not work with the mssql driver

Reported by: zomg Owned by: somebody
Priority: minor Milestone: 0.10.4
Component: Other Version: 0.10.0
Severity: Keywords: mssql, transaction
Cc: Has Test:
Status: Has Patch:

Description

Doctrine::createTablesFromModels fails in MS SQL because PDO's MS SQL driver does not support transactions.

MS SQL itself supports transactions and it should be fixable, see  http://framework.zend.com/issues/browse/ZF-2319

Attachments

Mssql.php.patch (0.6 KB) - added by zomg 16 months ago.
Patch for Doctrine/Transaction/Mssql.php
Transaction.php.patch (2.1 KB) - added by zomg 16 months ago.
Patch for Doctrine/Transaction.php

Change History

Changed 16 months ago by zomg

I wrote some code which changes the behavior of transactions, but it does not seem to be working at least with MS SQL Server 2008. Using the approach shown in the linked page, the initial BEGIN TRANSACTION will work, but when reaching rollback, the database will inform that there is no transaction to roll back.

I don't know whether this is MS SQL 2008 specific or not.

Changed 16 months ago by zomg

Patch for Doctrine/Transaction/Mssql.php

Changed 16 months ago by zomg

The patch for Transaction.php adds a possibility to bypass the default transaction behavior by refactoring the code slightly. My initial test did not work out because of broken SQL queries and I've tested the behavior with these patches and it appears to work perfectly well.

Changed 16 months ago by zomg

Patch for Doctrine/Transaction.php

Changed 16 months ago by romanb

  • status changed from new to closed
  • resolution set to fixed

(In [4057]) Fixed #873

Note: See TracTickets for help on using tickets.