From: Michael Trier Date: Sun, 11 Jan 2009 19:15:37 +0000 (+0000) Subject: Corrected SAVEPOINT support on the adodbapi dialect by changing the handling X-Git-Tag: rel_0_5_1~32 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=db33ad9dec55ac41eaa198ab52408378a0e27e7b;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Corrected SAVEPOINT support on the adodbapi dialect by changing the handling of savepoint_release, which is unsupported on mssql. The way it was being discarded previously resulted in an empty execute being called on the dialect; adodbapi didn't like that much. --- diff --git a/CHANGES b/CHANGES index bbaa5b33b7..ab76528519 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,9 @@ CHANGES - Modified the do_begin handling in mssql to use the Cursor not the Connection so it is DBAPI compatible. + - Corrected SAVEPOINT support on adodbapi by changing the + handling of savepoint_release, which is unsupported on mssql. + 0.5.0 ======== diff --git a/lib/sqlalchemy/databases/mssql.py b/lib/sqlalchemy/databases/mssql.py index a3d80c6786..11b1027c25 100644 --- a/lib/sqlalchemy/databases/mssql.py +++ b/lib/sqlalchemy/databases/mssql.py @@ -1060,6 +1060,9 @@ class MSSQLDialect(default.DefaultDialect): cursor.execute("SET IMPLICIT_TRANSACTIONS OFF") cursor.execute("BEGIN TRANSACTION") + def do_release_savepoint(self, connection, name): + pass + @base.connection_memoize(('dialect', 'default_schema_name')) def get_default_schema_name(self, connection): query = "SELECT user_name() as user_name;" @@ -1537,9 +1540,6 @@ class MSSQLCompiler(compiler.DefaultCompiler): def visit_rollback_to_savepoint(self, savepoint_stmt): return "ROLLBACK TRANSACTION %s" % self.preparer.format_savepoint(savepoint_stmt) - def visit_release_savepoint(self, savepoint_stmt): - pass - def visit_column(self, column, result_map=None, **kwargs): if column.table is not None and \ (not self.isupdate and not self.isdelete) or self.is_subquery():