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)
template <class RowsEventT> Rows_log_event*
THD::binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id,
MY_BITMAP const* cols,
size_t colcnt,
size_t needed,
bool is_transactional,
RowsEventT *hint __attribute__((unused)))
......@@ -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_general_type_code() != general_type_code ||
pending->get_data_size() + needed > opt_binlog_rows_event_max_size ||
pending->get_width() != colcnt ||
!bitmap_cmp(pending->get_cols(), cols))
pending->read_write_bitmaps_cmp(table) == FALSE)
{
/* Create a new RowsEventT... */
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);
if (unlikely(!ev))
DBUG_RETURN(NULL);
......
......@@ -2143,8 +2143,6 @@ public:
*/
template <class RowsEventT> Rows_log_event*
binlog_prepare_pending_rows_event(TABLE* table, uint32 serv_id,
MY_BITMAP const* cols,
size_t colcnt,
size_t needed,
bool is_transactional,
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