1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-11 05:52:26 +03:00
Files
mariadb/mysql-test/suite/rpl/r/rpl_extra_col_slave_minimal.result
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

47 lines
1.0 KiB
Plaintext

include/master-slave.inc
[connection master]
set binlog_row_image=minimal;
connection slave;
stop slave;
set global binlog_row_image=minimal;
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;
select * from t1;
a b c
1 . Kyle
2 # JOE
3 ! UPD
connection slave;
select * from t1;
a b c d e
1 . Kyle Kyle-U S.
2 # JOE JOE-U S#
3 ! UPD UPD-U S!
select d from t1;
d
JOE-U
Kyle-U
UPD-U
select * from t1 where d='JOE-U';
a b c d e
2 # JOE JOE-U S#
connection master;
drop table t1;
connection slave;
set global binlog_row_image=full;
include/rpl_end.inc