#29895: Enable atomic DDL statements on MySQL 8+
-----------------------------+------------------------------------
     Reporter:  Nathan Klug  |                    Owner:  nobody
         Type:  New feature  |                   Status:  new
    Component:  Migrations   |                  Version:  2.1
     Severity:  Normal       |               Resolution:
     Keywords:               |             Triage Stage:  Accepted
    Has patch:  0            |      Needs documentation:  0
  Needs tests:  0            |  Patch needs improvement:  0
Easy pickings:  0            |                    UI/UX:  0
-----------------------------+------------------------------------
Changes (by Tom Forbes):

 * cc: Tom Forbes (added)


Comment:

 I had a look at this failure and I think I know why it occurs:
 https://dev.mysql.com/doc/refman/8.0/en/implicit-commit.html

 When using atomic DDL in mysql certain statements immediately and
 implicitly commit the transaction. Django doesn't know about this, so it
 ends up failing because the savepoints no longer exist.

 In any case MySQL cannot roll back DDL like Postgres can, and Atomic DDL
 is actually not the same as transactional DDL. I'm not entirely sure but
 it seems (according to this https://mysqlserverteam.com/atomic-ddl-in-
 mysql-8-0/) that it's just implicitly enabled/working without any
 additional code changes.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29895#comment:3>
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.0fc6e2131431dded3b5eb59c37496a72%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to