diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2018-07-05 21:03:37 +1000 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-03-29 12:51:19 +0100 |
commit | 39d7e5969ba06f78d44e5cbd1ea72f882f3a5e66 (patch) | |
tree | 677cc80d11c05d9016af5095c87adf57667d87ad | |
parent | 8123d799113177aaaa1ffcdfa88c728fa82972ca (diff) | |
download | mariadb-git-39d7e5969ba06f78d44e5cbd1ea72f882f3a5e66.tar.gz |
MDEV-16252: MINIMAL binlog_row_image does not work for versioned tables
* mark columns for binlog before inserting history row
Closes #822
-rw-r--r-- | mysql-test/suite/versioning/r/rpl.result | 13 | ||||
-rw-r--r-- | mysql-test/suite/versioning/t/rpl.test | 17 | ||||
-rw-r--r-- | sql/sql_update.cc | 1 |
3 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/suite/versioning/r/rpl.result b/mysql-test/suite/versioning/r/rpl.result index fd62a65f473..8db963f9ea4 100644 --- a/mysql-test/suite/versioning/r/rpl.result +++ b/mysql-test/suite/versioning/r/rpl.result @@ -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 diff --git a/mysql-test/suite/versioning/t/rpl.test b/mysql-test/suite/versioning/t/rpl.test index e59d41c38a3..2549684da51 100644 --- a/mysql-test/suite/versioning/t/rpl.test +++ b/mysql-test/suite/versioning/t/rpl.test @@ -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 diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 1d7dec31d56..5e5b6644377 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -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]); } |