mysql 版本:5.5.8
建表sql如下:
DROP TABLE IF EXISTS `xmldata`;CREATE TABLE `xmldata` (
`XmlDataId` INT(11) NOT NULL AUTO_INCREMENT,
`XmlDocId` INT(11) NOT NULL,
`XmlTagId` INT(11) NOT NULL,
`TagValue` VARCHAR(10000) DEFAULT NULL,
`ContentWhUrl` VARCHAR(2000) DEFAULT NULL,
`ParentId` INT(11) NOT NULL,
PRIMARY KEY (`XmlDataId`),
KEY `Fk_XmlTag_XmlTag_XmlTagId` (`XmlTagId`),
KEY `Fk_XmlTag_XmlDoc_XmlDocId` (`XmlDocId`),
CONSTRAINT `Fk_XmlTag_XmlTag_XmlTagId` FOREIGN KEY (`XmlTagId`) REFERENCES `xmltag` (`XmlTagId`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `Fk_XmlTag_XmlDoc_XmlDocId` FOREIGN KEY (`XmlDocId`) REFERENCES `xmldoc` (`XmlDocId`) ON DELETE CASCADE ON UPDATE CASCADE
)
ENGINE=INNODB AUTO_INCREMENT=1220861 DEFAULT CHARSET=utf8 COMMENT='保存xml的具体内容'
PARTITION BY RANGE(XmlDataId)(
PARTITION P0 VALUES LESS THAN (500000),
PARTITION P1 VALUES LESS THAN (1000000),
PARTITION P2 VALUES LESS THAN (1500000),
PARTITION P3 VALUES LESS THAN (2000000),
PARTITION P4 VALUES LESS THAN (2500000),
PARTITION P5 VALUES LESS THAN MAXVALUE
)
;出现错误:
Error Code : 1506
Foreign key clause is not yet supported in conjunction with partitioning请问要如何解决?谢谢!
--转自