﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30150	"Django 1.11 with MySQL 8: ""Unknown system variable 'TX_ISOLATION'"""	Carsten Fuchs	nobody	"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?"	Bug	closed	Database layer (models, ORM)	1.11	Normal	wontfix		Adam Johnson	Unreviewed	0	0	0	0	0	0
