Heikki,
> when you try to create the table test with type = innodb,
> does the server print into the error log or to the screen:
> Innobase: error: table test/test already exists in Innobase data
dictionary
Yes, indeed. I missed that line between all the stack backtrace output.
> If so, then you have probably created the table already in the InnoDB
> format and deleted the .frm file. But deleting the .frm file does not
> remove the table from the internal data dictionary of InnoDB.
I don't think I ever deleted a single .frm file, but it's possible I deleted
the whole database directory at some point.
> (Now if you have lost the .frm file you may have to create
> a new database and create an InnoDB table with the same name there
> so that you get an .frm file you can copy to your old database's 'test'
> directory. DROP TABLE looks first that the .frm file exists.)
This doesn't seem to work for me:
mysql> create database dummy;
Query OK, 1 row affected (0.00 sec)
mysql> create table dummy.test (x int) type=innodb;
Query OK, 0 rows affected (0.00 sec)
shell> cp dummy/test.frm test
mysql> drop table test.test;
Query OK, 0 rows affected (0.01 sec)
mysql> create table test.test (x int) type=innodb;
ERROR 1005: Can't create table './test/test.frm' (errno: 2)
Since there probably were other zombie entries left anyway, I decided to
just re-create the InnoDB files. Good thing converting between table types
is so easy.
---------------------------------------------------------------------
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