~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/func_in.result

  • Committer: Brian Aker
  • Date: 2010-12-24 03:44:02 UTC
  • mfrom: (2015.1.3 timestamp)
  • mto: This revision was merged to the branch mainline in revision 2028.
  • Revision ID: brian@tangent.org-20101224034402-n1hpg1yxwjz59hpw
Finish up issues with unsigned/int by fixing cast().

Show diffs side-by-side

added added

removed removed

Lines of Context:
219
219
create table t1 (a int);
220
220
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
221
221
create temporary table t2 (a int, filler char(200), key(a)) engine=myisam;
222
 
insert into t2 select C.a*2,   'no'  from t1 A, t1 B, t1 C where A.a < 10;
 
222
insert into t2 select C.a*2,   'no'  from t1 A, t1 B, t1 C;
223
223
insert into t2 select C.a*2+1, 'yes' from t1 C;
224
224
explain 
225
225
select * from t2 where a NOT IN (0, 2,4,6,8,10,12,14,16,18);
271
271
2006-04-25 10:19:00     yes
272
272
drop table t2;
273
273
create table t2 (a varchar(10), filler char(200), key(a));
274
 
insert into t2 select 'foo', 'no' from t1 A, t1 B where A.a < 10;
275
 
insert into t2 select 'barbar', 'no' from t1 A, t1 B where A.a < 10;
276
 
insert into t2 select 'bazbazbaz', 'no' from t1 A, t1 B where A.a < 10;
 
274
insert into t2 select 'foo', 'no' from t1 A, t1 B;
 
275
insert into t2 select 'barbar', 'no' from t1 A, t1 B;
 
276
insert into t2 select 'bazbazbaz', 'no' from t1 A, t1 B;
277
277
insert into t2 values ('fon', '1'), ('fop','1'), ('barbaq','1'), 
278
278
('barbas','1'), ('bazbazbay', '1'),('zz','1');
279
279
explain select * from t2 where a not in('foo','barbar', 'bazbazbaz');
281
281
1       SIMPLE  t2      range   a       a       43      NULL    5       Using where
282
282
drop table t2;
283
283
create table t2 (a decimal(10,5), filler char(200), key(a));
284
 
insert into t2 select 345.67890, 'no' from t1 A, t1 B where A.a < 10;
285
 
insert into t2 select 43245.34, 'no' from t1 A, t1 B where A.a < 10;
286
 
insert into t2 select 64224.56344, 'no' from t1 A, t1 B where A.a < 10;
 
284
insert into t2 select 345.67890, 'no' from t1 A, t1 B;
 
285
insert into t2 select 43245.34, 'no' from t1 A, t1 B;
 
286
insert into t2 select 64224.56344, 'no' from t1 A, t1 B;
287
287
insert into t2 values (0, '1'), (22334.123,'1'), (33333,'1'), 
288
288
(55555,'1'), (77777, '1');
289
289
explain
304
304
set @str="update t2 set b=1 where a not in (";
305
305
select count(*) from (
306
306
select @str:=concat(@str, @cnt:=@cnt+1, ",") 
307
 
from t1 A, t1 B, t1 C, t1 D  where A.a < 10) Z;
 
307
from t1 A, t1 B, t1 C, t1 D) Z;
308
308
count(*)
309
309
10000
310
310
set @str:=concat(@str, "10000)");