mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
SQL: derived SYSTEM_TIME clash detection [closes #371]
This commit is contained in:
@ -49,7 +49,23 @@ as
|
||||
ancestors as a
|
||||
where e.mgr = a.emp_id
|
||||
)
|
||||
select * from ancestors for system_time as of current_timestamp;
|
||||
select * from ancestors;
|
||||
|
||||
with recursive
|
||||
ancestors
|
||||
as
|
||||
(
|
||||
select e.emp_id, e.name, e.mgr, e.salary
|
||||
from emp as e
|
||||
where name = 'bill'
|
||||
union
|
||||
select e.emp_id, e.name, e.mgr, e.salary
|
||||
from emp as e,
|
||||
ancestors as a
|
||||
where e.mgr = a.emp_id
|
||||
)
|
||||
select * from ancestors
|
||||
for system_time as of timestamp @ts_1;
|
||||
|
||||
/* Expected 3 rows */
|
||||
with recursive
|
||||
|
Reference in New Issue
Block a user