~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/func_in.test

  • Committer: Eric Herman
  • Date: 2008-12-07 15:29:44 UTC
  • mto: (656.1.14 devel)
  • mto: This revision was merged to the branch mainline in revision 670.
  • Revision ID: eric@mysql.com-20081207152944-cq1nx1cyi0huqj0f
Added pointer to online version of the FAQ

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
 
# I have disabled the EXPLAIN because we must use Innodb with this test.
141
 
create table t1 (a int);
 
140
create table t1 (a int) ENGINE=MYISAM;
142
141
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); 
143
 
create temporary table t2 (a int, filler char(200), key(a)) engine=myisam;
 
142
create table t2 (a int, filler char(200), key(a)) ENGINE=MYISAM;
144
143
 
145
144
insert into t2 select C.a*2,   'no'  from t1 A, t1 B, t1 C;
146
145
insert into t2 select C.a*2+1, 'yes' from t1 C;
149
148
select * from t2 where a NOT IN (0, 2,4,6,8,10,12,14,16,18);
150
149
select * from t2 where a NOT IN (0, 2,4,6,8,10,12,14,16,18);
151
150
 
152
 
153
151
explain select * from t2 force index(a) where a NOT IN (2,2,2,2,2,2);
154
152
explain select * from t2 force index(a) where a <> 2;
155
153
 
370
368
#
371
369
# Bug#18360: Type aggregation for IN and CASE may lead to a wrong result 
372
370
#
373
 
create TEMPORARY table t1(f1 char(1)) ENGINE=MYISAM;
 
371
create table t1(f1 char(1)) ENGINE=MYISAM;
374
372
insert into t1 values ('a'),('b'),('1');
375
373
select f1 from t1 where f1 in ('a',1);
376
374
select f1, case f1 when 'a' then '+' when 1 then '-' end from t1;
381
379
explain select f1 from t1 where f1 in ('a','b');
382
380
select f1 from t1 where f1 in (2,1);
383
381
explain select f1 from t1 where f1 in (2,1);
384
 
create TEMPORARY table t2(f2 int, index t2f2(f2)) ENGINE=MYISAM;
 
382
create table t2(f2 int, index t2f2(f2)) ENGINE=MYISAM;
385
383
insert into t2 values(0),(1),(2);
386
384
select f2 from t2 where f2 in ('a',2);
387
385
explain select f2 from t2 where f2 in ('a',2);
395
393
# Bug #31075: crash in get_func_mm_tree
396
394
#
397
395
 
398
 
create table t1 (a datetime, key(a));
 
396
create table t1 (a time, key(a));
399
397
insert into t1 values (),(),(),(),(),(),(),(),(),();
400
398
select a from t1 where a not in (a,a,a) group by a;
401
399
drop table t1;