1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.


mysql-test/r/innodb_mysql.result:
  Add result for bug#18819: DELETE IGNORE hangs on foreign key parent
  delete.
mysql-test/t/innodb_mysql.test:
  Add test case for bug#18819: DELETE IGNORE hangs on foreign key parent
  delete.
sql/sql_delete.cc:
  Report success if we have got an error, but we are in DELETE IGNORE, and
  the error is not fatal (if it is, it would be reported to the client).
This commit is contained in:
unknown
2006-10-25 19:53:26 +04:00
parent 5d46e29933
commit e3d49f0c3f
3 changed files with 47 additions and 1 deletions

View File

@ -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
{