Bug #41705 Doc update needed for Innodb data dict out of sync with innodb_file_per_table
Submitted: 23 Dec 2008 2:49 Modified: 30 Jun 2009 19:44
Reporter: Mark Callaghan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.0.37 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any
Tags: exist, innodb_file_per_table, not, Tablespace

[23 Dec 2008 2:49] Mark Callaghan
Description:
We use innodb_file_per_table. The .frm and .ibd file for this table are missing because of bugs on our side. There is not documented workaround for this problem:

081015 12:54:57  InnoDB: Error: table 'mysql/SyncReplicationState_20080719'
InnoDB: in InnoDB data dictionary has tablespace id 12691,
InnoDB: but tablespace with that id or name does not exist. Have
InnoDB: you deleted or moved .ibd files?
InnoDB: This may also be a table created with CREATE TEMPORARY TABLE
InnoDB: whose .ibd and .frm files MySQL automatically removed, but the
InnoDB: table still exists in the InnoDB internal data dictionary.
InnoDB: Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html

Can the referenced docs get updated? 
http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting.html
http://dev.mysql.com/doc/refman/5.0/en/innodb-troubleshooting-datadict.html

How to repeat:
I don't know how to reproduce this.
[23 Dec 2008 4:26] Valeriy Kravchuk
Thank you for a reasonable documentation request.
[14 May 2009 18:10] Paul DuBois
Information from Heikki:

hmm... I think the following will work:

1. Create a matching .frm file in some other database directory and put it to the database dir where the orphan table is.

2. Do DROP TABLE ...

3. That should drop the table and InnoDB prints a warning to the .err log that the .ibd file was missing.

Can you please test that above, and add it to the docs if it works.
[30 Jun 2009 19:44] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.