select t1.x as IJ1_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 inner join t2 on t1.x = t2.x;
IJ1_x1 y1 x2 y2
1 1 1 2
1 2 1 2
1 3 1 2
select t1.x as LJ1_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 left join t2 on t1.x = t2.x;
LJ1_x1 y1 x2 y2
1 1 1 2
1 2 1 2
1 3 1 2
4 4 NULL NULL
5 5 NULL NULL
select t1.x as RJ1_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 right join t2 on t1.x = t2.x;
RJ1_x1 y1 x2 y2
1 1 1 2
1 2 1 2
1 3 1 2
NULL NULL 2 1
NULL NULL 3 1
delete from t1;
delete from t2;
select IJ2_x1,y1,x2,y2 from (select t1.x as IJ2_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 inner join t2 on t1.x = t2.x)
for system_time as of timestamp @t0 as t;
IJ2_x1 y1 x2 y2
1 1 1 2
1 2 1 2
1 3 1 2
select LJ2_x1,y1,x2,y2 from (select t1.x as LJ2_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 left join t2 on t1.x = t2.x)
for system_time as of timestamp @t0 as t;
LJ2_x1 y1 x2 y2
1 1 1 2
1 2 1 2
1 3 1 2
4 4 NULL NULL
5 5 NULL NULL
select RJ2_x1,y1,x2,y2 from (select t1.x as RJ2_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 right join t2 on t1.x = t2.x)
for system_time as of timestamp @t0 as t;
RJ2_x1 y1 x2 y2
1 1 1 2
1 2 1 2
1 3 1 2
NULL NULL 2 1
NULL NULL 3 1
drop table t1;
drop table t2;
# MDEV-14686 Server crashes in Item_field::used_tables on 2nd call of SP [#422]
create or replace table t1 (called int, bad int) with system versioning;
create or replace procedure bad() select * from t1 where bad in (select called from t1);
...
...
@@ -365,5 +336,3 @@ select * from (t1 for system_time all join t2 for system_time all) for system_ti
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1