diff options
| author | Tim Graham <timograham@gmail.com> | 2017-11-20 10:08:34 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-20 10:08:34 -0500 |
| commit | e3c852cbd609484b272f563f3c21066fb12ef7f8 (patch) | |
| tree | 6e0a19932dd818e9941102b2b1baee2bb1071982 /tests/backends | |
| parent | 244cc401559e924355cf943b6b8e66ccf2f6da3a (diff) | |
Fixed #28804 -- Fixed "Unknown system variable 'transaction_isolation'" on MariaDB.
Regression in 967450a3bf940c43db891fe1e2ef3bcf73456ff8.
Diffstat (limited to 'tests/backends')
| -rw-r--r-- | tests/backends/mysql/tests.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/backends/mysql/tests.py b/tests/backends/mysql/tests.py index 467cd5abc5..02fc312abc 100644 --- a/tests/backends/mysql/tests.py +++ b/tests/backends/mysql/tests.py @@ -20,7 +20,7 @@ class IsolationLevelTests(TestCase): read_committed = 'read committed' repeatable_read = 'repeatable read' isolation_values = { - level: level.replace(' ', '-').upper() + level: level.upper() for level in (read_committed, repeatable_read) } @@ -38,8 +38,8 @@ class IsolationLevelTests(TestCase): @staticmethod def get_isolation_level(connection): with connection.cursor() as cursor: - cursor.execute("SELECT @@session.%s" % connection.transaction_isolation_variable) - return cursor.fetchone()[0] + cursor.execute("SHOW VARIABLES WHERE variable_name IN ('transaction_isolation', 'tx_isolation')") + return cursor.fetchone()[1].replace('-', ' ') def test_auto_is_null_auto_config(self): query = 'set sql_auto_is_null = 0' |
