Re: "ERROR 7: Error on rename of..." when altering table
Posted by: Andreas Hammarstedt
Date: July 08, 2005 08:54AM

In case someone else runs into the same problem, here's my resolution so far:

1. Created a separate table with the same contents as the one I was trying to alter.
2. Altered the separate table. Now I have the .frm file needed for my original table.
3. Shut down MySQL.
4. Made backup copies of all table files (.frm, .myd, .myi) for the original, separate and temporary tables.
5. Copied the separate .frm file to the original, and the temporary .myi and .myd files to the original.
6. Started MySQL.
7. Ran an extended check on the table, which was successful.

It seems like I'll have to do this over again as I, probably unnecessarily, chose to add indices as a separate step.

This was based entirely on the assumption that the original ALTER TABLE only failed when swapping files around and that the file data was properly altered, as well as the fact that the table is only infrequently updated so that I wouldn't have to worry about concurrent updates. YMMV

Options: ReplyQuote


Subject
Written By
Posted
Re: "ERROR 7: Error on rename of..." when altering table
July 08, 2005 08:54AM


Sorry, you can't reply to this topic. It has been closed.

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.