diff options
author | Michael Widenius <monty@askmonty.org> | 2010-03-10 15:39:02 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-03-10 15:39:02 +0200 |
commit | 77afc2be46e0a815357795a0ab0977115c8a313d (patch) | |
tree | 9073744695c84278cfca2d72d6422c09a00ea72e /sql/sql_delete.cc | |
parent | 292f6568fa377420c81e0317a26b804057ce208c (diff) | |
download | mariadb-git-77afc2be46e0a815357795a0ab0977115c8a313d.tar.gz |
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
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 7 |
1 files changed, 5 insertions, 2 deletions
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 |