summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index ebb09b99df7..13038435986 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -164,7 +164,15 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
else
{
table->file->print_error(error,MYF(0));
- error=0;
+ /*
+ In < 4.0.14 we set the error number to 0 here, but that
+ was not sensible, because then MySQL would not roll back the
+ failed DELETE, and also wrote it to the binlog. For MyISAM
+ tables a DELETE probably never should fail (?), but for
+ InnoDB it can fail in a FOREIGN KEY error or an
+ out-of-tablespace error.
+ */
+ error= 1;
break;
}
}