CREATE TABLE works; table shows up in SHOW TABLES; but errno 2
I create a table named Stay in a database named LEAD.
The creation statement, which is braindead simple, executes fine.
Then I insert some default data into it.
The insert statement which I'll quote below fails with errno 2. MySQL claims that it cannot find the 'stay' file (even though the CREATE TABLE statement completed normally).
I have dropped and recreated the LEAD database several times. This does not solve the problem.
Here is the error message:
Error executing SQL INSERT INTO `LEAD`.`Stay` (`code`, `description`, `id`) VALUES ('1', 'at an emergency shelter, including hotel or motel paid for with emergency shelter voucher', 1):
Caused By: Can't find file: 'stay' (errno: 2)
The only slightly odd thing that I've done is that I forgot in my table creation script to append the engine clause. I realized after the fact that I had forgotten to make the table an InnoDB table. So I dropped the database, appended the ENGINE INNODB clause to the create table statement, and reran my database setup script. It was at this point that the INSERT statement above failed.
I can recreate the database at will, so if I need to nuke files and/or data I can do that. What's going on here?
Subject
Written By
Posted
CREATE TABLE works; table shows up in SHOW TABLES; but errno 2
September 10, 2010 06:35PM
September 11, 2010 01:09PM
September 13, 2010 11:26AM
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.