title: MySQL fails because of FK constraint that should not exist
body: <p>I'm running the following very boring query:</p>
  
  <pre><code>alter table mytable change user_id user_id varchar(36) null default null,
  add foreign key (user_id) references users(id) on delete set null;
  </code></pre>
  
  <p>But it fails with the following error:</p>
  
  <pre><code>#1452 - Cannot add or update a child row: a foreign key constraint fails
  (`mydatabase`.`#sql-602_60f`, CONSTRAINT `#sql-602_60f_ibfk_4`
  FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL
  </code></pre>
  
  <p>The problem is that that foreign key constraint doesn't exist, so I can't delete it. There are 3 foreign key constaints on the table (mytable_ibfk_1, mytable_ibfk_2, mytable_ibfk_3), but nothing with the name mentioned, and trying to delete it produces another error.</p>
  
  <p>Any ideas how to fix this?</p>