[MDEV-28831] Improve and unify error messages on ALTER TABLE ... RENAME to unknown db Created: 2022-06-14 Updated: 2022-10-14 Resolved: 2022-10-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table, Partitioning, Storage Engine - Aria, Storage Engine - InnoDB, Storage Engine - MyISAM, Storage Engine - RocksDB |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Roel Van de Paar | Assignee: | Oleksandr Byelkin |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
On MySQL 8.0 will give:
This will be the same output, no matter what the engine or options (like partitioning) are. On MariaDB 10.10 we see a variety of outputs:
Leads to:
And for MyISAM/Aria:
Leads to:
And
Leads to a similar message as the InnoDB testcase above, but we also see in the error log:
And for MEMORY and Spider (which both seem to correctly report the right error);
We see:
For RocksDB:
Leads to:
Bug fix: change all various engine messages to a uniform:
|
| Comments |
| Comment by Marko Mäkelä [ 2022-06-14 ] |
|
I think that this needs to be handled in the SQL layer, possibly with some adjustments in some storage engines. As far as I remember, ALTER TABLE…RENAME will always invoke handler::rename_table(). It might be worth mentioning that DELETE TABLE or RENAME TABLE will not invoke handler::open() before the operation, while any ALTER TABLE always will. |
| Comment by Roel Van de Paar [ 2022-10-14 ] |
|
Marked as duplicate of MDEV-19849 |