unknown-linux-gnu (x86_64) の mysql バージョン 14.14 Distrib 5.1.66 で、MySQL の外部キー制約が尊重されない、または受け入れられないという問題があります。
データベース/テーブル構造は変更されていません。つまり、これが元の唯一のテーブル構造です。
これは、標準の mysqldump の結果です。
-- Table structure for table `catalog_category_entity_int`
DROP TABLE IF EXISTS `catalog_category_entity_int`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `catalog_category_entity_int` (
`value_id` int(11) NOT NULL AUTO_INCREMENT,
`entity_type_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`store_id` smallint(5) unsigned NOT NULL DEFAULT '0',
`entity_id` int(10) unsigned NOT NULL DEFAULT '0',
`value` int(11) DEFAULT NULL,
PRIMARY KEY (`value_id`),
UNIQUE KEY `IDX_BASE` (`entity_type_id`,`entity_id`,`attribute_id`,`store_id`),
KEY `FK_ATTRIBUTE_INT_ENTITY` (`entity_id`),
KEY `FK_CATALOG_CATEGORY_EMTITY_INT_ATTRIBUTE` (`attribute_id`),
KEY `FK_CATALOG_CATEGORY_EMTITY_INT_STORE` (`store_id`),
CONSTRAINT `FK_CATALOG_CATEGORY_EMTITY_INT_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_CATALOG_CATEGORY_EMTITY_INT_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_CATALOG_CATEGORY_EMTITY_INT_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE)
ENGINE=InnoDB AUTO_INCREMENT=1483 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
見る:
ユニークキーIDX_BASE
( entity_type_id
, entity_id
, attribute_id
, store_id
)
Error:
Query:
INSERT INTO `catalog_category_entity_int` VALUES (1,3,32,0,2,1),(2,3,32,1,2,1),(6,3,32,0,4,1),[...];
MySQL said: Documentation
#1062 - Duplicate entry '3-144-40-0' for key 'IDX_BASE'
私はこれが起こるのを見たことがありません。