Bug #18706 | InnoDB Tablespace per Table Symlink causes InnoDB Cache Load Error | ||
---|---|---|---|
Submitted: | 1 Apr 2006 10:25 | Modified: | 3 Apr 2006 6:59 |
Reporter: | time e.less | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S2 (Serious) |
Version: | 5.0.16 | OS: | Linux (Debian Linux AMD Opteron) |
Assigned to: | Heikki Tuuri | CPU Architecture: | Any |
[1 Apr 2006 10:25]
time e.less
[1 Apr 2006 13:37]
Heikki Tuuri
Timeless, symlinking .ibd files should work on Unix. Please test with some small test table. The errors you got may be a result of moving .ibd files around. Please double check that you did not make that error. Note that an ALTER TABLE will rebuild the table physically to back to the database directory, as it is not aware that the original table was symlinked. Therefore, it is better to symlink whole database directories. Regards, Heikki
[1 Apr 2006 20:18]
time e.less
Good day, Heikki! "The errors you got may be a result of moving .ibd files around. Please double check that you did not make that error." Do you mean to say that while MySQL server is currently running, the .ibd is moved and symlinked? I thought doing such a thing wouldn't work, so I took steps to avoid doing that, but it was late. Is this the only known case where this error occurs? "Note that an ALTER TABLE will rebuild the table physically to back to the database directory, as it is not aware that the original table was symlinked. Therefore, it is better to symlink whole database directories." So if I do this: # Shut down MySQL # Move the .ibd # Symlink it # Start MySQL # alter table engine=InnoDB This could cause the problem? When I try this on a test environment, I simply end up with a .ibd in both locations, and the original symlink is removed.
[2 Apr 2006 14:21]
Heikki Tuuri
Timeless, if you want to move an InnoDB table t from a database a to database b, you must use RENAME TABLE: RENAME TABLE a.t TO b.t; You cannot move .ibd files around by copying them yourself (except in the case where you physically move the .ibd file and replace it with a symlink). The InnoDB internal data dictionary is in the the ibdata1 file, and it will be confused if it does not find the .ibd file from the directory where it expects to find it. http://dev.mysql.com/doc/refman/5.0/en/multiple-tablespaces.html Regards, Heikki
[3 Apr 2006 6:59]
Heikki Tuuri
Classifying this as not a bug, as this was probably a user error, moving .ibd files around. If you encounter the error again, please reopen this bug report.