Commit 181d9d28 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-13180 Unused left join causes server crash

already fixed by be55bbc2
just add a test case
parent 05b678bc
......@@ -2545,6 +2545,14 @@ select
from t4;
ERROR 42S22: Reference 'field7' not supported (reference to group function)
drop table t1, t2, t3, t4;
create table t1 (i1 int);
insert into t1 values (1);
create table t2 (i int);
insert into t2 values (2);
select 1 from t1 left join t2 b on b.i = (select max(b.i) from t2);
1
1
drop table t1, t2;
create table t1 (c1 int, c2 int);
create table t2 (c1 int, c2 int);
select t1.c1 as c1, t2.c2 as c1 from t1, t2 where t1.c1 < 20 and t2.c2 > 5 group by t1.c1, t2.c2 having t1.c1 < 3;
......
......@@ -1722,6 +1722,17 @@ select
from t4;
drop table t1, t2, t3, t4;
#
# MDEV-13180 Unused left join causes server crash
#
create table t1 (i1 int);
insert into t1 values (1);
create table t2 (i int);
insert into t2 values (2);
select 1 from t1 left join t2 b on b.i = (select max(b.i) from t2);
drop table t1, t2;
#
# MDEV-12489 The select stmt may fail due to "having clause is ambiguous" unexpected
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment