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

Added test for bug #5894 "Triggers with altered tables cause corrupt

databases" and basic handling of errors which happen in triggers.
(The bug itself was fixed by several previous patches).
Fixed bug in multi-delete which were exposed by these tests.


mysql-test/r/trigger.result:
  Added test for bug #5894 "Triggers with altered tables cause corrupt
  databases" and basic handling of errors which happen in triggers.
mysql-test/t/trigger.test:
  Added test for bug #5894 "Triggers with altered tables cause corrupt
  databases" and basic handling of errors which happen in triggers.
sql/sql_delete.cc:
  multi_delete::send_eof():
    Fixed bug which were exposed by testing of basic handling of errors
    in triggers. Error which happened in multi_delete::do_deletes() 
    was wiped out by thd->clear_error() and thus never sent to client
    (and this stalled client connection).
This commit is contained in:
unknown
2005-05-30 18:55:56 +04:00
parent a985031a29
commit 02425b7bf0
3 changed files with 296 additions and 2 deletions

View File

@ -696,11 +696,11 @@ bool multi_delete::send_eof()
Note that if we deleted nothing we don't write to the binlog (TODO:
fix this).
*/
if (deleted && (error <= 0 || normal_tables))
if (deleted && ((error <= 0 && !local_error) || normal_tables))
{
if (mysql_bin_log.is_open())
{
if (error <= 0)
if (error <= 0 && !local_error)
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
transactional_tables, FALSE);