summaryrefslogtreecommitdiff
path: root/mysql-test/r/join_nested.result
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-06-15 05:56:19 -0700
committerunknown <igor@rurik.mysql.com>2005-06-15 05:56:19 -0700
commitad57284c6925fe19c182e5b43562e131e1297d7b (patch)
tree620c44e385924a55af053c4edb01c7f0ba74eb36 /mysql-test/r/join_nested.result
parent67c204c46b637a9c7b1323a2fcd443d6476ec5de (diff)
downloadmariadb-git-ad57284c6925fe19c182e5b43562e131e1297d7b.tar.gz
join_nested.result, join_nested.test:
Added a teast case for bug #11284. sql_select.cc: Fixed bug #11284. Optimization with empty inner table currently cannot be used in the case of nested outer join. sql/sql_select.cc: Fixed bug #11284. Optimization with empty inner table currently cannot be used in the case of nested outer join. mysql-test/t/join_nested.test: Added a teast case for bug #11284.
Diffstat (limited to 'mysql-test/r/join_nested.result')
-rw-r--r--mysql-test/r/join_nested.result22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/join_nested.result b/mysql-test/r/join_nested.result
index bce086b00d2..27edac1b30b 100644
--- a/mysql-test/r/join_nested.result
+++ b/mysql-test/r/join_nested.result
@@ -1321,3 +1321,25 @@ NULL NULL NULL
18 NULL NULL
19 NULL NULL
DROP TABLE t1,t2,t3;
+CREATE TABLE t1 (c11 int);
+CREATE TABLE t2 (c21 int);
+CREATE TABLE t3 (c31 int);
+INSERT INTO t1 VALUES (4), (5);
+SELECT * FROM t1 LEFT JOIN t2 ON c11=c21;
+c11 c21
+4 NULL
+5 NULL
+EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON c11=c21;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 system NULL NULL NULL NULL 0 const row not found
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2
+SELECT * FROM t1 LEFT JOIN (t2 LEFT JOIN t3 ON c21=c31) ON c11=c21;
+c11 c21 c31
+4 NULL NULL
+5 NULL NULL
+EXPLAIN SELECT * FROM t1 LEFT JOIN (t2 LEFT JOIN t3 ON c21=c31) ON c11=c21;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2
+1 SIMPLE t2 ALL NULL NULL NULL NULL 0
+1 SIMPLE t3 ALL NULL NULL NULL NULL 0
+DROP TABLE t1,t2,t3;