From 77afc2be46e0a815357795a0ab0977115c8a313d Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Wed, 10 Mar 2010 15:39:02 +0200 Subject: 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 --- sql/sql_delete.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sql/sql_delete.cc') diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index cea9b2857e2..827dfd79cc2 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -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 -- cgit v1.2.1