diff options
author | unknown <timour@mysql.com> | 2005-08-12 19:27:54 +0300 |
---|---|---|
committer | unknown <timour@mysql.com> | 2005-08-12 19:27:54 +0300 |
commit | 2b53b711d8c36fadf3ce123a678795876fb67be4 (patch) | |
tree | 47cfdff5ea22001b614037779ee931abbc209636 /mysql-test/r/join_nested.result | |
parent | c9415c77b5ce586b4134b91a92447fe175c4e7b2 (diff) | |
parent | 7517d7e11298da9ce9aaea8e2e42c25a640d5be9 (diff) | |
download | mariadb-git-2b53b711d8c36fadf3ce123a678795876fb67be4.tar.gz |
Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into mysql.com:/home/timka/mysql/src/5.0-2486-merge
mysql-test/r/errors.result:
Auto merged
mysql-test/r/fulltext.result:
Auto merged
mysql-test/r/fulltext_order_by.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/join_nested.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/errors.test:
Auto merged
mysql-test/t/fulltext.test:
Auto merged
mysql-test/t/fulltext_order_by.test:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/join_nested.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
sql/item.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
tests/mysql_client_test.c:
Auto merged
sql/sql_insert.cc:
merge WL#2486
sql/sql_show.cc:
merge WL#2486
Diffstat (limited to 'mysql-test/r/join_nested.result')
-rw-r--r-- | mysql-test/r/join_nested.result | 87 |
1 files changed, 32 insertions, 55 deletions
diff --git a/mysql-test/r/join_nested.result b/mysql-test/r/join_nested.result index 1fd7e6f4390..8779c61b686 100644 --- a/mysql-test/r/join_nested.result +++ b/mysql-test/r/join_nested.result @@ -223,8 +223,7 @@ a b 1 2 EXPLAIN EXTENDED SELECT t6.a,t6.b,t7.a,t7.b,t8.a,t8.b -FROM t6, -t7 +FROM (t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10; @@ -235,8 +234,7 @@ id select_type table type possible_keys key key_len ref rows Extra Warnings: Note 1003 select `test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b` from `test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t7`.`b` = `test`.`t8`.`b`) and (`test`.`t6`.`b` < 10))) where 1 SELECT t6.a,t6.b,t7.a,t7.b,t8.a,t8.b -FROM t6, -t7 +FROM (t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10; @@ -260,8 +258,7 @@ SELECT t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b FROM t5 LEFT JOIN ( -t6, -t7 +(t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10 @@ -279,8 +276,7 @@ SELECT t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b FROM t5 LEFT JOIN ( -t6, -t7 +(t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10 @@ -312,8 +308,7 @@ ON t3.a=1 AND t2.b=t4.b, t5 LEFT JOIN ( -t6, -t7 +(t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10 @@ -357,8 +352,7 @@ ON t3.a=1 AND t2.b=t4.b, t5 LEFT JOIN ( -t6, -t7 +(t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10 @@ -397,8 +391,7 @@ ON t3.a=1 AND t2.b=t4.b, t5 LEFT JOIN ( -t6, -t7 +(t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10 @@ -470,8 +463,7 @@ ON t3.a=1 AND t2.b=t4.b, t5 LEFT JOIN ( -t6, -t7 +(t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10 @@ -537,8 +529,7 @@ ON t3.a=1 AND t2.b=t4.b, t5 LEFT JOIN ( -t6, -t7 +(t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10 @@ -575,8 +566,7 @@ ON t3.a=1 AND t2.b=t4.b, t5 LEFT JOIN ( -t6, -t7 +(t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10 @@ -625,8 +615,7 @@ ON t3.a=1 AND t2.b=t4.b, t5 LEFT JOIN ( -t6, -t7 +(t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10 @@ -679,8 +668,7 @@ ON t3.a=1 AND t2.b=t4.b, t5 LEFT JOIN ( -t6, -t7 +(t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10 @@ -825,44 +813,38 @@ a b a b a b a b 1 3 5 3 NULL NULL NULL NULL 2 2 5 3 NULL NULL NULL NULL SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b -FROM t1, t3, t4 +FROM t1, (t3, t4) RIGHT JOIN t2 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 -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 3 3 NULL NULL NULL NULL +2 2 3 3 NULL NULL 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 -2 2 4 2 2 2 NULL NULL -1 3 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 +1 3 5 3 NULL NULL NULL NULL +2 2 5 3 NULL NULL NULL NULL EXPLAIN EXTENDED SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b -FROM t1, t3, t4 +FROM t1, (t3, t4) RIGHT JOIN t2 ON t3.a=1 AND t2.b=t4.b WHERE t1.a <= 2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t3 ALL NULL NULL NULL NULL 2 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 +1 SIMPLE t3 ALL NULL NULL NULL NULL 2 1 SIMPLE t4 ALL NULL NULL NULL NULL 2 Warnings: -Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t1` join `test`.`t3` join `test`.`t2` left join `test`.`t4` on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) where (`test`.`t1`.`a` <= 2) +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t1` join `test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) where (`test`.`t1`.`a` <= 2) CREATE INDEX idx_b ON t2(b); EXPLAIN EXTENDED SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b -FROM t3,t4 +FROM (t3,t4) LEFT JOIN (t1,t2) ON t3.a=1 AND t3.b=t2.b AND t2.b=t4.b; @@ -874,7 +856,7 @@ id select_type table type possible_keys key key_len ref rows Extra Warnings: Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t3` join `test`.`t4` left join (`test`.`t1` join `test`.`t2`) on(((`test`.`t3`.`a` = 1) and (`test`.`t3`.`b` = `test`.`t2`.`b`) and (`test`.`t2`.`b` = `test`.`t4`.`b`))) where 1 SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b -FROM t3,t4 +FROM (t3,t4) LEFT JOIN (t1,t2) ON t3.a=1 AND t3.b=t2.b AND t2.b=t4.b; @@ -900,8 +882,7 @@ ON t3.a=1 AND t2.b=t4.b, t5 LEFT JOIN ( -t6, -t7 +(t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10 @@ -951,8 +932,7 @@ ON t3.a=1 AND t2.b=t4.b, t5 LEFT JOIN ( -t6, -t7 +(t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10 @@ -1001,8 +981,7 @@ ON t3.a=1 AND t2.b=t4.b, t5 LEFT JOIN ( -t6, -t7 +(t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10 @@ -1052,8 +1031,7 @@ ON t3.a=1 AND t2.b=t4.b, t5 LEFT JOIN ( -t6, -t7 +(t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10 @@ -1100,8 +1078,7 @@ ON t3.a=1 AND t2.b=t4.b, t5 LEFT JOIN ( -t6, -t7 +(t6, t7) LEFT JOIN t8 ON t7.b=t8.b AND t6.b < 10 @@ -1176,13 +1153,13 @@ a b a1 b 4 2 1 2 4 2 2 2 5 3 NULL NULL -SELECT t2.a,t2.b,t3.a1,t3.b +SELECT * FROM t2 NATURAL LEFT JOIN t3 WHERE t2.a = 4 OR (t2.a > 4 AND t3.a1 IS NULL); -a b a1 b -4 2 1 2 -4 2 2 2 -5 3 NULL NULL +b a c a1 c1 +2 4 0 1 0 +2 4 0 2 0 +3 5 0 NULL NULL DROP TABLE t0,t1,t2,t3,t4,t5,t6,t7,t8,t9; CREATE TABLE t1 (a int); CREATE TABLE t2 (a int); |