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) |