diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2004-10-06 13:18:55 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2004-10-06 13:18:55 +0000 |
commit | 838af107a3a2cfbeade5a5e787bff1da71bf7207 (patch) | |
tree | ebaf89381e7d046d746e9a8e8a1180e2b5c3de48 /mysql-test/r/ndb_subquery.result | |
parent | 7d583c5834f420406c9abe8bb9c44518e49e74c3 (diff) | |
download | mariadb-git-838af107a3a2cfbeade5a5e787bff1da71bf7207.tar.gz |
bug#5736, subqueries and not in
and testcases
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
bug#5736, subqueries and not in
sql/ha_ndbcluster.cc:
bug#5736, subqueries and not in
Diffstat (limited to 'mysql-test/r/ndb_subquery.result')
-rw-r--r-- | mysql-test/r/ndb_subquery.result | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/r/ndb_subquery.result b/mysql-test/r/ndb_subquery.result new file mode 100644 index 00000000000..8c89805a765 --- /dev/null +++ b/mysql-test/r/ndb_subquery.result @@ -0,0 +1,42 @@ +drop table if exists t1; +drop table if exists t2; +create table t1 (p int not null primary key, u int not null, o int not null, +unique (u), key(o)) engine=ndb; +create table t2 (p int not null primary key, u int not null, o int not null, +unique (u), key(o)) engine=ndb; +insert into t1 values (1,1,1),(2,2,2),(3,3,3); +insert into t2 values (1,1,1),(2,2,2),(3,3,3), (4,4,4), (5,5,5); +explain select * from t2 where p NOT IN (select p from t1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where +2 DEPENDENT SUBQUERY t1 unique_subquery PRIMARY PRIMARY 4 func 1 Using index +select * from t2 where p NOT IN (select p from t1); +p u o +4 4 4 +5 5 5 +explain select * from t2 where p NOT IN (select u from t1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where +2 DEPENDENT SUBQUERY t1 unique_subquery u u 4 func 1 Using index +select * from t2 where p NOT IN (select u from t1); +p u o +4 4 4 +5 5 5 +explain select * from t2 where p NOT IN (select o from t1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where +2 DEPENDENT SUBQUERY t1 index_subquery o o 4 func 1 Using index +select * from t2 where p NOT IN (select o from t1); +p u o +4 4 4 +5 5 5 +explain select * from t2 where p NOT IN (select p+0 from t1); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where +2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 Using where +select * from t2 where p NOT IN (select p+0 from t1); +p u o +4 4 4 +5 5 5 +drop table t1; +drop table t2; |