~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/derived.result

  • Committer: Lee Bieber
  • Date: 2010-11-14 23:15:42 UTC
  • mfrom: (1929.1.42 warning-stack-frame)
  • Revision ID: kalebral@gmail.com-20101114231542-fnnu6ydd2p17n582
Merge Monty - fix bug 672372: some functions use > 32k stack

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
ERROR 42S22: Unknown column 'a' in 'where clause'
38
38
SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1  HAVING a=1) as a;
39
39
ERROR 42S22: Unknown column 'a' in 'having clause'
40
 
select * from t1 as x1, (select * from t1) as x2 where x1.a != 0;
 
40
select * from t1 as x1, (select * from t1) as x2;
41
41
a       b       a       b
42
42
1       a       1       a
43
43
2       b       1       a
55
55
2       b       3       c
56
56
3       c       3       c
57
57
3       c       3       c
58
 
explain select * from t1 as x1, (select * from t1) as x2 where x1.a != 0;
 
58
explain select * from t1 as x1, (select * from t1) as x2;
59
59
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
60
 
1       PRIMARY x1      ALL     NULL    NULL    NULL    NULL    4       Using where
 
60
1       PRIMARY x1      ALL     NULL    NULL    NULL    NULL    4       
61
61
1       PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    4       Using join buffer
62
62
2       DERIVED t1      ALL     NULL    NULL    NULL    NULL    4       
63
63
drop table if exists  t2,t3;
140
140
18      18
141
141
19      19
142
142
20      20
143
 
explain select count(*) from t1 as tt1, (select * from t1) as tt2 where tt1.a != 0;
 
143
explain select count(*) from t1 as tt1, (select * from t1) as tt2;
144
144
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
145
 
1       PRIMARY tt1     range   a       a       4       NULL    X       Using where; Using index
 
145
1       PRIMARY tt1     index   NULL    a       4       NULL    X       Using index
146
146
1       PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    X       Using join buffer
147
147
2       DERIVED t1      ALL     NULL    NULL    NULL    NULL    X       
148
148
drop table t1;
225
225
drop table t1;
226
226
create table t1 (a int);
227
227
insert into t1 values (1),(2);
228
 
select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b where a.a != 0;
 
228
select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b;
229
229
a       a
230
230
1       1
231
231
2       1
232
232
1       2
233
233
2       2
234
 
explain select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b where a.a != 0;
 
234
explain select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b;
235
235
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
236
 
1       PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       Using where
 
236
1       PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       
237
237
1       PRIMARY <derived4>      ALL     NULL    NULL    NULL    NULL    2       Using join buffer
238
238
4       DERIVED t1      ALL     NULL    NULL    NULL    NULL    2       
239
239
5       UNION   t1      ALL     NULL    NULL    NULL    NULL    2       
328
328
drop table t1, t2, t3;
329
329
create table t1 (a int);
330
330
create table t2 (a int);
331
 
select * from (select * from t1,t2 where t1.a != 0) foo;
 
331
select * from (select * from t1,t2) foo;
332
332
a       a
333
333
drop table t1,t2;
334
334
create table t1 (ID int not null auto_increment,