title: Failure in using alter table to add partition
body: <p>I have a table having structure as below:</p>
  
  <pre><code>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
  )
  </code></pre>
  
  <p>When running statement to add partition, it fails and show the error:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>So I remove the foreign constraint with parent_table, then run again. It still fails and show the same error.</p>
  
  <p>Did I do anything wrong?</p>