MySQL Forums
Forum List  »  InnoDB

Re: ERROR 1005: Can't create table (errno: 121) Help
Posted by: danielle davis
Date: February 19, 2009 08:39AM

I receive the same error, but in a slightly different circumstance. here's my scenario:
- create table with no foreign keys, engine = innodb;
- load test table by filling it with a billion records
- drop table
- attempt to create table anew
this error results. cannot create mytable.frm file.

One of the posts may be related be this:
"table already exists in the InnoDB internal data dictionary, though the .frm file for the table has been deleted. "

But the writer doesn't indicate if it's possible to fix this situation, and if so, how.

There is no existing file on the file system called mytable.frm.
The table is not in the database.
There is no record of the table in the mysql or the information_schema databases.

Could this be a bonafide bug - that dropping a table in this case did not drop all aspects of the table?

I tried to outsmart the bug by:
- creating the exact table, but removing the engine=innodb part of the create statement. This worked. I then ran "repair table"... fine... then drop table... then try to recreate as innodb again... same failure.
- I tried creating the table with a different name, then using "rename table" to get it back to the original table name... same failure.

finally, after reading this entire thread I gave up, dumped my database, dropped it, recreated it, and pulled in the other tables from the dump file, and created the table that had previously been a problem. Seems like a pretty harsh workaround for this problem.

This is happening on mysql 5.0.41 community server

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: ERROR 1005: Can't create table (errno: 121) Help
10313
February 19, 2009 08:39AM


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.