1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00
Files
mariadb/mysql-test/suite/rpl/t/rpl_extra_col_slave_minimal.test
Sergei Golubchik 9545eb969e Fix recalculation of vcols in binlog_row_image=minimal
unpack_row() must calculate all stored and indexed vcols
(in fill_extra_persistent_columns()).

Also Update and Delete row events must mark in read_set
all columns needed for calculating all stored and indexed vcols.

If it's done properly in do_apply_event(), it no longer needs
to be repeated per row.
2023-08-15 10:16:11 +02:00

45 lines
1.1 KiB
Plaintext

--source include/have_binlog_format_row.inc
--source include/have_innodb.inc
--source include/master-slave.inc
set binlog_row_image=minimal;
connection slave;
stop slave;
set global binlog_row_image=minimal;
--source include/reset_slave.inc
create table t1 (
a int key, b blob, c char(5),
d char(10) as (concat(trim(c), '-U')) unique,
e char(10) as (concat('S', b)) stored) engine=innodb;
connection master;
create table t1 (a int primary key, b blob, c char(5)) engine=innodb;
reset master;
connection slave;
start slave;
connection master;
set timestamp=unix_timestamp('2010-10-10 10:10:10');
insert t1 values (1,'.','Kyle'),(2,'?','JOE'),(3,'!','QA'), (4, '$', '4TH');
update t1 set c='UPD' where a=3;
update t1 set b='#' where a=2;
delete from t1 where a=4;
--sorted_result
select * from t1;
--sorted_result
sync_slave_with_master;
--sorted_result
select * from t1;
select d from t1; # no --sorted_result here, this must be KEYREAD, so must be sorted
select * from t1 where d='JOE-U';
connection master;
drop table t1;
sync_slave_with_master;
set global binlog_row_image=full;
--source include/rpl_end.inc