- attached sqla04_mssql_twophase.patch
Twophase Support for MSSQL
I'm using both a MySQL and a MSSQL server for an application, so I added the following code to the MSSQLDialect to get twophase support.
Additionally, I changed the default dialect's create_xid method, which returns a transaction ID, to reference and truncate to max_identifier_length (it was failing due to this with pymssql) and to not use any underscores in the name (which, I believe, fails with MSSQL in general).
Both patches attached, against current trunk (r3643). They work with an application I have running using pymssql, but are untested with pyobdc or adodbapi as I don't have environments for them.
Comments (15)
-
Account Deleted -
Account Deleted - attached sqla04_xid_maxidlen.patch
Remove underscores from create_xid, and have it respect max_identifier_length
-
repo owner - assigned issue to
- changed milestone to 0.4.xx
i can patch these but it would be nice to see if someone can test on a few environments...
-
Account Deleted I'm using MSSQL 2005 with adodbapi. Would that help?
-
Account Deleted - attached mssql.diff
Savepoint support and two phase transactions using the jdbc XA procs
-
Account Deleted mssql.diff makes the following changes:
-
savepoint support
-
real two phase support using the jdbc XA stored procs (see MSSQLTwoPhaseCommit)
-
turns implicit transactions off and manually begins normal transactions.
Laurence (l@lrowe.co.uk)
-
-
Account Deleted (This is tested with pyodbc, MSSQL 2005 and the sqljdbc 1.2 driver's dll)
-
- changed watchers to sa.0.4-mssql_twophase@adam.gomaa.us, l@lrowe.co.uk
-
Account Deleted - attached savepoint.diff
Savepoint support - engine/transaction tests pass
-
Account Deleted Two phase support requires sending a specific TDS packet (see MSSQLTwoPhaseCommit) in order to enlist a connection in the DTC transaction, so this part is on hold until I can work out how (and if) I can manage this.
The savepoint support is however working and tests pass (with pyodbc and mssql 2005).
Laurence (l@lrowe.co.uk)
-
repo owner laurence -
does this invalidate the mssql.diff patch you attached ?
-
Account Deleted Yes, I think I need to add methods to the pyodbc driver before two phase commit can work.
Laurence
-
repo owner - changed milestone to 0.6.xx
pushing this to 0.6 for the dialect refactor, but 0.5.xx code will be accepted as well.
-
repo owner - changed status to wontfix
For now I've just turned on the already present savepoint functionality, that's in 58e692d76bbea84667609a4ceb828dcf43571f6e.
As far as two-phase, I've reviewed the notes on the above mentioned wiki page and it appears 2-phase is tremendously complex and not really implemented. This ticket can of course be reopened if there's interest/progress on getting 2-phase to work but I don't see this happening now.
-
repo owner - changed milestone to 1.x.xx
- Log in to comment
Add twophase support for the MSSQL dialect