2018-02-21 21:45:59 +01:00
|
|
|
-- source suite/versioning/engines.inc
|
2016-10-18 09:05:49 +00:00
|
|
|
-- source suite/versioning/common.inc
|
|
|
|
|
2018-02-21 21:45:59 +01:00
|
|
|
--replace_result $sys_datatype_expl SYS_DATATYPE
|
|
|
|
eval create table t1(
|
2016-10-18 09:05:49 +00:00
|
|
|
id int unsigned auto_increment primary key,
|
|
|
|
x int unsigned,
|
|
|
|
y int unsigned,
|
2018-02-21 21:45:59 +01:00
|
|
|
sys_start $sys_datatype_expl as row start invisible,
|
|
|
|
sys_end $sys_datatype_expl as row end invisible,
|
2016-10-18 09:05:49 +00:00
|
|
|
period for system_time (sys_start, sys_end))
|
2018-02-21 21:45:59 +01:00
|
|
|
with system versioning;
|
2016-10-18 09:05:49 +00:00
|
|
|
|
2018-02-21 21:45:59 +01:00
|
|
|
eval create table t2(
|
2016-10-18 09:05:49 +00:00
|
|
|
id int unsigned auto_increment primary key,
|
|
|
|
x int unsigned,
|
2018-02-21 21:45:59 +01:00
|
|
|
y int unsigned);
|
2016-10-18 09:05:49 +00:00
|
|
|
|
2018-02-21 21:45:59 +01:00
|
|
|
insert into t1(x, y) values(1, 11);
|
|
|
|
insert into t2(x, y) values(1, 11);
|
|
|
|
insert into t1(x, y) values(2, 12);
|
|
|
|
insert into t2(x, y) values(2, 12);
|
|
|
|
insert into t1(x, y) values(3, 13);
|
|
|
|
insert into t2(x, y) values(3, 13);
|
|
|
|
insert into t1(x, y) values(4, 14);
|
|
|
|
insert into t2(x, y) values(4, 14);
|
|
|
|
insert into t1(x, y) values(5, 15);
|
|
|
|
insert into t2(x, y) values(5, 15);
|
|
|
|
insert into t1(x, y) values(6, 16);
|
|
|
|
insert into t2(x, y) values(6, 16);
|
|
|
|
insert into t1(x, y) values(7, 17);
|
|
|
|
insert into t2(x, y) values(7, 17);
|
|
|
|
insert into t1(x, y) values(8, 18);
|
|
|
|
insert into t2(x, y) values(8, 18);
|
|
|
|
insert into t1(x, y) values(9, 19);
|
|
|
|
insert into t2(x, y) values(9, 19);
|
2016-10-18 09:05:49 +00:00
|
|
|
|
2018-02-21 21:45:59 +01:00
|
|
|
select t1.x = t2.x and t1.y = t2.y as A, t1.x, t1.y, t2.x, t2.y from t1 inner join t2 on t1.id = t2.id;
|
|
|
|
delete from t1 where x = 2;
|
|
|
|
delete from t2 where x = 2;
|
2016-10-18 09:05:49 +00:00
|
|
|
|
2018-02-21 21:45:59 +01:00
|
|
|
select t1.x = t2.x and t1.y = t2.y as A, t1.x, t1.y, t2.x, t2.y from t1 inner join t2 on t1.id = t2.id;
|
|
|
|
delete from t1 where x > 7;
|
|
|
|
delete from t2 where x > 7;
|
2016-10-18 09:05:49 +00:00
|
|
|
|
2018-02-21 21:45:59 +01:00
|
|
|
select t1.x = t2.x and t1.y = t2.y as A, t1.x, t1.y, t2.x, t2.y from t1 inner join t2 on t1.id = t2.id;
|
|
|
|
drop table t1;
|
|
|
|
drop table t2;
|
2016-10-20 09:12:41 +00:00
|
|
|
|
2017-03-15 18:36:54 +03:00
|
|
|
-- source suite/versioning/common_finish.inc
|