diff options
author | unknown <igor@rurik.mysql.com> | 2004-08-10 17:32:15 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2004-08-10 17:32:15 -0700 |
commit | a2a9481891519147ae815dad71d981d7a53031a1 (patch) | |
tree | 3c6c6ba61742eaeafef8ae2af3787d49187bf552 /mysql-test/r/join_nested.result | |
parent | 578b0f57de5946a5909dcb1572864fe454ed677e (diff) | |
download | mariadb-git-a2a9481891519147ae815dad71d981d7a53031a1.tar.gz |
join.result, select.result:
Fixed bug #4976.
join_nested.result, join_nested.test:
Added a test case for bug #4976.
sql_select.cc:
Applied conversion from an outer join to an inner join
when the on expression does not depend on the outer table.
It fixed bug #4976.
sql/sql_select.cc:
Applied conversion from an outer join to an inner join
when the on expression does not depend on the outer table.
It fixed bug #4976.
mysql-test/t/join_nested.test:
Added a case test for bug #4976.
mysql-test/r/join_nested.result:
Added a case test for bug #4976.
mysql-test/r/select.result:
Fixed bug #4976.
mysql-test/r/join.result:
Fixed bug #4976.
Diffstat (limited to 'mysql-test/r/join_nested.result')
-rw-r--r-- | mysql-test/r/join_nested.result | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/r/join_nested.result b/mysql-test/r/join_nested.result index ae15ac446e5..81ca53cb727 100644 --- a/mysql-test/r/join_nested.result +++ b/mysql-test/r/join_nested.result @@ -1208,3 +1208,22 @@ SELECT * FROM t1 LEFT JOIN t2 LEFT JOIN t3 ON t2.a=t3.a ON t1.a=t3.a; a a a 1 NULL NULL DROP TABLE t1,t2,t3; +CREATE TABLE t1(a int, key (a)); +CREATE TABLE t2(b int, key (b)); +CREATE TABLE t3(c int, key (c)); +INSERT INTO t1 VALUES (NULL), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), +(10), (11), (12), (13), (14), (15), (16), (17), (18), (19); +INSERT INTO t2 VALUES (NULL), (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), +(10), (11), (12), (13), (14), (15), (16), (17), (18), (19); +INSERT INTO t3 VALUES (0), (1), (2), (3), (4), (5); +EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON c < 3 and b = c; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 index c c 5 NULL 6 Using where; Using index +1 SIMPLE t2 ref b b 5 test.t3.c 2 Using where; Using index +1 SIMPLE t1 index NULL a 5 NULL 21 Using index +EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range b b 5 NULL 3 Using where; Using index +1 SIMPLE t3 ref c c 5 test.t2.b 2 Using where; Using index +1 SIMPLE t1 index NULL a 5 NULL 21 Using index +DROP TABLE t1,t2,t3; |