diff options
-rw-r--r-- | sql/log_event.cc | 26 | ||||
-rw-r--r-- | sql/log_event.h | 13 | ||||
-rw-r--r-- | sql/sql_class.cc | 16 |
3 files changed, 19 insertions, 36 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 7594a6f7f10..cbf819dec2a 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -11117,9 +11117,9 @@ void Table_map_log_event::print(FILE *, PRINT_EVENT_INFO *print_event_info) #if !defined(MYSQL_CLIENT) Write_rows_log_event::Write_rows_log_event(THD *thd_arg, TABLE *tbl_arg, ulong tid_arg, - MY_BITMAP const *cols, bool is_transactional) - : Rows_log_event(thd_arg, tbl_arg, tid_arg, cols, is_transactional, WRITE_ROWS_EVENT_V1) + : Rows_log_event(thd_arg, tbl_arg, tid_arg, tbl_arg->write_set, + is_transactional, WRITE_ROWS_EVENT_V1) { } #endif @@ -12131,9 +12131,9 @@ end: #ifndef MYSQL_CLIENT Delete_rows_log_event::Delete_rows_log_event(THD *thd_arg, TABLE *tbl_arg, - ulong tid, MY_BITMAP const *cols, - bool is_transactional) - : Rows_log_event(thd_arg, tbl_arg, tid, cols, is_transactional, DELETE_ROWS_EVENT_V1) + ulong tid, bool is_transactional) + : Rows_log_event(thd_arg, tbl_arg, tid, tbl_arg->read_set, is_transactional, + DELETE_ROWS_EVENT_V1) { } #endif /* #if !defined(MYSQL_CLIENT) */ @@ -12261,21 +12261,11 @@ uint8 Delete_rows_log_event::get_trg_event_map() #if !defined(MYSQL_CLIENT) Update_rows_log_event::Update_rows_log_event(THD *thd_arg, TABLE *tbl_arg, ulong tid, - MY_BITMAP const *cols_bi, - MY_BITMAP const *cols_ai, - bool is_transactional) -: Rows_log_event(thd_arg, tbl_arg, tid, cols_bi, is_transactional, UPDATE_ROWS_EVENT_V1) -{ - init(cols_ai); -} - -Update_rows_log_event::Update_rows_log_event(THD *thd_arg, TABLE *tbl_arg, - ulong tid, - MY_BITMAP const *cols, bool is_transactional) -: Rows_log_event(thd_arg, tbl_arg, tid, cols, is_transactional, UPDATE_ROWS_EVENT_V1) +: Rows_log_event(thd_arg, tbl_arg, tid, tbl_arg->read_set, is_transactional, + UPDATE_ROWS_EVENT_V1) { - init(cols); + init(tbl_arg->write_set); } void Update_rows_log_event::init(MY_BITMAP const *cols) diff --git a/sql/log_event.h b/sql/log_event.h index 13d7242c98c..6c6fb1f4381 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -4518,8 +4518,8 @@ public: }; #if defined(MYSQL_SERVER) - Write_rows_log_event(THD*, TABLE*, ulong table_id, - MY_BITMAP const *cols, bool is_transactional); + Write_rows_log_event(THD*, TABLE*, ulong table_id, + bool is_transactional); #endif #ifdef HAVE_REPLICATION Write_rows_log_event(const char *buf, uint event_len, @@ -4581,12 +4581,6 @@ public: #ifdef MYSQL_SERVER Update_rows_log_event(THD*, TABLE*, ulong table_id, - MY_BITMAP const *cols_bi, - MY_BITMAP const *cols_ai, - bool is_transactional); - - Update_rows_log_event(THD*, TABLE*, ulong table_id, - MY_BITMAP const *cols, bool is_transactional); void init(MY_BITMAP const *cols); @@ -4665,8 +4659,7 @@ public: }; #ifdef MYSQL_SERVER - Delete_rows_log_event(THD*, TABLE*, ulong, - MY_BITMAP const *cols, bool is_transactional); + Delete_rows_log_event(THD*, TABLE*, ulong, bool is_transactional); #endif #ifdef HAVE_REPLICATION Delete_rows_log_event(const char *buf, uint event_len, diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 898e7664b87..b4c45bcdde4 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -5967,7 +5967,7 @@ THD::binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id, { /* Create a new RowsEventT... */ Rows_log_event* const - ev= new RowsEventT(this, table, table->s->table_map_id, + ev= new RowsEventT(this, table, table->s->table_map_id, is_transactional); if (unlikely(!ev)) DBUG_RETURN(NULL); @@ -6136,7 +6136,7 @@ int THD::binlog_write_row(TABLE* table, bool is_trans, is_trans= 1; Rows_log_event* const ev= - binlog_prepare_pending_rows_event(table, variables.server_id, cols, colcnt, + binlog_prepare_pending_rows_event(table, variables.server_id, len, is_trans, static_cast<Write_rows_log_event*>(0)); @@ -6185,9 +6185,9 @@ int THD::binlog_update_row(TABLE* table, bool is_trans, #endif Rows_log_event* const ev= - binlog_prepare_pending_rows_event(table, variables.server_id, cols, colcnt, - before_size + after_size, is_trans, - static_cast<Update_rows_log_event*>(0)); + binlog_prepare_pending_rows_event(table, variables.server_id, + before_size + after_size, is_trans, + static_cast<Update_rows_log_event*>(0)); if (unlikely(ev == 0)) return HA_ERR_OUT_OF_MEM; @@ -6221,9 +6221,9 @@ int THD::binlog_delete_row(TABLE* table, bool is_trans, is_trans= 1; Rows_log_event* const ev= - binlog_prepare_pending_rows_event(table, variables.server_id, cols, colcnt, - len, is_trans, - static_cast<Delete_rows_log_event*>(0)); + binlog_prepare_pending_rows_event(table, variables.server_id, + len, is_trans, + static_cast<Delete_rows_log_event*>(0)); if (unlikely(ev == 0)) return HA_ERR_OUT_OF_MEM; |