[MDEV-26051] Unexpected ER_FK_NO_INDEX_PARENT upon adding a self-referencing foreign key Created: 2021-06-30 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table, Storage Engine - InnoDB |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6 |
| Fix Version/s: | 10.4, 10.5, 10.6 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Elena Stepanova | Assignee: | Thirunarayanan Balathandayuthapani |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | upstream | ||
| Description |
|
ALTER above fails with
It's not that surprising that it fails in general – after all, a self-referencing column hardly makes sense – but that it fails with ER_FK_NO_INDEX_PARENT although clearly there is an index. Reproducible on 10.2-10.6, including older ones, as well as MySQL 5.7 and 8.0. I didn't check earlier versions. |