Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
Description
--source include/have_innodb.inc
|
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB; |
|
RENAME TABLE test.t1 TO non_existing_schema.t1; |
|
# Cleanup
|
DROP TABLE t1; |
10.4 a53b99bf13337 (pre-10.4.0) |
query 'RENAME TABLE test.t1 TO non_existing_schema.t1' failed: 1025: Error on rename of './test/t1' to './non_existing_schema/t1' (errno: 168 "Unknown (generic) error from engine")
|
2018-10-16 2:16:40 9 [ERROR] InnoDB: Operating system error number 2 in a file operation.
|
2018-10-16 2:16:40 9 [ERROR] InnoDB: The error means the system cannot find the path specified.
|
2018-10-16 2:16:40 9 [ERROR] InnoDB: Cannot rename file './test/t1.ibd' to './non_existing_schema/t1.ibd'
|
10.0 4d07e6c12da (pre-10.0.37) |
query 'RENAME TABLE test.t1 TO non_existing_schema.t1' failed: 1025: Error on rename of './test/t1' to './non_existing_schema/t1' (errno: -1 "Internal error < 0 (Not system error)")
|
Ideally, it would be something like ER_BAD_DB_ERROR, or at least something more comprehensible.
With MyISAM it's slightly better – no error in the error log, and SQL returns
query 'RENAME TABLE test.t1 TO non_existing_schema.t1' failed: 7: Error on rename of './test/t1.MYI' to './non_existing_schema/t1.MYI' (Errcode: 20 "Not a directory")
|
With innodb_file_per_table=0 it produces the more elegant
query 'RENAME TABLE test.t1 TO non_existing_schema.t1' failed: 1049: Unknown database 'non_existing_schema'
|
So I'm filing it for InnoDB, mainly for the record, as one of possible reasons for "Operating system error number 2" which users sometimes complain about.
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