语法错误或访问冲突:1701无法截断外键约束中引用的表

时间:2012-11-28 17:54:57

标签: mysql magento magento-1.4

当刷新magento的缓存存储时出现此错误

 SQLSTATE[42000]: Syntax error or access violation: 1701 Cannot truncate a table referenced in a foreign key constraint (`mysite`.`core_cache_tag`, CONSTRAINT `FK_CORE_CACHE_TAG` FOREIGN KEY (`cache_id`) REFERENCES `mysite`.`core_cache` (`id`))

I tried to 

SET FOREIGN_KEY_CHECKS=0;
TRUNCATE core_cache_tag;
TRUNCATE core_cache;
SET FOREIGN_KEY_CHECKS=1;

but no luck when i flushed again.

0 个答案:

没有答案