Mysql InnoDB Error code #1025
We are using Mysql 5.1 in our production servers and trying to run an alter query to change the datatype of a column from tinytext to varchar(200). On running the alter query we are seeing this error :-
#1025 - Error on rename of './msging/#sql-123b_ab7634' to开发者_开发百科 './msging/outboxes' (errno: -1)
The MySql forums suggest that this error might be because of foreign key constraints. But our schema does not have any foreign keys. The mysql error logs are showing the below mentioned error.We went through the link mentioned in the error statement but couldn't find anything useful. Any ideas what might be going wrong ?
InnoDB: Error: './msging/outboxes.ibd' is already in tablespace memory cache
111001 12:40:18 InnoDB: Error in table rename, cannot renamemsging
.#sql-123b_ab4828
tomsging
.outboxes
111001 12:40:18 InnoDB: Error: tablemsging
.outboxes
does not exist in the InnoDB internal InnoDB: data dictionary though MySQL is trying to drop it. InnoDB: Have you copied the .frm file of the table to the InnoDB: MySQL database directory from another database? InnoDB: You can look for further help from InnoDB: http://dev.mysql.com/doc/refman/5.1/en/innodb-troubleshooting.html
When you rename a table using ALTER TABLE
, here's what happens:
- The table is copied to a new file with a random filename.
- Changes are made to the new file.
- The old table is renamed using a random temporary filename.
- The new table is renamed to take the place of the old file.
- The old table is removed.
See this link for more details: http://www.xaprb.com/blog/2006/08/22/mysqls-error-1025-explained/
You can use innotop
to get more details on the error: http://code.google.com/p/innotop/
精彩评论