From 1941d9b597af4a80820c4a40020c2ee4764996ee Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 1 Dec 2002 00:11:22 +0200 Subject: fix of error handling mysql-test/r/subselect.result: test of error handling with subselect mysql-test/t/subselect.test: test of error handling with subselect --- sql/sql_delete.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sql/sql_delete.cc') diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index fe1a967f936..d35790da1b0 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -140,9 +140,11 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order, deleted=0L; init_ftfuncs(thd, &thd->lex.select_lex, 1); thd->proc_info="updating"; - while (!(error=info.read_record(&info)) && !thd->killed) + while (!(error=info.read_record(&info)) && !thd->killed && + !thd->net.report_error) { - if (!(select && select->skipp_record())) + // thd->net.report_error is tested to disallow delete row on error + if (!(select && select->skipp_record())&& !thd->net.report_error ) { if (!(error=table->file->delete_row(table->record[0]))) { @@ -205,7 +207,7 @@ cleanup: thd->lock=0; } delete select; - if (error >= 0) // Fatal error + if (error >= 0 || thd->net.report_error) send_error(thd,thd->killed ? ER_SERVER_SHUTDOWN: 0); else { -- cgit v1.2.1