Commit 724d5ae5 authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru

[MDEV-6877] Update binlog_prepare_pending_rows_events to use comparison function

When deciding which binlog events are pending, make use of the bitmap
compare function instead.
parent a7d181a0
...@@ -5921,8 +5921,6 @@ int THD::decide_logging_format(TABLE_LIST *tables) ...@@ -5921,8 +5921,6 @@ int THD::decide_logging_format(TABLE_LIST *tables)
template <class RowsEventT> Rows_log_event* template <class RowsEventT> Rows_log_event*
THD::binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id, THD::binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id,
MY_BITMAP const* cols,
size_t colcnt,
size_t needed, size_t needed,
bool is_transactional, bool is_transactional,
RowsEventT *hint __attribute__((unused))) RowsEventT *hint __attribute__((unused)))
...@@ -5965,12 +5963,11 @@ THD::binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id, ...@@ -5965,12 +5963,11 @@ THD::binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id,
pending->get_table_id() != table->s->table_map_id || pending->get_table_id() != table->s->table_map_id ||
pending->get_general_type_code() != general_type_code || pending->get_general_type_code() != general_type_code ||
pending->get_data_size() + needed > opt_binlog_rows_event_max_size || pending->get_data_size() + needed > opt_binlog_rows_event_max_size ||
pending->get_width() != colcnt || pending->read_write_bitmaps_cmp(table) == FALSE)
!bitmap_cmp(pending->get_cols(), cols))
{ {
/* Create a new RowsEventT... */ /* Create a new RowsEventT... */
Rows_log_event* const Rows_log_event* const
ev= new RowsEventT(this, table, table->s->table_map_id, cols, ev= new RowsEventT(this, table, table->s->table_map_id,
is_transactional); is_transactional);
if (unlikely(!ev)) if (unlikely(!ev))
DBUG_RETURN(NULL); DBUG_RETURN(NULL);
......
...@@ -2143,8 +2143,6 @@ public: ...@@ -2143,8 +2143,6 @@ public:
*/ */
template <class RowsEventT> Rows_log_event* template <class RowsEventT> Rows_log_event*
binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id, binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id,
MY_BITMAP const* cols,
size_t colcnt,
size_t needed, size_t needed,
bool is_transactional, bool is_transactional,
RowsEventT* hint); RowsEventT* hint);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment