1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[2.0.x] Fixed #28794 -- Fixed tx_isolation deprecation warning on MySQL 5.7.20+.

Backport of 967450a3bf from master
This commit is contained in:
Sergey Fedoseev
2017-11-15 01:40:44 +05:00
committed by Tim Graham
parent 3f372ef9d3
commit 5638b77627
2 changed files with 7 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ class IsolationLevelTests(TestCase):
@staticmethod
def get_isolation_level(connection):
with connection.cursor() as cursor:
cursor.execute("SELECT @@session.tx_isolation")
cursor.execute("SELECT @@session.%s" % connection.transaction_isolation_variable)
return cursor.fetchone()[0]
def test_auto_is_null_auto_config(self):