~drizzle-pbxt/drizzle/drizzle-pbxt-2

« back to all changes in this revision

Viewing changes to tests/t/select_in_null.test

  • Committer: Paul McCullagh
  • Date: 2009-11-10 14:18:39 UTC
  • mfrom: (1038.1.7 drizzle-pbxt-pre-merge)
  • Revision ID: paul.mccullagh@primebase.org-20091110141839-2j3k43b17ag6f605
Merged Drizzle trunk and PBXT 1.0.09

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# SELECT IN () with NULL in IN changes query plan
 
3
#
 
4
# http://bugs.mysql.com/bug.php?id=44139
 
5
 
6
 
 
7
drop table if exists foo;
 
8
 
 
9
create temporary table foo (
 
10
        a int not null auto_increment,
 
11
        b int,
 
12
        primary key( a )
 
13
) engine=myisam;
 
14
 
 
15
begin;
 
16
insert into foo( b ) values (1),(1),(1),(1),(1);
 
17
create table t2 as select * from foo;
 
18
insert into foo( b ) select b from t2;
 
19
drop table t2;
 
20
create table t2 as select * from foo;
 
21
insert into foo( b ) select b from t2;
 
22
drop table t2;
 
23
create table t2 as select * from foo;
 
24
insert into foo( b ) select b from t2;
 
25
drop table t2;
 
26
create table t2 as select * from foo;
 
27
insert into foo( b ) select b from t2;
 
28
drop table t2;
 
29
create table t2 as select * from foo;
 
30
insert into foo( b ) select b from t2;
 
31
drop table t2;
 
32
commit;
 
33
 
 
34
explain select * from foo where a in (160000, 160001, 160002);
 
35
explain select * from foo where a in (null, 160000, 160001, 160002);
 
36
DROP TABLE foo;