MySQL Forums
Forum List  »  German

Re: Mysteriöser "duplicate entry error"
Posted by: Thomas Wiedmann
Date: August 08, 2012 01:39AM

Kannst Du im CREATE TABLE nicht aus dem UNIQUE KEY kurzfristig ein (normalen) KEY machen? Dann kannst Du die Daten einlesen und bereinigen. Die Frage ist, ob der UNIQUE KEY sinnvoll ist oder nicht.

CREATE TABLE geändert...(UNIQUE KEY geändert in KEY)
CREATE TABLE `catalog_product_link_attribute_int` (
`value_id` int(10) unsigned NOT NULL auto_increment COMMENT 'Value ID',
`product_link_attribute_id` smallint(5) unsigned default NULL COMMENT 'Product Link Attribute ID',
`link_id` int(10) unsigned NOT NULL default '0' COMMENT 'Link ID',
`value` int(11) NOT NULL default '0' COMMENT 'Value',
PRIMARY KEY (`value_id`),
KEY `UNQ_CAT_PRD_LNK_ATTR_INT_PRD_LNK_ATTR_ID_LNK_ID` (`product_link_attribute_id`,`link_id`),
KEY `IDX_CAT_PRD_LNK_ATTR_INT_PRD_LNK_ATTR_ID` (`product_link_attribute_id`),
KEY `IDX_CATALOG_PRODUCT_LINK_ATTRIBUTE_INT_LINK_ID` (`link_id`),
CONSTRAINT `FK_7FC5D919C1F8264D33B99DF49F51AF5D` FOREIGN KEY (`product_link_attribute_id`) REFERENCES `catalog_product_link_attribute` (`product_link_attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_CAT_PRD_LNK_ATTR_INT_LNK_ID_CAT_PRD_LNK_LNK_ID` FOREIGN KEY (`link_id`) REFERENCES `catalog_product_link` (`link_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5601 DEFAULT CHARSET=utf8 COMMENT='Catalog Product Link Integer Attribute Table';

Grüße
Thomas

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Mysteriöser "duplicate entry error"
1046
August 08, 2012 01:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.