I have a table with a structure as shown below:
CREATE TABLE `child_table` ( `id` int(11) NOT NULL AUTO_INCREMENT, `value` int, `ref_id` int, PRIMARY KEY (`id`), KEY `ref_id` (`ref_id`), CONSTRAINT `FK4E9BF08E940F8C98` FOREIGN KEY (`ref_id`) REFERENCES `parent_table` (`id`) ON DELETE CASCADE )
When the operator starts to add a section, it crashes and shows an error:
ERROR 1217: Cannot delete or update a parent row: a foreign key constraint fails SQL Statement: ALTER TABLE `learning`.`child_table` PARTITION BY HASH(ref_id) PARTITIONS 10
So, I remove the outer constraint with parent_table and then run again. It still does not work and shows the same error.
Did I do something wrong?
source share