summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@macbook.gmz>2006-07-26 17:31:34 +0300
committerunknown <gkodinov/kgeorge@macbook.gmz>2006-07-26 17:31:34 +0300
commit048fbb845d6d78d51614d5394b8b240f0bf7c6fb (patch)
tree997e7d339390927d38808fc177ef71314f5e1322 /mysql-test/r
parent380911708448ff8e90b55f219429d0fda13ed217 (diff)
parent5ca1ee5eea4d08491772388f39a664e21df32b9b (diff)
downloadmariadb-git-048fbb845d6d78d51614d5394b8b240f0bf7c6fb.tar.gz
Merge macbook.gmz:/Users/kgeorge/mysql/work/B21019-4.1-opt
into macbook.gmz:/Users/kgeorge/mysql/work/B21019-5.0-opt mysql-test/t/select.test: Auto merged sql/sql_select.cc: Auto merged mysql-test/r/select.result: SCCS merged
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/select.result26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index c2218585f7c..69228d2ff44 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -3125,6 +3125,32 @@ select count(*)
from t1 inner join (t2 right join t3 on t2.id = t3.b_id) on t1.id = t3.a_id;
count(*)
6
+CREATE TABLE t1 (a int, b int);
+INSERT INTO t1 VALUES (1,1), (2,1), (4,10);
+CREATE TABLE t2 (a int PRIMARY KEY, b int, KEY b (b));
+INSERT INTO t2 VALUES (1,NULL), (2,10);
+ALTER TABLE t1 ENABLE KEYS;
+EXPLAIN SELECT STRAIGHT_JOIN SQL_NO_CACHE COUNT(*) FROM t2, t1 WHERE t1.b = t2.b OR t2.b IS NULL;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 index b b 5 NULL 2 Using index
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
+SELECT STRAIGHT_JOIN SQL_NO_CACHE * FROM t2, t1 WHERE t1.b = t2.b OR t2.b IS NULL;
+a b a b
+1 NULL 1 1
+1 NULL 2 1
+1 NULL 4 10
+2 10 4 10
+EXPLAIN SELECT STRAIGHT_JOIN SQL_NO_CACHE COUNT(*) FROM t2, t1 WHERE t1.b = t2.b OR t2.b IS NULL;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 index b b 5 NULL 2 Using index
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
+SELECT STRAIGHT_JOIN SQL_NO_CACHE * FROM t2, t1 WHERE t1.b = t2.b OR t2.b IS NULL;
+a b a b
+1 NULL 1 1
+1 NULL 2 1
+1 NULL 4 10
+2 10 4 10
+DROP TABLE IF EXISTS t1,t2;
drop table t1,t2,t3;
create table t1 (a int);
create table t2 (b int);