All pastes #1045 Raw Edit

Unable top drop table, error 1051

public text v1 · immutable
#1045 ·published 2004-09-23 06:58 UTC
rendered paste body
I've a problem that I can't drop a certain table, always get back the error "unknown table".

Version: 4.0.21 (Debian Testing)
Table-Type: InnoDB

mysql> show tables;
[...]
| produkt_kategorie        |


mysql> drop table produkt_kategorie;
ERROR 1051: Unknown table 'produkt_kategorie'

The ownerships/permission seem right to me too:
-rw-rw----  1 mysql mysql 8670 Sep 21 11:23 produkt_kategorie.frm

mysql> describe produkt_kategorie;
| Field        | Type             | Null | Key | Default | Extra          |
+--------------+------------------+------+-----+---------+----------------+
| pk_id        | int(10) unsigned |      | PRI | NULL    | auto_increment |
| pk_pt_id_typ | int(10) unsigned |      | MUL | 0       |                |
| pk_kategorie | varchar(255)     | YES  |     | NULL    |                |
| pk_sortid    | int(10) unsigned | YES  |     | NULL    |                |

pk_pt_id_typ is from a 1:n relation to the table produktkategorie_typ.

I do the operation as user 'root' which has all access-rights.

When I view the table in phpmyadmin (using 2.5.7pl1) I also see this additional information:

InnoDB free: 44032 kB; (`pk_pt_id_typ`) REFER `produktkategorie_typ`(`pt_id`) ON DELETE NO ACTION ON UPDATE NO ACTION

I've used DbDesigner4 to design the table and then use the synchronisation feature to create the tables in the database.

I'm using a 1:n relation from another table, produktkategorie_typ, to this table. I've created the Reference Definitions, but yet haven't assigned any actions (thus there's NO ACTION defined as seen above).

I believe it has to do with the relation/reference definitions from InnoDB, so to me the message seems missleading.

The only way for me to drop the table is to completely drop the database and recreate.