CURRENT_TEST: versioning.select
mysqltest: At line 325: query 'execute stmt' failed: <Unknown> (2013): Lost connection to server during query

The result from queries just before the failure was:
< snip >
### Issue #365, bug 5 (dangling AND)
create or replace table t1 (a int);
create or replace table t2 (b int) with system versioning;
select * from t1
where exists (select 1 from t2 where t2.b = t1.a and t2.b = t1.a);
a
### Issue #365, bug 9 (not a derived subquery)
create or replace table t1 (x int) with system versioning;
select t1.x in (select x from t1) a from t1, (select x from t1) b;
a
### Issue #365, bug 10 (WHERE cond freed prematurely for PS)
create or replace table t1 (x int) with system versioning;
insert into t1 values (1);
create or replace view v1 as select x from t1 where x = 1;
prepare stmt from "
select x from t1 where x in (select x from v1);";
execute stmt;
x
1
execute stmt;

More results from queries before failure can be found in /dev/shm/var/4/log/select.log
CURRENT_TEST: versioning.select
mysqltest: At line 325: query 'execute stmt' failed: <Unknown> (2013): Lost connection to server during query

The result from queries just before the failure was:
< snip >
### Issue #365, bug 5 (dangling AND)
create or replace table t1 (a int);
create or replace table t2 (b int) with system versioning;
select * from t1
where exists (select 1 from t2 where t2.b = t1.a and t2.b = t1.a);
a
### Issue #365, bug 9 (not a derived subquery)
create or replace table t1 (x int) with system versioning;
select t1.x in (select x from t1) a from t1, (select x from t1) b;
a
### Issue #365, bug 10 (WHERE cond freed prematurely for PS)
create or replace table t1 (x int) with system versioning;
insert into t1 values (1);
create or replace view v1 as select x from t1 where x = 1;
prepare stmt from "
select x from t1 where x in (select x from v1);";
execute stmt;
x
1
execute stmt;

More results from queries before failure can be found in /dev/shm/var/4/log/select.log
CURRENT_TEST: versioning.select
mysqltest: At line 60: query 'select trt_commit_ts(@x1) into @t1' failed: <Unknown> (2013): Lost connection to server during query

The result from queries just before the failure was:
< snip >
sys_trx_start SYS_DATATYPE as row start invisible,
sys_trx_end SYS_DATATYPE as row end invisible,
period for system_time (sys_trx_start, sys_trx_end)
) with system versioning;
insert into t1 (x, y) values
(0, 100),
(1, 101),
(2, 102),
(3, 103),
(4, 104),
(5, 105),
(6, 106),
(7, 107),
(8, 108),
(9, 109);
set @t0= now(6);
delete from t1 where x = 3;
delete from t1 where x > 7;
insert into t1(x, y) values(3, 33);
select sys_trx_start from t1 where x = 3 and y = 33 into @t1;

More results from queries before failure can be found in /dev/shm/var/4/log/select.log
CURRENT_TEST: versioning.select
mysqltest: At line 60: query 'select trt_commit_ts(@x1) into @t1' failed: <Unknown> (2013): Lost connection to server during query

The result from queries just before the failure was:
< snip >
sys_trx_start SYS_DATATYPE as row start invisible,
sys_trx_end SYS_DATATYPE as row end invisible,
period for system_time (sys_trx_start, sys_trx_end)
) with system versioning;
insert into t1 (x, y) values
(0, 100),
(1, 101),
(2, 102),
(3, 103),
(4, 104),
(5, 105),
(6, 106),
(7, 107),
(8, 108),
(9, 109);
set @t0= now(6);
delete from t1 where x = 3;
delete from t1 where x > 7;
insert into t1(x, y) values(3, 33);
select sys_trx_start from t1 where x = 3 and y = 33 into @t1;

More results from queries before failure can be found in /dev/shm/var/4/log/select.log
CURRENT_TEST: versioning.select2
mysqltest: At line 100: query 'call bad' failed: <Unknown> (2013): Lost connection to server during query

The result from queries just before the failure was:
< snip >
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);
called	bad

More results from queries before failure can be found in /dev/shm/var/4/log/select2.log
