[MDEV-24282] Foreign key check should be more detailed Created: 2020-11-25 Updated: 2020-11-25 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table, Data Definition - Create Table |
| Fix Version/s: | None |
| Type: | Task | Priority: | Trivial |
| Reporter: | David Rodrigues | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Hello! Sometimes working with Foreign Key could be complex to starters. The most common case that I see is when you try to FK a column with a different type.
It is a good example. `id_country` is a INT, but `countries.id` is BIGINT. And when try to create a FK for it we will got:
The error is correct, but is not clear about "what is wrong". My suggestion is update the description to some more... descriptive:
However, I don't know if it is the role of the server to report something in more detail like this. |