Bug #67656 can't rename a Innodb table from one to another database in different disk

Submitted: 21 Nov 2012 9:29 Modified: 27 Nov 2012 20:05
Reporter: justin ux Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:mysql-5.5.27-solaris10-x86_64 OS:Solaris (Solaris 10 X86)
Assigned to: CPU Architecture:Any
Tags: 'Cross-device link', rename table

[21 Nov 2012 9:29] justin ux
Description:
 

But I can't move a Innodb table from a database to another database in different disk partition. 

In my server , test0 and test1 ,test2 databases are in different disks. 
lrwxrwxrwx 1 root root 22 Nov 5 17:46 test0 -> /data/mysqldata3/test0 
drwx------ 2 mysql mysql 512 Nov 5 17:49 test1 
drwx------ 2 mysql mysql 512 Aug 17 10:08 test2 

-bash-3.00$ cd test1 
-bash-3.00$ pwd 
/disk2/mysql-5.5.20-solaris10-x86_64/data/test1 
-bash-3.00$ 

mysql> rename table test0.countries3 to test1.countries30; 
ERROR 1025 (HY000): Error on rename of './test0/countries3' to './test1/countries30' (errno: -1) 
mysql> rename table test0.countries3 to test1.countries3; 
ERROR 1025 (HY000): Error on rename of './test0/countries3' to './test1/countries3' (errno: -1) 

mysql> rename table test1.countries0 to test2.countries43; 
Query OK, 0 rows affected (0.04 sec) 

mysql> rename table test2.countries43 to test0.countries39; 
ERROR 1025 (HY000): Error on rename of './test2/countries43' to './test0/countries39' (errno: -1) 
mysql> rename table test2.countries43 to test0.countries43; 
ERROR 1025 (HY000): Error on rename of './test2/countries43' to './test0/countries43' (errno: -1) 
mysql> rename table test2.countries43 to test1.countries43; 
Query OK, 0 rows affected (0.00 sec)

In Error log:
InnoDB: Error number 18 means 'Cross-device link'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
121121 17:21:11  InnoDB: Operating system error number 18 in a file operation.
InnoDB: Error number 18 means 'Cross-device link'.
InnoDB: Some operating system error numbers are described at

How to repeat:
repeated in another Mysql server
[27 Nov 2012 20:05] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

According to http://dev.mysql.com/doc/refman/5.5/en/symbolic-links.html#symbolic-links-to-databases: "Symlinks are fully supported only for MyISAM tables. For files used by tables for other storage engines, you may get strange problems if you try to use symbolic links. " Since you use InnoDB, this is not a bug.

Although you can upgrade to version 5.6 and use DATA DIRECTORY option for InnoDB which is supported in this version. Read http://dev.mysql.com/doc/refman/5.6/en/create-table.html for details.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.052 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.