~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/func_in.test

  • Committer: Brian Aker
  • Date: 2009-06-16 00:53:22 UTC
  • mto: This revision was merged to the branch mainline in revision 1094.
  • Revision ID: brian@gaz-20090616005322-w0ode4jul9z8s2y9
Partial fix for tests for tmp

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
DROP TABLE t1;
138
138
 
139
139
# BUG#15872: Excessive memory consumption of range analysis of NOT IN
140
 
create table t1 (a int) ENGINE=MYISAM;
 
140
# I have disabled the EXPLAIN because we must use Innodb with this test.
 
141
create table t1 (a int);
141
142
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); 
142
 
create table t2 (a int, filler char(200), key(a)) ENGINE=MYISAM;
 
143
create table t2 (a int, filler char(200), key(a));
143
144
 
144
145
insert into t2 select C.a*2,   'no'  from t1 A, t1 B, t1 C;
145
146
insert into t2 select C.a*2+1, 'yes' from t1 C;
146
147
 
147
 
explain 
148
 
select * from t2 where a NOT IN (0, 2,4,6,8,10,12,14,16,18);
 
148
# FIXME -> Needs to work with Innodb
 
149
# explain 
 
150
# select * from t2 where a NOT IN (0, 2,4,6,8,10,12,14,16,18);
149
151
select * from t2 where a NOT IN (0, 2,4,6,8,10,12,14,16,18);
150
152
 
151
 
explain select * from t2 force index(a) where a NOT IN (2,2,2,2,2,2);
152
 
explain select * from t2 force index(a) where a <> 2;
 
153
 
154
# explain select * from t2 force index(a) where a NOT IN (2,2,2,2,2,2);
 
155
# explain select * from t2 force index(a) where a <> 2;
153
156
 
154
157
drop table t2;
155
158
 
368
371
#
369
372
# Bug#18360: Type aggregation for IN and CASE may lead to a wrong result 
370
373
#
371
 
create table t1(f1 char(1)) ENGINE=MYISAM;
 
374
create TEMPORARY table t1(f1 char(1)) ENGINE=MYISAM;
372
375
insert into t1 values ('a'),('b'),('1');
373
376
select f1 from t1 where f1 in ('a',1);
374
377
select f1, case f1 when 'a' then '+' when 1 then '-' end from t1;
379
382
explain select f1 from t1 where f1 in ('a','b');
380
383
select f1 from t1 where f1 in (2,1);
381
384
explain select f1 from t1 where f1 in (2,1);
382
 
create table t2(f2 int, index t2f2(f2)) ENGINE=MYISAM;
 
385
create TEMPORARY table t2(f2 int, index t2f2(f2)) ENGINE=MYISAM;
383
386
insert into t2 values(0),(1),(2);
384
387
select f2 from t2 where f2 in ('a',2);
385
388
explain select f2 from t2 where f2 in ('a',2);