1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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.
This commit is contained in:
igor@rurik.mysql.com
2004-06-30 05:54:32 -07:00
parent 29f616205a
commit d70f886f17
7 changed files with 90 additions and 34 deletions

View File

@ -216,10 +216,10 @@ SELECT t6.a,t6.b,t7.a,t7.b
FROM t6,t7;
a b a b
3 2 1 1
6 2 1 1
6 1 1 1
3 2 2 2
6 2 1 1
6 2 2 2
6 1 1 1
6 1 2 2
SELECT t8.a,t8.b
FROM t8;
@ -234,8 +234,8 @@ LEFT JOIN
t8
ON t7.b=t8.b AND t6.b < 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t6 ALL NULL NULL NULL NULL 3
1 SIMPLE t7 ALL NULL NULL NULL NULL 2
1 SIMPLE t6 ALL NULL NULL NULL NULL 3
1 SIMPLE t8 ALL NULL NULL NULL NULL 2
SELECT t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
FROM t6,
@ -245,12 +245,12 @@ t8
ON t7.b=t8.b AND t6.b < 10;
a b a b a b
3 2 1 1 NULL NULL
6 2 1 1 NULL NULL
6 1 1 1 NULL NULL
3 2 2 2 0 2
3 2 2 2 1 2
6 2 1 1 NULL NULL
6 2 2 2 0 2
6 2 2 2 1 2
6 1 1 1 NULL NULL
6 1 2 2 0 2
6 1 2 2 1 2
SELECT t5.a,t5.b
@ -831,18 +831,18 @@ ON t3.a=1 AND t2.b=t4.b
WHERE t1.a <= 2;
a b a b a b a b
1 3 3 3 1 2 NULL NULL
2 2 3 3 1 2 NULL NULL
1 3 3 3 2 2 NULL NULL
2 2 3 3 1 2 NULL NULL
2 2 3 3 2 2 NULL NULL
1 3 4 2 1 2 3 2
1 3 4 2 1 2 4 2
1 3 4 2 2 2 NULL NULL
2 2 4 2 1 2 3 2
2 2 4 2 1 2 4 2
1 3 4 2 2 2 NULL NULL
2 2 4 2 2 2 NULL NULL
1 3 5 3 1 2 NULL NULL
2 2 5 3 1 2 NULL NULL
1 3 5 3 2 2 NULL NULL
2 2 5 3 1 2 NULL NULL
2 2 5 3 2 2 NULL NULL
CREATE INDEX idx_b ON t2(b);
EXPLAIN