[MDEV-25935] Misleading error message due to FOREIGN KEY on RENAME TABLE Created: 2021-06-16 Updated: 2023-11-16 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2, 10.3, 10.4, 10.5, 10.6 |
| Fix Version/s: | 10.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Sergei Golubchik |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
mleich reported that RENAME TABLE is reporting a misleading error message about the table existing, when in reality there is a duplicate FOREIGN KEY constraint. The following should be close to a minimal test case:
Note: the internal SYS_FOREIGN.NAME='test/t3_ibfk_1' is already occupied by table t2, and renaming the auto-assigned constraint test/t2b_ibfk_1 to test/t3_ibfk_1 would fail. The client only sees a misleading error message:
More details are spammed to the server error log (but
I think that we will need a dedicated error message for this case. But, I have understood that we want to avoid having storage engine specific error messages. As far as I understand, this error source should be removed by MDEV-16417 in a future version. |
| Comments |
| Comment by Daniel Black [ 2023-11-16 ] | |||
|
Related from MDEV-32814
The error message in the log (and why is it there anyway), is better than the message to the user
|