~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/subselect3.result

  • Committer: Monty Taylor
  • Date: 2008-09-14 22:10:23 UTC
  • mto: This revision was merged to the branch mainline in revision 388.
  • Revision ID: monty@inaugust.com-20080914221023-otz8vuui590zp5yf
Got rid of libsqlcommon and some surious defines.

Show diffs side-by-side

added added

removed removed

Lines of Context:
444
444
bb      NULL    NULL
445
445
select oref, a from t2 where a in (select ie from t1 where oref=t2.oref);
446
446
oref    a
 
447
ff      2
447
448
aa      1
448
 
ff      2
449
449
select oref, a from t2 where a not in (select ie from t1 where oref=t2.oref);
450
450
oref    a
451
451
bb      2
744
744
DROP TABLE t1,t2,t3;
745
745
CREATE TABLE t1 (a INT NOT NULL);
746
746
INSERT INTO t1 VALUES (1),(-1), (65),(66);
747
 
CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY);
 
747
CREATE TABLE t2 (a INT UNSIGNED NOT NULL PRIMARY KEY);
748
748
INSERT INTO t2 VALUES (65),(66);
749
749
SELECT a FROM t1 WHERE a NOT IN (65,66);
750
750
a
757
757
EXPLAIN SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2);
758
758
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
759
759
1       PRIMARY t1      ALL     NULL    NULL    NULL    NULL    4       Using where
760
 
2       DEPENDENT SUBQUERY      t2      unique_subquery PRIMARY PRIMARY 4       func    1       Using index
 
760
2       DEPENDENT SUBQUERY      t2      unique_subquery PRIMARY PRIMARY 4       func    1       Using index; Using where
761
761
DROP TABLE t1, t2;
762
762
CREATE TABLE t1 (a INT);
763
763
INSERT INTO t1 VALUES(1);