I think your diagnosis is correct. There is an FRM without a corresponding InnoDB table. The question is, what causes this, and how do we prevent it?
It appears to be a bug related to CREATE TABLE and DROP TABLE. I have found it a good idea to commit and reconnect after creating an InnoDB table. Erik -----Original Message----- From: Heikki Tuuri [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 17, 2001 2:20 AM To: [EMAIL PROTECTED] Subject: Re: Need to repair InnoDb tables Brent, maybe you have moved .frm files around? If there is an orphaned .frm file for a table without a corresponding table inside InnoDB data files you get the following errors: mysql> show tables; +-----------------+ | Tables_in_test2 | +-----------------+ | fare | +-----------------+ 1 row in set (0.34 sec) mysql> describe fare; ERROR 1016: Can't open file: 'fare.InnoDB'. (errno: 1) mysql> drop table fare; ERROR 1051: Unknown table 'fare' mysql> and in the MySQL error log you get: 011017 9:11:52 InnoDB: Started mysqld: ready for connections InnoDB: Cannot find table test2/fare from the internal data dictionary InnoDB: of InnoDB though the .frm file for the table exists. Maybe you InnoDB: have deleted and recreated InnoDB data files but have forgotten InnoDB: to delete the corresponding .frm files of InnoDB tables? InnoDB: Error: table test2/fare 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? The way to fix the problem is to delete the .frm file from the MySQL database directory in question. Regards, Heikki http://www.innodb.com/ibman.html >In my sample database, all of the tables are InnoDb. For some reason 2 of >the tables can no longer be accessed. I keep getting error 1016. > >1) Where can I find a list of error codes and their meanings? >2) How do I fix an InnoDb table? > >TIA > >Brent > >mysql> show tables; >+-------------------+ >| Tables_in_isample | >+-------------------+ >| absence | >| event | >| member | >| president | >| score | >| student | >+-------------------+ >6 rows in set (0.00 sec) > >mysql> describe absence; >ERROR 1016: Can't open file: 'absence.InnoDB'. (errno: 1) >mysql> describe president; >ERROR 1016: Can't open file: 'president.InnoDB'. (errno: 1) >mysql> select * from absence; >ERROR 1016: Can't open file: 'absence.InnoDB'. (errno: 1) >mysql> select * from president; >ERROR 1016: Can't open file: 'president.InnoDB'. (errno: 1) >mysql> drop table president; >ERROR 1051: Unknown table 'president' >mysql> drop table absence; >ERROR 1051: Unknown table 'absence' >mysql> > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php