#30150: Django 1.11 with MySQL 8: "Unknown system variable 'TX_ISOLATION'"
-------------------------------------+-------------------------------------
Reporter: Carsten | Owner: nobody
Fuchs |
Type: Bug | Status: new
Component: Database | Version: 1.11
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
https://docs.djangoproject.com/en/1.11/ref/databases/#version-support
suggests that Django 1.11 works with MySQL 8, but besides #29451, there is
a problem similar to #28804 and #28794:
{{{
#!sh
$ python manage.py check --deploy
Traceback (most recent call last):
File "/home/carsten/.virtualenvs/Zeiterfassung/lib/python3.6/site-
packages/django/db/backends/utils.py", line 62, in execute
return self.cursor.execute(sql)
File "/home/carsten/.virtualenvs/Zeiterfassung/lib/python3.6/site-
packages/django/db/backends/mysql/base.py", line 101, in execute
return self.cursor.execute(query, args)
File "/home/carsten/.virtualenvs/Zeiterfassung/lib/python3.6/site-
packages/MySQLdb/cursors.py", line 250, in execute
self.errorhandler(self, exc, value)
File "/home/carsten/.virtualenvs/Zeiterfassung/lib/python3.6/site-
packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
File "/home/carsten/.virtualenvs/Zeiterfassung/lib/python3.6/site-
packages/MySQLdb/cursors.py", line 247, in execute
res = self._query(query)
File "/home/carsten/.virtualenvs/Zeiterfassung/lib/python3.6/site-
packages/MySQLdb/cursors.py", line 412, in _query
rowcount = self._do_query(q)
File "/home/carsten/.virtualenvs/Zeiterfassung/lib/python3.6/site-
packages/MySQLdb/cursors.py", line 375, in _do_query
db.query(q)
File "/home/carsten/.virtualenvs/Zeiterfassung/lib/python3.6/site-
packages/MySQLdb/connections.py", line 276, in query
_mysql.connection.query(self, query)
_mysql_exceptions.OperationalError: (1193, "Unknown system variable
'TX_ISOLATION'")
The above exception was the direct cause of the following exception:
[...]
}}}
This can be worked-around by changing line 289 in
`db/backends/mysql/base.py`
{{{
assignments.append("TX_ISOLATION = '%s'" %
self.isolation_level)
}}}
into
{{{
assignments.append("transaction_isolation = '%s'" %
self.isolation_level)
}}}
Any chance to get this, with proper checks for the MySQL version, into
Django 1.11?
--
Ticket URL: <https://code.djangoproject.com/ticket/30150>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.c316cfb33e039cde24e38768a11897e6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.