mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
new subselect tests
LIMIT fixed AVG & STD with subselect fixed join_free fixed to be depended queries compatible sort_default removed from SELECT_LEX
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
#select (select 2);
|
||||
select (select 2);
|
||||
drop table if exists t1,t2,t3,t4;
|
||||
create table t1 (a int);
|
||||
create table t2 (a int, b int);
|
||||
@@ -17,7 +17,13 @@ insert into t3 values (6),(7),(3);
|
||||
select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1);
|
||||
select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)
|
||||
union (select * from t4 order by a limit 2) limit 3;
|
||||
select * from t2 where t2.b=(select a from t3 order by 1 desc limit 1)
|
||||
union (select * from t4 where t4.b=(select max(t2.a)*4 from t2) order by a);
|
||||
select (select a from t3 where a<t2.a*4 order by 1 desc limit 1), a from t2;
|
||||
select (select t3.a from t3 where a<8 order by 1 desc limit 1), a from
|
||||
(select * from t2 where a>1) as tt;
|
||||
select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3) order by 1 desc limit 1);
|
||||
select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3 where t3.a > t1.a) order by 1 desc limit 1);
|
||||
select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from t3 where t3.a < t1.a) order by 1 desc limit 1);
|
||||
select b,(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2) from t4;
|
||||
drop table t1,t2,t3,t4;
|
||||
|
||||
Reference in New Issue
Block a user