Hi,
Egor Egorov wrote:
Can you create a test case? I.e. a .sql file which is supposed to drop the table well but instead fails?
Nevermind my last post, I found the workaround to disable foregin_key_checks during import; interesting.
Here is a small example:
set foreign_key_checks=0;
CREATE TABLE `produkt_kategorie` ( `pk_id` int(10) unsigned NOT NULL auto_increment, `pk_pt_id_typ` int(10) unsigned NOT NULL default '0', `pk_kategorie` varchar(255) default NULL, `pk_sortid` int(10) unsigned default NULL, PRIMARY KEY (`pk_id`), KEY `produk_kategorie_FKIndex1` (`pk_pt_id_typ`), CONSTRAINT `produkt_kategorie_ibfk_1` FOREIGN KEY (`pk_pt_id_typ`) REFERENCES `produktkategorie_typ` (`pt_id`) ON DELETE NO ACTION ON UPDATE NO ACTION ) TYPE=InnoDB;
CREATE TABLE `produktkategorie_typ` ( `pt_id` int(10) unsigned NOT NULL auto_increment, `pt_name` varchar(255) default NULL, `pt_sortid` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`pt_id`) ) TYPE=InnoDB;
set foreign_key_checks=1;
When I now try to drop the table produktkategorie_typ I get the error:
#1051 - Unknown table 'produktkategorie_typ'
I think it's because of the constraint, but then the error message is missldeading.
So basically I would need to disable the foreign_key_checks every time I drop a table which has constraints?
I see the bigger picture now I guess, just didn't while trying to achive this with phpmyadmin.
thanks, - Markus
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]