#28804: MariaDB compatibility broken: "Unknown system variable
'transaction_isolation'"
-------------------------------------+-------------------------------------
     Reporter:  Gene Sem             |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  2.0
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:  mysqldb, error,      |             Triage Stage:  Accepted
  transaction_isolation, database,   |
  backend                            |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Gene Sem):

 Where error is located:

 WORKING file `django/db/backends/mysql/base.py` line 241  (django 2.0b1):


 {{{
     def init_connection_state(self):
         assignments = []
         if self.features.is_sql_auto_is_null_enabled:
             # SQL_AUTO_IS_NULL controls whether an AUTO_INCREMENT column
 on
             # a recently inserted row will return when the field is tested
             # for NULL. Disabling this brings this aspect of MySQL in line
             # with SQL standards.
             assignments.append('SQL_AUTO_IS_NULL = 0')

         if self.isolation_level:
             assignments.append("TX_ISOLATION = '%s'" %
 self.isolation_level)

 }}}

 DONT WORKING file `django/db/backends/mysql/base.py` line 238 (django2.0
 rc1):


 {{{
     def init_connection_state(self):
         assignments = []
         if self.features.is_sql_auto_is_null_enabled:
             # SQL_AUTO_IS_NULL controls whether an AUTO_INCREMENT column
 on
             # a recently inserted row will return when the field is tested
             # for NULL. Disabling this brings this aspect of MySQL in line
             # with SQL standards.
             assignments.append('SQL_AUTO_IS_NULL = 0')

         if self.isolation_level:
 err->           assignments.append("%s = '%s'" %
 (self.transaction_isolation_variable, self.isolation_level))
 }}}

 ....

 where `self.transaction_isolation_variable`:


 {{{
   @cached_property
     def transaction_isolation_variable(self):
         return 'tx_isolation' if self.mysql_version < (5, 7, 20) else
 'transaction_isolation'

 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28804#comment:5>
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/065.eeb9acef083c30a5c3a25fe69e6fd2a4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to