Added a version check to the "get_isolation_level" feature, which is
invoked upon first connect, so that it skips for SQL Server version
2000, as the necessary system view is not available prior to SQL Server
2005.
Change-Id: If4f860513f0aae6625803f449714aedfc5075f57
Fixes: #3898
.. changelog::
:version: 1.1.6
+ .. change:: 3898
+ :tags: bug, mssql
+ :tickets: 3898
+
+ Added a version check to the "get_isolation_level" feature, which is
+ invoked upon first connect, so that it skips for SQL Server version
+ 2000, as the necessary system view is not available prior to SQL Server
+ 2005.
+
.. change:: 3893
:tags: bug, orm
:tickets: 3893
cursor.close()
def get_isolation_level(self, connection):
+ if self.server_version_info < MS_2005_VERSION:
+ raise NotImplementedError(
+ "Can't fetch isolation level prior to SQL Server 2005")
+
cursor = connection.cursor()
cursor.execute("""
SELECT CASE transaction_isolation_level