summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorkroki/tomash@moonlight.intranet <>2006-10-25 19:53:26 +0400
committerkroki/tomash@moonlight.intranet <>2006-10-25 19:53:26 +0400
commitb7b991cec395da1cf3277b00df9328c0b6a1b7fa (patch)
tree76cc8ccd7dde29804581307da1615334d22c3ad8 /sql
parentacaa584c5523753cab5b3a50ed3c95672b462541 (diff)
downloadmariadb-git-b7b991cec395da1cf3277b00df9328c0b6a1b7fa.tar.gz
BUG#18819: DELETE IGNORE hangs on foreign key parent delete
If the error happens during DELETE IGNORE, nothing could be send to the client, thus leaving it frozen expecting the reply. The problem was that if some error occurred, it wouldn't be reported to the client because of IGNORE, but neither success would be reported. MySQL 4.1 would not freeze the client, but will report ERROR 1105 (HY000): Unknown error instead, which is also a bug. The solution is to report success if we are in DELETE IGNORE and some non-fatal error has happened.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_delete.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index b085d37be78..506eec88500 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -253,7 +253,8 @@ cleanup:
mysql_unlock_tables(thd, thd->lock);
thd->lock=0;
}
- if (error >= 0 || thd->net.report_error)
+ if ((error >= 0 || thd->net.report_error) &&
+ (!thd->lex->ignore || thd->is_fatal_error))
send_error(thd,thd->killed ? ER_SERVER_SHUTDOWN: 0);
else
{