#24995: MySQL 5.5.x errno: 150 when renaming a primary key
------------------------------------+------------------------------------
Reporter: EikeDehling | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.8
Severity: Normal | Resolution:
Keywords: rename mysql error | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
------------------------------------+------------------------------------
Comment (by timgraham):
As noted in ticket:26384#comment:16:
Prior to MySQL 5.6.6, adding and dropping a foreign key in the same ALTER
TABLE statement may be problematic in some cases and is therefore
unsupported. Separate statements should be used for each operation. As of
MySQL 5.6.6, adding and dropping a foreign key in the same ALTER TABLE
statement is supported for ALTER TABLE ... ALGORITHM=INPLACE but remains
unsupported for ALTER TABLE ... ALGORITHM=COPY.
So the reason I didn't find the proposed test to be a regression test is
because I'm using a newer version of MySQL. The test added in #26384 is
similar to the one proposed in the pull request and has revealed the
issue. Unfortunately both the test added in the other ticket and the test
proposed in the pull request for this ticket are still failing on MySQL
5.5.x, even with the proposed fix (`OperationalError: (1025, "Error on
rename of './test_django/#sql-58c_2b9' to './test_django/schema_author'
(errno: 150)")`).
--
Ticket URL: <https://code.djangoproject.com/ticket/24995#comment:7>
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/069.f960b3768a1def65e59145b75eac3b2d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.