diff --git a/sql/log.cc b/sql/log.cc index d95c2fc3523..b9094385c8a 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -558,28 +558,6 @@ private: binlog_cache_mngr(const binlog_cache_mngr& info); }; - -/* - Remove all row event from all binlog caches and clear all caches. - This is only called from CREATE .. SELECT, in which case it safe to delete - also events from the statement cache. -*/ - -void THD::binlog_remove_rows_events() -{ - binlog_cache_mngr *cache_mngr= binlog_get_cache_mngr(); - DBUG_ENTER("THD::binlog_remove_rows_events"); - - if (!cache_mngr || - (!WSREP_EMULATE_BINLOG_NNULL(this) && !mysql_bin_log.is_open())) - DBUG_VOID_RETURN; - - MYSQL_BIN_LOG::remove_pending_rows_event(this, &cache_mngr->stmt_cache); - MYSQL_BIN_LOG::remove_pending_rows_event(this, &cache_mngr->trx_cache); - cache_mngr->reset(1,1); - DBUG_VOID_RETURN; -} - /** The function handles the first phase of two-phase binlogged ALTER. On master binlogs START ALTER when that is configured to do so. diff --git a/sql/sql_class.h b/sql/sql_class.h index bc82fdda5bc..05acd4c52f1 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -3338,7 +3338,6 @@ public: binlog_flush_pending_rows_event(stmt_end, TRUE)); } int binlog_flush_pending_rows_event(bool stmt_end, bool is_transactional); - void binlog_remove_rows_events(); uint has_pending_row_events(); bool binlog_need_stmt_format(bool is_transactional) const { diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 4d237fca3e7..c280b0ec844 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -5438,9 +5438,6 @@ void select_create::abort_result_set() bool table_creation_was_logged= (!tmp_table || table->s->table_creation_was_logged); - /* CREATE SELECT failed. Remove all row events and clear caches */ - thd->binlog_remove_rows_events(); - if (tmp_table) { DBUG_ASSERT(saved_tmp_table_share);