1
0
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:
Aleksey Midenkov
2017-12-06 06:14:22 +03:00
parent d04063c5b9
commit 84b718ae70
9 changed files with 145 additions and 75 deletions

View File

@ -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