diff --git a/sql/handler.cc b/sql/handler.cc index c4abfeea0a8..0da56350de5 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -3654,19 +3654,6 @@ int handler::ha_write_row(uchar *buf) } -/** - Write a record to the engine bypassing row-level binary logging. - This method is used internally by the server for writing to - performance schema tables, which are never replicated. - TODO: Merge this function with ha_write_row(), and provide a way - to disable the binlog there. -*/ -int handler::ha_write_row_no_binlog(uchar *buf) -{ - return write_row(buf); -} - - int handler::ha_update_row(const uchar *old_data, uchar *new_data) { int error; diff --git a/sql/handler.h b/sql/handler.h index 06f0a2cf035..1992af5b1ad 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -1158,7 +1158,6 @@ public: */ int ha_external_lock(THD *thd, int lock_type); int ha_write_row(uchar * buf); - int ha_write_row_no_binlog(uchar * buf); int ha_update_row(const uchar * old_data, uchar * new_data); int ha_delete_row(const uchar * buf); diff --git a/sql/log.cc b/sql/log.cc index c7a8037d4b5..4ca7e9d31fd 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -409,7 +409,7 @@ bool Log_to_csv_event_handler:: } /* log table entries are not replicated */ - if (table->file->ha_write_row_no_binlog(table->record[0])) + if (table->file->ha_write_row(table->record[0])) { struct tm start; localtime_r(&event_time, &start); @@ -612,7 +612,7 @@ bool Log_to_csv_event_handler:: goto err; /* log table entries are not replicated */ - if (table->file->ha_write_row_no_binlog(table->record[0])) + if (table->file->ha_write_row(table->record[0])) { struct tm start; localtime_r(¤t_time, &start); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 5b63eac35dd..b471ff8a108 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -7716,6 +7716,7 @@ open_performance_schema_table(THD *thd, TABLE_LIST *one_table, DBUG_ASSERT(table->s->table_category == TABLE_CATEGORY_PERFORMANCE); /* Make sure all columns get assigned to a default value */ table->use_all_columns(); + table->no_replicate= 1; } DBUG_RETURN(table);