diff options
author | unknown <bell@sanja.is.com.ua> | 2002-12-01 00:11:22 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2002-12-01 00:11:22 +0200 |
commit | 1941d9b597af4a80820c4a40020c2ee4764996ee (patch) | |
tree | 39b4f91d117b2a844051a756826b043bbafbaa7f /sql/sql_delete.cc | |
parent | 0b270eb4612e0c7ba32193171852be8982b0d643 (diff) | |
download | mariadb-git-1941d9b597af4a80820c4a40020c2ee4764996ee.tar.gz |
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
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 8 |
1 files changed, 5 insertions, 3 deletions
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 { |