summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorunknown <dlenev@brandersnatch.localdomain>2005-05-30 18:55:56 +0400
committerunknown <dlenev@brandersnatch.localdomain>2005-05-30 18:55:56 +0400
commit02425b7bf05fc885bd75c66b51f06b6fdba696b7 (patch)
tree995c7410d4d0654fb90393568dd9b335684735c1 /sql/sql_delete.cc
parenta985031a296b587b3c4227c43392afb072843c83 (diff)
downloadmariadb-git-02425b7bf05fc885bd75c66b51f06b6fdba696b7.tar.gz
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).
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 97830f7ec8f..672972ccb72 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -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);