mariadb/mysql-test/suite/versioning/r/rpl.result
2017-12-04 00:49:44 +03:00

118 lines
1.8 KiB
Text

include/master-slave.inc
[connection master]
connection slave;
connection master;
CREATE TABLE t1 (x int) with system versioning;
insert into t1 values (1);
SELECT * FROM t1;
x
1
delete from t1;
select * from t1;
x
select * from t1 for system_time all;
x
1
connection slave;
select * from t1;
x
select * from t1 for system_time all;
x
1
connection master;
insert into t1 values (2);
connection slave;
select * from t1;
x
2
connection master;
update t1 set x = 3;
connection slave;
select * from t1;
x
3
select * from t1 for system_time all;
x
1
3
2
connection master;
create or replace table t1 (x int primary key);
connection slave;
alter table t1 with system versioning;
connection master;
insert into t1 values (1);
connection slave;
select * from t1;
x
1
select * from t1 for system_time all;
x
1
connection master;
update t1 set x= 2 where x = 1;
connection slave;
select * from t1;
x
2
select * from t1 for system_time all;
x
1
2
connection master;
delete from t1;
connection slave;
select * from t1;
x
select * from t1 for system_time all;
x
1
2
connection master;
create or replace table t1 (x int);
connection slave;
alter table t1 with system versioning;
connection master;
insert into t1 values (1);
update t1 set x= 2 where x = 1;
connection slave;
select * from t1;
x
2
select * from t1 for system_time all;
x
2
1
connection master;
delete from t1;
connection slave;
select * from t1;
x
select * from t1 for system_time all;
x
2
1
connection master;
create or replace table t1 (x int) with system versioning;
create or replace table t2 (x int) with system versioning;
insert into t1 values (1);
insert into t2 values (2);
update t1, t2 set t1.x=11, t2.x=22;
connection slave;
select * from t1;
x
11
select * from t2;
x
22
select * from t1 for system_time all;
x
11
1
select * from t2 for system_time all;
x
22
2
connection master;
drop table t1, t2;
include/rpl_end.inc