mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
added depended subselect processing
mysql-test/r/subselect.result: depended subselect test mysql-test/t/subselect.test: depended subselect test sql/item.cc: resolving field names in depended queries sql/item_subselect.cc: move optimization just before execution, because we can't optimize inner depended subselect if have not optimized outer subselect sql/item_subselect.h: move optimization just before execution sql/sql_lex.h: some inline methods to hide internal SELECT_LEX structures sql/sql_select.cc: fixed error
This commit is contained in:
@ -6,6 +6,14 @@ create table t4 (a int, b int);
|
||||
insert into t1 values (2);
|
||||
insert into t2 values (1,7),(2,7);
|
||||
insert into t4 values (4,8),(3,8),(5,9);
|
||||
select (select a from t1 where t1.a=t2.a), a from t2;
|
||||
(select a from t1 where t1.a=t2.a) a
|
||||
NULL 1
|
||||
2 2
|
||||
select (select a from t1 where t1.a=t2.b), a from t2;
|
||||
(select a from t1 where t1.a=t2.b) a
|
||||
NULL 1
|
||||
NULL 2
|
||||
select (select a from t1), a from t2;
|
||||
(select a from t1) a
|
||||
2 1
|
||||
|
@ -8,6 +8,8 @@ create table t4 (a int, b int);
|
||||
insert into t1 values (2);
|
||||
insert into t2 values (1,7),(2,7);
|
||||
insert into t4 values (4,8),(3,8),(5,9);
|
||||
select (select a from t1 where t1.a=t2.a), a from t2;
|
||||
select (select a from t1 where t1.a=t2.b), a from t2;
|
||||
select (select a from t1), a from t2;
|
||||
select (select a from t3), a from t2;
|
||||
select * from t2 where t2.a=(select a from t1);
|
||||
|
Reference in New Issue
Block a user