title: Mysql InnoDB Error code #1025
body: <p>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 :-</p>
  
  <blockquote>
    <p>#1025 - Error on rename of './msging/#sql-123b_ab7634' to
    './msging/outboxes' (errno: -1)</p>
  </blockquote>
  
  <p>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 ?</p>
  
  <blockquote>
    <p>InnoDB: Error: './msging/outboxes.ibd' is already in tablespace memory
    cache <br/> 111001 12:40:18  InnoDB: Error in table rename, cannot
    rename <code>msging</code>.<code>#sql-123b_ab4828</code> to <code>msging</code>.<code>outboxes</code> <br/> 111001
    12:40:18  InnoDB: Error: table <code>msging</code>.<code>outboxes</code> does not exist in
    the InnoDB internal <br/> InnoDB: data dictionary though MySQL is
    trying to drop it. <br/> InnoDB: Have you copied the .frm file of the
    table to the<br/> InnoDB: MySQL database directory from another
    database?<br/> InnoDB: You can look for further help from<br/> InnoDB:
    <a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-troubleshooting.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.1/en/innodb-troubleshooting.html</a><br/></p>
  </blockquote>