Fix for: Bug#44987 DELETE IGNORE and FK constraint

- Now DELETE IGNORE skips over rows with a foreign key constraints (as it was supposed to do)


mysql-test/r/foreign_key.result:
  Test case for Bug#44987 DELETE IGNORE and FK constraint
mysql-test/t/foreign_key.test:
  Test case for Bug#44987 DELETE IGNORE and FK constraint
sql/sql_delete.cc:
  Firx for Bug#44987 DELETE IGNORE and FK constraint
  Now DELETE IGNORE skips over rows with a foreign key constraints (as it was supposed to do)
  Bug fix inspired by: Moritz Mertinkat
This commit is contained in:
Michael Widenius 2010-03-10 15:39:02 +02:00
commit 77afc2be46
3 changed files with 56 additions and 4 deletions

View file

@ -335,8 +335,11 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
InnoDB it can fail in a FOREIGN KEY error or an
out-of-tablespace error.
*/
error= 1;
break;
if (!select_lex->no_error)
{
error= 1;
break;
}
}
}
else