[MDEV-31987] Cannot disable FOREIGN_KEY_CHECKS anymore for converting character set Created: 2023-08-23 Updated: 2023-11-08 Resolved: 2023-08-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table, Storage Engine - InnoDB |
| Affects Version/s: | 10.4.31, 10.5.22, 10.6.15, 10.9.8, 10.10.6, 10.11.5, 11.0.3, 11.1.2 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Soner Sayakci | Assignee: | Marko Mäkelä |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Description |
|
We had in our migration some tables with a wrong character set created (we didn't set explicit which character set). So we added a while ago a migration to fix this. For this we disable first the foreign key checks and then run the ALTER TABLE. It seems now that since the last patch versions this does not work anymore. Simplified test case:
error is:
|
| Comments |
| Comment by Marko Mäkelä [ 2023-08-23 ] | |||
|
This change is intentional due to
In this way, there is no need to disable foreign_key_checks at any point either. It would be ideal if multiple DDL statements could be combined into a single atomic transaction, but that would be quite hard to change. | |||
| Comment by Rajitha Kumara [ 2023-09-04 ] | |||
|
Seems this is reproducible with 10.9.8 also |