List:General Discussion« Previous MessageNext Message »
From:Markus Fischer Date:September 22 2004 7:32am
Subject:Unable top drop table, error 1051
View as plain text  
Hi,

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.

thanks for any hints
- Markus
Thread
Unable top drop table, error 1051Markus Fischer22 Sep
  • Re: Unable top drop table, error 1051Egor Egorov24 Sep
    • Re: Unable top drop table, error 1051Markus Fischer24 Sep
    • Re: Unable top drop table, error 1051Markus Fischer24 Sep
      • Re: Unable top drop table, error 1051Egor Egorov27 Sep
      • Re: Unable top drop table, error 1051Egor Egorov28 Sep
        • Re: Unable top drop table, error 1051Markus Fischer29 Sep