mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
SQL: system_time propagation from derived table [fixes #228]
This commit is contained in:
@ -139,10 +139,22 @@ ERROR HY000: Derived table is prohibited: system fields from multiple tables `t1
|
||||
select * from (select * from t1 for system_time as of timestamp @t0, t2) as s0;
|
||||
x y
|
||||
1 10
|
||||
select * from (select *, t1.sys_trx_end from t2, t1 for system_time as of timestamp @t0) as s0;
|
||||
with s1 as (select * from t1 for system_time as of timestamp @t0, t2) select * from s1;
|
||||
x y
|
||||
1 10
|
||||
select * from (select *, t1.sys_trx_end from t2, t1 for system_time as of timestamp @t0) as s2;
|
||||
y x
|
||||
10 1
|
||||
select * from (select *, t1.sys_trx_start from t2 for system_time as of now, t1) as s0 query for system_time as of timestamp @t0;
|
||||
with s3 as (select *, t1.sys_trx_end from t2, t1 for system_time as of timestamp @t0) select * from s3;
|
||||
y x
|
||||
10 1
|
||||
select * from (select *, t1.sys_trx_start from t2 for system_time as of now, t1) as s4 query for system_time as of timestamp @t0;
|
||||
y x
|
||||
10 1
|
||||
with s5 as (select *, t1.sys_trx_start from t2 for system_time as of now, t1) select * from s5 for system_time as of timestamp @t0;
|
||||
y x
|
||||
10 1
|
||||
with s6 as (select *, t1.sys_trx_start from t2 for system_time as of now, t1) select * from s6 query for system_time as of timestamp @t0;
|
||||
y x
|
||||
10 1
|
||||
set @q= concat("create view vt1 as select * from t1 for system_time as of timestamp '", @t0, "'");
|
||||
|
Reference in New Issue
Block a user