MDEV-16252: MINIMAL binlog_row_image does not work for versioned tables

* mark columns for binlog before inserting history row

Closes #822
This commit is contained in:
Nikita Malyavin 2018-07-05 21:03:37 +10:00 committed by Sergei Golubchik
parent 8123d79911
commit 39d7e5969b
3 changed files with 31 additions and 0 deletions

View File

@ -164,4 +164,17 @@ update t1 set i = 0;
connection slave;
connection master;
drop table t1;
# MDEV-16252: MINIMAL binlog_row_image does not work for versioned tables
set @old_row_image= @@binlog_row_image;
set binlog_row_image= minimal;
create or replace table t1 (pk int, i int, primary key(pk))
with system versioning;
insert into t1 values (1,10),(2,20);
update t1 set i = 0;
connection slave;
connection master;
drop table t1;
set binlog_row_image= @old_row_image;
drop database test;
create database test;
include/rpl_end.inc

View File

@ -133,4 +133,21 @@ sync_slave_with_master;
connection master;
drop table t1;
--echo # MDEV-16252: MINIMAL binlog_row_image does not work for versioned tables
set @old_row_image= @@binlog_row_image;
set binlog_row_image= minimal;
create or replace table t1 (pk int, i int, primary key(pk))
with system versioning;
insert into t1 values (1,10),(2,20);
update t1 set i = 0;
--sync_slave_with_master
--connection master
drop table t1;
set binlog_row_image= @old_row_image;
drop database test;
create database test;
--source include/rpl_end.inc

View File

@ -956,6 +956,7 @@ update_begin:
if (table->versioned(VERS_TIMESTAMP))
{
store_record(table, record[2]);
table->mark_columns_per_binlog_row_image();
error= vers_insert_history_row(table);
restore_record(table, record[2]);
}