Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.1.23
-
None
-
None
-
Debian 8, Linux 64 bit, ZFS
Description
I have a separate partition for InnoDB data files and MyISAM data files in order to take advantage of optimal ZFS record sizes. This is done in a supported way, using .ISL "symbolic link files" in the MyISAM directory pointing to the .IBD file on the other partition. There are no soft or hard links on either partition.
Attempting to rename an InnoDB table will sometimes return the following:
ERROR 1025 (HY000): Error on rename of './xxxx/yyyy' to './xxxx/yyyy_old' (errno: -1 "Internal error < 0 (Not system error)")
|
The server logs the following:
mysqld[37357]: 2017-07-04 03:06:04 7f8010df8b00 InnoDB: Operating system error number 18 in a file operation.
|
mysqld[37357]: InnoDB: Error number 18 means 'Invalid cross-device link'.
|
mysqld[37357]: InnoDB: Some operating system error numbers are described at
|
mysqld[37357]: InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
|
After much head scratching and verifying permissions, ISL paths, it turns out the solution is to SHOW TABLE first (yes, really!).
MariaDB [xxxx]> show table status like 'yyyy%';
|
 |
MariaDB [xxxx]> rename table xxxx.yyyy to xxxx.yyyy_old;
|
Query OK, 0 rows affected (0.00 sec)
|
I am guessing that the SHOW TABLE statement causes MySQL to "notice" the ISL file and use the correct paths. Why it was trying to create a cross-device symbolic link I have no idea though.