Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4052725
  • 博文数量: 272
  • 博客积分: 7846
  • 博客等级: 少将
  • 技术积分: 6476
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-25 16:27
文章分类

全部博文(272)

分类: 云计算

2012-07-15 17:14:21

mysql> delete from block_device_mapping where id=2;
Query OK, 1 row affected (0.06 sec)

mysql> delete from block_device_mapping where id=1;
Query OK, 1 row affected (0.05 sec)

mysql> delete from volumes where id=1;
ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraiiscsi_targets_ibfk_1` FOREIGN KEY (`volume_id`) REFERENCES `volumes` (`id`))
mysql> SET FOREIGN_KEY_CHECKS=0;
Query OK, 0 rows affected (0.00 sec)

mysql> delete from volumes where id=1;
Query OK, 1 row affected (0.10 sec)

mysql> SET FOREIGN_KEY_CHECKS=1;
Query OK, 0 rows affected (0.00 sec)

阅读(4368) | 评论(0) | 转发(2) |
给主人留下些什么吧!~~