Markus,

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

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. You must
use DROP TABLE to remove the table.

(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.)

I will look at the ALTER TABLE problem if one tries to alter a table to
one which already exists in the InnoDB data dictionary.

Regards,

Heikki

Copied message:
.............................
Hi,

I'm using MySQL 3.23.39-log compiled from sources on SuSE Linux 6.4. When I
create an InnoDB table with the same name as the database, I get the
following error message:

mysql> create database test;
  Query OK, 1 row affected (0.01 sec)

mysql> create table test (x int) type=innodb;
  ERROR 1005: Can't create table './test/test.frm' (errno: 0)

Creating an InnoDB table with a different name works fine, as does creating
a MyISAM table with the same name:

  mysql> create table test2 (x int) type=innodb;

  Query OK, 0 rows affected (0.01 sec)
  mysql> create table test (x int);

  Query OK, 0 rows affected (0.00 sec)
When I try to convert the MyISAM table to InnoDB, the server crashes and the
table is lost:

mysql> alter table test type = innodb;
  ERROR 2013: Lost connection to MySQL server during query

I could provide additional information and maybe a stacktrace if necessary,
but I'd prefer not to recompile the server etc. in case this problem is
already known or easy to fix without.


---------------------------------------------------------------------
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

Reply via email to