Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
5.5(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
-
None
Description
Whenever creating a foreign key fails, the server reports something like
1005: Can't create table test.t3 (errno: 150 "Foreign key constraint is incorrectly formed")
|
which is not very informative. One can get a much better understanding of an error by issuing SHOW ENGINE INNODB STATUS, if one knows to do it.
But one shouldn't be required to. The error information should be returned when an error happens. For example, InnoDB could return a warning with, say, "There is no index in the referenced table where the referenced columns appear as the first columns" (may be slightly paraphrased, as appropriate for a warning message).
It could still do its SHOW ENGINE INNODB STATUS, but returning a warning goes a long way towards helping users to understand the problem
Attachments
Issue Links
- relates to
-
MDEV-16356 Allow ALGORITHM=NOCOPY for ADD CONSTRAINT
- Open
-
MDEV-16417 Store Foreign Key metadata outside of InnoDB
- In Review