]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
add "The server failed to resume the transaction" to pymssql
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 2 Sep 2024 15:22:36 +0000 (11:22 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 2 Sep 2024 19:19:47 +0000 (15:19 -0400)
Added error "The server failed to resume the transaction" to the list of
error strings for the pymssql driver in determining a disconnect scenario,
as observed by one user using pymssql under otherwise unknown conditions as
leaving an unusable connection in the connection pool which fails to ping
cleanly.

Fixes: #11822
Change-Id: I1cf98046978b10775f19531878b597d32b056f13

doc/build/changelog/unreleased_20/11822.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mssql/pymssql.py
test/dialect/mssql/test_engine.py

diff --git a/doc/build/changelog/unreleased_20/11822.rst b/doc/build/changelog/unreleased_20/11822.rst
new file mode 100644 (file)
index 0000000..f6c9191
--- /dev/null
@@ -0,0 +1,9 @@
+.. change::
+    :tags: bug, mssql
+    :tickets: 11822
+
+    Added error "The server failed to resume the transaction" to the list of
+    error strings for the pymssql driver in determining a disconnect scenario,
+    as observed by one user using pymssql under otherwise unknown conditions as
+    leaving an unusable connection in the connection pool which fails to ping
+    cleanly.
index ea1f9bd3a7edece9c69915bf68bd0a869e6237f4..c4207987bcd135aeccac3f5291921e87ef8eefae 100644 (file)
@@ -103,6 +103,7 @@ class MSDialect_pymssql(MSDialect):
             "message 20006",  # Write to the server failed
             "message 20017",  # Unexpected EOF from the server
             "message 20047",  # DBPROCESS is dead or not enabled
+            "The server failed to resume the transaction",
         ):
             if msg in str(e):
                 return True
index 557341aa6a47b5bfab3188190aa60f0e65b5bf11..0e9d2fdcf03a07b11f0e55286411c78ade6f8716 100644 (file)
@@ -375,6 +375,7 @@ class ParseConnectTest(fixtures.TestBase):
             "message 20006",  # Write to the server failed
             "message 20017",  # Unexpected EOF from the server
             "message 20047",  # DBPROCESS is dead or not enabled
+            "The server failed to resume the transaction",
         ]:
             eq_(dialect.is_disconnect(error, None, None), True)