summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 35183fc959b..7c012e3b442 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -254,7 +254,8 @@ cleanup:
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
transactional_table, FALSE);
- if (mysql_bin_log.write(&qinfo) && transactional_table)
+ if ((thd->query_str_binlog_unsuitable || mysql_bin_log.write(&qinfo))
+ && transactional_table)
error=1;
}
if (!transactional_table)
@@ -719,7 +720,8 @@ bool multi_delete::send_eof()
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
transactional_tables, FALSE);
- if (mysql_bin_log.write(&qinfo) && !normal_tables)
+ if ((thd->query_str_binlog_unsuitable || mysql_bin_log.write(&qinfo))
+ && !normal_tables)
local_error=1; // Log write failed: roll back the SQL statement
}
if (!transactional_tables)