mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Online alter: set read_set early, before row reads
also * don't modify write_set * backup/restore rpl_write_set
This commit is contained in:
@@ -7272,14 +7272,17 @@ static int binlog_log_row_online_alter(TABLE* table,
|
||||
trans_register_ha(thd, true, binlog_hton, 0);
|
||||
}
|
||||
|
||||
// We need to log all columns for the case if alter table changes primary key.
|
||||
table->use_all_columns();
|
||||
bitmap_set_all(table->rpl_write_set);
|
||||
// We need to log all columns for the case if alter table changes primary key
|
||||
DBUG_ASSERT(!before_record || bitmap_is_set_all(table->read_set));
|
||||
MY_BITMAP *old_rpl_write_set= table->rpl_write_set;
|
||||
table->rpl_write_set= &table->s->all_set;
|
||||
|
||||
int error= (*log_func)(thd, table, table->s->online_alter_binlog,
|
||||
table->online_alter_cache, has_trans,
|
||||
before_record, after_record);
|
||||
|
||||
table->rpl_write_set= old_rpl_write_set;
|
||||
|
||||
return unlikely(error) ? HA_ERR_RBR_LOGGING_FAILED : 0;
|
||||
}
|
||||
#endif // HAVE_REPLICATION
|
||||
|
Reference in New Issue
Block a user