1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Versioning tests stability improvement

Fix SELECT resultset order.
This commit is contained in:
Aleksey Midenkov
2018-12-19 14:05:40 +03:00
committed by Sergei Golubchik
parent 8df04fb894
commit f6ee132491
5 changed files with 110 additions and 107 deletions

View File

@@ -4,38 +4,38 @@ connection slave;
connection master;
CREATE TABLE t1 (x int) with system versioning;
insert into t1 values (1);
SELECT * FROM t1;
select * from t1 order by x;
x
1
delete from t1;
select * from t1;
select * from t1 order by x;
x
select * from t1 for system_time all;
select * from t1 for system_time all order by row_end, x;
x
1
connection slave;
select * from t1;
select * from t1 order by x;
x
select * from t1 for system_time all;
select * from t1 for system_time all order by row_end, x;
x
1
connection master;
insert into t1 values (2);
connection slave;
select * from t1;
select * from t1 order by x;
x
2
connection master;
update t1 set x = 3;
connection slave;
select * from t1;
select * from t1 order by x;
x
3
select * from t1 for system_time all;
select * from t1 for system_time all order by row_end, x;
x
1
3
2
3
# check unversioned -> versioned replication
connection master;
create or replace table t1 (x int primary key);
@@ -44,28 +44,28 @@ alter table t1 with system versioning;
connection master;
insert into t1 values (1);
connection slave;
select * from t1;
select * from t1 order by x;
x
1
select * from t1 for system_time all;
select * from t1 for system_time all order by row_end, x;
x
1
connection master;
update t1 set x= 2 where x = 1;
connection slave;
select * from t1;
select * from t1 order by x;
x
2
select * from t1 for system_time all;
select * from t1 for system_time all order by row_end, x;
x
1
2
connection master;
delete from t1;
connection slave;
select * from t1;
select * from t1 order by x;
x
select * from t1 for system_time all;
select * from t1 for system_time all order by row_end, x;
x
1
2
@@ -78,22 +78,22 @@ connection master;
insert into t1 values (1);
update t1 set x= 2 where x = 1;
connection slave;
select * from t1;
select * from t1 order by x;
x
2
select * from t1 for system_time all;
select * from t1 for system_time all order by row_end, x;
x
2
1
2
connection master;
delete from t1;
connection slave;
select * from t1;
select * from t1 order by x;
x
select * from t1 for system_time all;
select * from t1 for system_time all order by row_end, x;
x
2
1
2
# multi-update
connection master;
create or replace table t1 (x int) with system versioning;
@@ -102,20 +102,20 @@ 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;
select * from t1 order by x;
x
11
select * from t2;
select * from t2 order by x;
x
22
select * from t1 for system_time all;
select * from t1 for system_time all order by row_end, x;
x
11
1
select * from t2 for system_time all;
11
select * from t2 for system_time all order by row_end, x;
x
22
2
22
# MDEV-14767 system_versioning_alter_history breaks ALTER replication
## Case 1: KEEP on the master, ALTER will work on the slave
connection master;