diff options
author | unknown <igor@olga.mysql.com> | 2007-05-12 10:54:23 -0700 |
---|---|---|
committer | unknown <igor@olga.mysql.com> | 2007-05-12 10:54:23 -0700 |
commit | 6fa4fdd29ce40375f9b79fd22a0c703fa8b0fc0f (patch) | |
tree | dae2b20962e2b9f5326b2d11adc18ffff0fb7656 /mysql-test/r/subselect3.result | |
parent | c749664deb9f5e77dd846480fba53568f39815d9 (diff) | |
parent | d886ea8fb66c10e58029bf7c010a1a2a085ad23d (diff) | |
download | mariadb-git-6fa4fdd29ce40375f9b79fd22a0c703fa8b0fc0f.tar.gz |
Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into olga.mysql.com:/home/igor/mysql-5.1-opt
mysql-test/r/subselect3.result:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/sql_select.h:
Auto merged
Diffstat (limited to 'mysql-test/r/subselect3.result')
-rw-r--r-- | mysql-test/r/subselect3.result | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result index 132c36fbf11..eca6cd3315c 100644 --- a/mysql-test/r/subselect3.result +++ b/mysql-test/r/subselect3.result @@ -711,3 +711,34 @@ a 1 4 DROP TABLE t1,t2; +CREATE TABLE t1 (id int); +CREATE TABLE t2 (id int PRIMARY KEY); +CREATE TABLE t3 (id int PRIMARY KEY, name varchar(10)); +INSERT INTO t1 VALUES (2), (NULL), (3), (1); +INSERT INTO t2 VALUES (234), (345), (457); +INSERT INTO t3 VALUES (222,'bbb'), (333,'ccc'), (111,'aaa'); +EXPLAIN +SELECT * FROM t1 +WHERE t1.id NOT IN (SELECT t2.id FROM t2,t3 +WHERE t3.name='xxx' AND t2.id=t3.id); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where +2 DEPENDENT SUBQUERY t2 eq_ref PRIMARY PRIMARY 4 func 1 Using where; Using index; Full scan on NULL key +2 DEPENDENT SUBQUERY t3 eq_ref PRIMARY PRIMARY 4 func 1 Using where; Full scan on NULL key +SELECT * FROM t1 +WHERE t1.id NOT IN (SELECT t2.id FROM t2,t3 +WHERE t3.name='xxx' AND t2.id=t3.id); +id +2 +NULL +3 +1 +SELECT (t1.id IN (SELECT t2.id FROM t2,t3 +WHERE t3.name='xxx' AND t2.id=t3.id)) AS x +FROM t1; +x +0 +0 +0 +0 +DROP TABLE t1,t2,t3; |