]> 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:20:38 +0000 (15:20 -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
(cherry picked from commit ac5a27db854fe9f6fbad5b93130e4a9c19405f3a)

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 e87b9825f1b2d770b7f86b223c97f6ccb66802d3..26b7208ec8a8bbc9d22fa2f1746b9e98cfc8b1e1 100644 (file)
@@ -326,6 +326,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)