summaryrefslogtreecommitdiff
path: root/mysql-test/t/join_nested.test
diff options
context:
space:
mode:
authorunknown <timour@mysql.com>2005-08-12 19:27:54 +0300
committerunknown <timour@mysql.com>2005-08-12 19:27:54 +0300
commit2b53b711d8c36fadf3ce123a678795876fb67be4 (patch)
tree47cfdff5ea22001b614037779ee931abbc209636 /mysql-test/t/join_nested.test
parentc9415c77b5ce586b4134b91a92447fe175c4e7b2 (diff)
parent7517d7e11298da9ce9aaea8e2e42c25a640d5be9 (diff)
downloadmariadb-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/t/join_nested.test')
-rw-r--r--mysql-test/t/join_nested.test61
1 files changed, 22 insertions, 39 deletions
diff --git a/mysql-test/t/join_nested.test b/mysql-test/t/join_nested.test
index 10b2dac5c8b..f6b74237123 100644
--- a/mysql-test/t/join_nested.test
+++ b/mysql-test/t/join_nested.test
@@ -130,15 +130,13 @@ SELECT t8.a,t8.b
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;
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;
@@ -150,8 +148,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
@@ -162,8 +159,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
@@ -186,8 +182,7 @@ SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5
LEFT JOIN
(
- t6,
- t7
+ (t6, t7)
LEFT JOIN
t8
ON t7.b=t8.b AND t6.b < 10
@@ -203,8 +198,7 @@ SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5
LEFT JOIN
(
- t6,
- t7
+ (t6, t7)
LEFT JOIN
t8
ON t7.b=t8.b AND t6.b < 10
@@ -228,8 +222,7 @@ SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5
LEFT JOIN
(
- t6,
- t7
+ (t6, t7)
LEFT JOIN
t8
ON t7.b=t8.b AND t6.b < 10
@@ -252,8 +245,7 @@ SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5
LEFT JOIN
(
- t6,
- t7
+ (t6, t7)
LEFT JOIN
t8
ON t7.b=t8.b AND t6.b < 10
@@ -281,8 +273,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5
LEFT JOIN
(
- t6,
- t7
+ (t6, t7)
LEFT JOIN
t8
ON t7.b=t8.b AND t6.b < 10
@@ -308,8 +299,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5
LEFT JOIN
(
- t6,
- t7
+ (t6, t7)
LEFT JOIN
t8
ON t7.b=t8.b AND t6.b < 10
@@ -336,8 +326,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5
LEFT JOIN
(
- t6,
- t7
+ (t6, t7)
LEFT JOIN
t8
ON t7.b=t8.b AND t6.b < 10
@@ -375,8 +364,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5
LEFT JOIN
(
- t6,
- t7
+ (t6, t7)
LEFT JOIN
t8
ON t7.b=t8.b AND t6.b < 10
@@ -452,7 +440,7 @@ SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
WHERE t1.a <= 2;
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
@@ -460,7 +448,7 @@ SELECT t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
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
@@ -470,13 +458,13 @@ 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;
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;
@@ -494,8 +482,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5
LEFT JOIN
(
- t6,
- t7
+ (t6, t7)
LEFT JOIN
t8
ON t7.b=t8.b AND t6.b < 10
@@ -534,8 +521,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5
LEFT JOIN
(
- t6,
- t7
+ (t6, t7)
LEFT JOIN
t8
ON t7.b=t8.b AND t6.b < 10
@@ -573,8 +559,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5
LEFT JOIN
(
- t6,
- t7
+ (t6, t7)
LEFT JOIN
t8
ON t7.b=t8.b AND t6.b < 10
@@ -613,8 +598,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5
LEFT JOIN
(
- t6,
- t7
+ (t6, t7)
LEFT JOIN
t8
ON t7.b=t8.b AND t6.b < 10
@@ -649,8 +633,7 @@ SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
t5
LEFT JOIN
(
- t6,
- t7
+ (t6, t7)
LEFT JOIN
t8
ON t7.b=t8.b AND t6.b < 10
@@ -695,7 +678,7 @@ SELECT t2.a,t2.b,t3.a1,t3.b
FROM t2 LEFT JOIN t3 ON t2.b=t3.b
WHERE t2.a = 4 OR (t2.a > 4 AND t3.a1 IS 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);