mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #28804 -- Fixed "Unknown system variable 'transaction_isolation'" on MariaDB.
Regression in 967450a3bf
.
This commit is contained in:
parent
244cc40155
commit
e3c852cbd6
2 changed files with 6 additions and 13 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue