Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL), 10.10(EOL)
-
None
Description
CREATE TABLE t (c INT) ENGINE=InnoDB; |
ALTER TABLE t RENAME a.t; |
On MySQL 8.0 will give:
8.0.29-opt>ALTER TABLE t RENAME a.t; |
ERROR 1049 (42000): Unknown database 'a' |
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:
CREATE TABLE t (c INT) ENGINE=InnoDB; |
ALTER TABLE t RENAME a.t; |
Leads to:
10.10.0 081a284712bb661349e2e3802077b12211cede3e (Optimized) |
10.10.0-opt>ALTER TABLE t RENAME a.t;
|
ERROR 1025 (HY000): Error on rename of './test/t' to './a/t' (errno: 168 "Unknown (generic) error from engine")
|
And for MyISAM/Aria:
CREATE TABLE t (c INT) ENGINE=MyISAM; |
ALTER TABLE t RENAME a.t; |
Leads to:
10.10.0 081a284712bb661349e2e3802077b12211cede3e (Optimized) |
10.10.0-opt>ALTER TABLE t RENAME a.t;
|
ERROR 7 (HY000): Error on rename of './test/t.MYI' to './a/t.MYI' (Errcode: 20 "Not a directory")
|
And
CREATE TABLE t (c INT) ENGINE=InnoDB; |
ALTER TABLE t PARTITION BY LIST (c) (PARTITION p VALUES IN (1,2)); |
ALTER TABLE t RENAME a.t; |
Leads to a similar message as the InnoDB testcase above, but we also see in the error log:
10.10.0 081a284712bb661349e2e3802077b12211cede3e (Optimized) |
2022-06-14 13:57:04 4 [ERROR] InnoDB: Cannot rename file './test/t#P#p.ibd' to './a/t#P#p.ibd'
|
And for MEMORY and Spider (which both seem to correctly report the right error);
# INSTALL PLUGIN spider SONAME 'ha_spider.so'; # For Spider |
CREATE TABLE t (c INT) ENGINE=MEMORY; # or ENGINE=Spider for Spider |
ALTER TABLE t RENAME a.t; |
We see:
10.10.0 081a284712bb661349e2e3802077b12211cede3e (Optimized) |
10.10.0-opt>ALTER TABLE t RENAME a.t;
|
ERROR 1049 (42000): Unknown database 'a'
|
For RocksDB:
INSTALL SONAME 'ha_rocksdb.so'; |
CREATE TABLE t (c INT) ENGINE=rocksdb; |
ALTER TABLE t RENAME a.t; |
Leads to:
10.10.0 081a284712bb661349e2e3802077b12211cede3e (Optimized) |
10.10.0-opt>ALTER TABLE t RENAME a.t;
|
ERROR 1025 (HY000): Error on rename of './test/t' to './a/t' (errno: -1 "Internal error < 0 (Not system error)")
|
Bug fix: change all various engine messages to a uniform:
ERROR 1049 (42000): Unknown database 'a'
|
Attachments
Issue Links
- duplicates
-
MDEV-19849 InnoDB should and can be more specific with errno: 168 "Unknown (generic) error from engine". The output for MyISAM, Aria and RocksDB can also be improved.
- Confirmed