mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
subselect2.result, select.result:
Post-merge fixes for nested joins. The join_tab_cmp function in sql_select has been changed. join_nested.result: Post-merge fixes for nested joins. The join_tab_cmp function in sql_select has been changed sql_select.cc: Post-merge fixes for nested joins. Avoided re-execution of eliminate_not_funcs and simplify_joins in optimize_cond. Changed the join_tab_cmp function to take into account the dependent relation. sql_lex.cc, sql_lex.h: Added the first_cond_optimization flag to st_select_lex to avoid re-execution of some optimizations in optimize_cond. sql_base.cc: Post-merge fixes for nested joins. Fixed problems with a proper column list substituted for '*' in queries with natural joins. sql/sql_base.cc: Post-merge fixes for nested joins. Fixed problems with a proper column list substituted for '*' in queries with natural joins. sql/sql_lex.h: Added the first_cond_optimization flag to st_select_lex to avoid re-execution of some optimizations in optimize_cond. sql/sql_lex.cc: Added the first_cond_optimization flag to st_select_lex to avoid re-execution of some optimizations in optimize_cond. sql/sql_select.cc: Post-merge fixes for nested joins. Avoided re-execution of eliminate_not_funcs and simplify_joins in optimize_cond. Changed the join_tab_cmp function to take into account the dependent relation. mysql-test/r/join_nested.result: Post-merge fixes for nested joins. The join_tab_cmp function in sql_select has been changed mysql-test/r/select.result: Post-merge fixes for nested joins. The join_tab_cmp function in sql_select has been changed. mysql-test/r/subselect2.result: Post-merge fixes for nested joins. The join_tab_cmp function in sql_select has been changed.
This commit is contained in:
@@ -2253,10 +2253,10 @@ a a
|
||||
2 2
|
||||
3 3
|
||||
select * from (t1 as t2 left join t1 as t3 using (a)) natural join t1;
|
||||
a a a
|
||||
1 1 1
|
||||
2 2 2
|
||||
3 3 3
|
||||
a a
|
||||
1 1
|
||||
2 2
|
||||
3 3
|
||||
drop table t1;
|
||||
CREATE TABLE t1 ( aa char(2), id int(11) NOT NULL auto_increment, t2_id int(11) NOT NULL default '0', PRIMARY KEY (id), KEY replace_id (t2_id)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ("1",8264,2506),("2",8299,2517),("3",8301,2518),("4",8302,2519),("5",8303,2520),("6",8304,2521),("7",8305,2522);
|
||||
@@ -2283,8 +2283,8 @@ left join t4 on id3 = id4 where id2 = 1 or id4 = 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t3 system NULL NULL NULL NULL 0 const row not found
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE t4 ALL id4 NULL NULL NULL 1
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 1
|
||||
1 SIMPLE t4 ALL id4 NULL NULL NULL 1 Using where
|
||||
select * from t1 left join t2 on id1 = id2 left join t3 on id1 = id3
|
||||
left join t4 on id3 = id4 where id2 = 1 or id4 = 1;
|
||||
id1 id2 id3 id4 id44
|
||||
|
Reference in New Issue
Block a user