diff --git a/sql/log.cc b/sql/log.cc index 9b5b2ae5a6c..f12cedfbf05 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -3403,35 +3403,6 @@ void THD::binlog_set_stmt_begin() { trx_data->before_stmt_pos= pos; } -int THD::binlog_flush_transaction_cache() -{ - DBUG_ENTER("binlog_flush_transaction_cache"); - binlog_trx_data *trx_data= (binlog_trx_data*) - thd_get_ha_data(this, binlog_hton); - DBUG_PRINT("enter", ("trx_data=0x%lu", (ulong) trx_data)); - if (trx_data) - DBUG_PRINT("enter", ("trx_data->before_stmt_pos=%lu", - (ulong) trx_data->before_stmt_pos)); - - /* - Write the transaction cache to the binary log. We don't flush and - sync the log file since we don't know if more will be written to - it. If the caller want the log file sync:ed, the caller has to do - it. - - The transaction data is only reset upon a successful write of the - cache to the binary log. - */ - - if (trx_data && likely(mysql_bin_log.is_open())) { - if (int error= mysql_bin_log.write_cache(&trx_data->trans_log, true, true)) - DBUG_RETURN(error); - trx_data->reset(); - } - - DBUG_RETURN(0); -} - /* Write a table map to the binary log. diff --git a/sql/sql_class.h b/sql/sql_class.h index 5f2b50f48b8..b660c615920 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1243,7 +1243,6 @@ public: Public interface to write RBR events to the binlog */ void binlog_start_trans_and_stmt(); - int binlog_flush_transaction_cache(); void binlog_set_stmt_begin(); int binlog_write_table_map(TABLE *table, bool is_transactional); int binlog_write_row(TABLE* table, bool is_transactional,