I have this table:
CREATE TABLE `category_tree` ( `category_tree_id` BIGINT NOT NULL AUTO_INCREMENT, `parent_id` BIGINT, `mandant_id` SMALLINT NOT NULL, `partner_id` SMALLINT NOT NULL, `class_id` VARCHAR ( 32) NOT NULL, `position` SMALLINT NOT NULL, `path` VARCHAR (255), `description` VARCHAR (255) NOT NULL, # PRIMARY KEY (`category_tree_id`), INDEX (`parent_id`), INDEX (`mandant_id`), INDEX (`partner_id`), FOREIGN KEY (`parent_id`) REFERENCES `category_tree` (`category_tree_id`), FOREIGN KEY (`mandant_id`) REFERENCES `mandant` (`mandant_id`), FOREIGN KEY (`partner_id`) REFERENCES `partner` (`partner_id`) ) TYPE=InnoDB;
After call:
TRUNCATE TABLE `category_tree`;
I get this error message:
TRUNCATE TABLE `category_tree` Cannot delete or update a parent row: a foreign key constraint fails
While there is an foreign key on each self. Is this a Bug in MySQL?
Regards, Rafal
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]