diff options
author | He Zhenxing <zhenxing.he@sun.com> | 2010-01-24 15:03:23 +0800 |
---|---|---|
committer | He Zhenxing <zhenxing.he@sun.com> | 2010-01-24 15:03:23 +0800 |
commit | 2b16517522afad76bc94b07bdaa8af64091e713b (patch) | |
tree | 30ea0d6bf62fef90f4f1499d15e388cb43241707 /sql/sql_delete.cc | |
parent | 16471fecc7084f2eb56c459ff209bf2491ff327d (diff) | |
download | mariadb-git-2b16517522afad76bc94b07bdaa8af64091e713b.tar.gz |
Backport Bug#37148 to 5.1
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 6b9a83e695b..af3fdf11696 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -850,9 +850,10 @@ void multi_delete::abort() if (mysql_bin_log.is_open()) { int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED); - thd->binlog_query(THD::ROW_QUERY_TYPE, - thd->query(), thd->query_length(), - transactional_tables, FALSE, errcode); + /* possible error of writing binary log is ignored deliberately */ + (void) thd->binlog_query(THD::ROW_QUERY_TYPE, + thd->query(), thd->query_length(), + transactional_tables, FALSE, errcode); } thd->transaction.all.modified_non_trans_table= true; } @@ -1167,8 +1168,9 @@ end: { /* In RBR, the statement is not binlogged if the table is temporary. */ if (!is_temporary_table || !thd->current_stmt_binlog_row_based) - write_bin_log(thd, TRUE, thd->query(), thd->query_length()); - my_ok(thd); // This should return record count + error= write_bin_log(thd, TRUE, thd->query(), thd->query_length()); + if (!error) + my_ok(thd); // This should return record count } VOID(pthread_mutex_lock(&LOCK_open)); unlock_table_name(thd, table_list); |