Commit 3036c420 authored by Rich Prohaska's avatar Rich Prohaska

#202 add test cases for mdev-5932

parent 08ddd60d
drop table if exists t1,t2;
drop table if exists t1i,t2i;
CREATE TABLE t1 (a CHAR(3), INDEX(a)) ENGINE=TokuDB;
INSERT INTO t1 VALUES ('foo'),( NULL);
SELECT * FROM t1 WHERE 'bar' NOT IN ( SELECT t1_1.a FROM t1 AS t1_1, t1 AS t1_2 );
a
CREATE TABLE t2 AS
SELECT * FROM t1 WHERE 'bar' NOT IN ( SELECT t1_1.a FROM t1 AS t1_1, t1 AS t1_2 );
SELECT * FROM t2;
a
CREATE TABLE tsub AS SELECT t1_1.a FROM t1 AS t1_1, t1 AS t1_2;
CREATE TABLE t3 AS
SELECT * FROM t1 WHERE 'bar' NOT IN ( SELECT * FROM tsub );
SELECT * FROM t3;
a
DROP TABLE tsub, t3;
CREATE TABLE t1i (a CHAR(3), INDEX(a)) ENGINE=InnoDB;
INSERT INTO t1i VALUES ('foo'),( NULL);
SELECT * FROM t1i WHERE 'bar' NOT IN ( SELECT t1_1.a FROM t1i AS t1_1, t1i AS t1_2 );
a
CREATE TABLE t2i AS
SELECT * FROM t1i WHERE 'bar' NOT IN ( SELECT t1_1.a FROM t1i AS t1_1, t1i AS t1_2 );
SELECT * FROM t2i;
a
include/diff_tables.inc [t2,t2i]
drop table t1,t2,t1i,t2i;
source include/have_tokudb.inc;
source include/have_innodb.inc;
disable_warnings;
drop table if exists t1,t2;
drop table if exists t1i,t2i;
enable_warnings;
CREATE TABLE t1 (a CHAR(3), INDEX(a)) ENGINE=TokuDB;
INSERT INTO t1 VALUES ('foo'),( NULL);
SELECT * FROM t1 WHERE 'bar' NOT IN ( SELECT t1_1.a FROM t1 AS t1_1, t1 AS t1_2 );
CREATE TABLE t2 AS
SELECT * FROM t1 WHERE 'bar' NOT IN ( SELECT t1_1.a FROM t1 AS t1_1, t1 AS t1_2 );
SELECT * FROM t2;
CREATE TABLE tsub AS SELECT t1_1.a FROM t1 AS t1_1, t1 AS t1_2;
CREATE TABLE t3 AS
SELECT * FROM t1 WHERE 'bar' NOT IN ( SELECT * FROM tsub );
SELECT * FROM t3;
DROP TABLE tsub, t3;
CREATE TABLE t1i (a CHAR(3), INDEX(a)) ENGINE=InnoDB;
INSERT INTO t1i VALUES ('foo'),( NULL);
SELECT * FROM t1i WHERE 'bar' NOT IN ( SELECT t1_1.a FROM t1i AS t1_1, t1i AS t1_2 );
CREATE TABLE t2i AS
SELECT * FROM t1i WHERE 'bar' NOT IN ( SELECT t1_1.a FROM t1i AS t1_1, t1i AS t1_2 );
SELECT * FROM t2i;
let $diff_tables = t2,t2i;
source include/diff_tables.inc;
drop table t1,t2,t1i,t2i;
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment