> > yeah I know when it was done. we need Michael to fill in on that > detail. > > > On Mar 24, 2009, at 8:09 PM, davidlmontgomery wrote: > > > > > The relevant change is the addition of the > > MSSQLDialect.do_begin method: > > > > def do_begin(self, connection): > > cursor = connection.cursor() > > cursor.execute("SET IMPLICIT_TRANSACTIONS OFF") > > cursor.execute("BEGIN TRANSACTION") > > > > This was first introduced three months ago > > to correct the savepoint tests > > http://bitbucket.org/mirror/sqlalchemy/changeset/985925326dc8/ > > > > and revised a couple months ago to use the > > cursor rather than the connection: > > > http://www.sqlalchemy.org/trac/browser/sqlalchemy/trunk/lib/sqlalchemy/databases/mssql.py?rev=5641 > > > > With this method converted to a pass, 0.5.2 works > > properly for me on the three machines where before > > it always rolled back. > > >
Yeah that code was added to fix savepoint support. One of the problems with MSSQL with Implicit Transactions is that it only gets turned on once a DML statement gets executed. Unfortunately issuing a savepoint doesn't turn on the implicit transaction. Therefore we were in a situation where there was no begin transaction, but there was a savepoint issued. Originally we tried to implement this by keeping implicit transactions but checking at the time the savepoint was issued to begin the transaction if it wasn't present. That had issues and honestly I can't recall what it was. The way it is structured now seems to work fine in all the tests, so it's odd that you're having a problem. My only guess is that it's a TDS thing (I believe you said you were using that). The odd thing is that the list of items you're seeing across the wire is exactly what I'm getting as well and what should be expected. -- Michael Trier http://blog.michaeltrier.com/ http://thisweekindjango.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---