mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Parser: moved 'for system_time' before alias
Due to standard (see 7.6 <table reference>).
This commit is contained in:
@ -91,12 +91,14 @@ ancestors
|
||||
as
|
||||
(
|
||||
select e.emp_id, e.name, e.mgr
|
||||
from emp as e for system_time as of timestamp @ts
|
||||
from emp as e
|
||||
where name = 'bill'
|
||||
union
|
||||
system_time as of timestamp @ts
|
||||
union
|
||||
select ee.emp_id, ee.name, ee.mgr
|
||||
from emp as ee for system_time as of timestamp @ts, ancestors as a for system_time as of timestamp @ts
|
||||
from emp as ee, ancestors as a
|
||||
where ee.mgr = a.emp_id
|
||||
system_time as of timestamp @ts
|
||||
)
|
||||
select * from ancestors;
|
||||
emp_id name mgr
|
||||
@ -109,12 +111,14 @@ ancestors
|
||||
as
|
||||
(
|
||||
select e.emp_id, e.name, e.mgr
|
||||
from emp as e for system_time as of timestamp @ts
|
||||
from emp as e
|
||||
where name = 'bill'
|
||||
system_time as of timestamp @ts
|
||||
union
|
||||
select ee.emp_id, ee.name, ee.mgr
|
||||
from emp as ee for system_time as of timestamp @ts, ancestors as a for system_time as of timestamp @ts
|
||||
from emp as ee, ancestors as a
|
||||
where ee.mgr = a.emp_id
|
||||
system_time as of timestamp @ts
|
||||
)
|
||||
select * from ancestors";
|
||||
prepare stmt from @tmp;
|
||||
|
Reference in New Issue
Block a user