]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Corrected SAVEPOINT support on the adodbapi dialect by changing the handling
authorMichael Trier <mtrier@gmail.com>
Sun, 11 Jan 2009 19:15:37 +0000 (19:15 +0000)
committerMichael Trier <mtrier@gmail.com>
Sun, 11 Jan 2009 19:15:37 +0000 (19:15 +0000)
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.

CHANGES
lib/sqlalchemy/databases/mssql.py

diff --git a/CHANGES b/CHANGES
index bbaa5b33b7f5d95d2f3f38582936a95ff1cbe578..ab765285194d870649c3cec17d48c889869af844 100644 (file)
--- 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
 ========
 
index a3d80c67864f4d164e30133dc06ebe3816484c1d..11b1027c250a432ec82f7ecc7d7938f43f88b428 100644 (file)
@@ -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():