Fixed #28804 -- Fixed "Unknown system variable 'transaction_isolation'" on MariaDB.

Regression in 967450a3bf.
This commit is contained in:
Tim Graham 2017-11-20 10:08:34 -05:00 committed by GitHub
parent 244cc40155
commit e3c852cbd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 13 deletions

View file

@ -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'