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.cc15
1 files changed, 5 insertions, 10 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index fe54a12e4dc..8581803a9ad 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -975,16 +975,11 @@ end:
{
if (!error)
{
- if (mysql_bin_log.is_open())
- {
- /*
- TRUNCATE must always be statement-based binlogged (not row-based) so
- we don't test current_stmt_binlog_row_based.
- */
- thd->clear_error();
- thd->binlog_query(THD::STMT_QUERY_TYPE,
- thd->query, thd->query_length, FALSE, FALSE);
- }
+ /*
+ TRUNCATE must always be statement-based binlogged (not row-based) so
+ we don't test current_stmt_binlog_row_based.
+ */
+ write_bin_log(thd, TRUE, thd->query, thd->query_length);
send_ok(thd); // This should return record count
}
VOID(pthread_mutex_lock(&LOCK_open));