~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/derived.test

  • Committer: Andrew Hutchings
  • Date: 2011-02-07 17:01:15 UTC
  • mto: (2148.2.3 build)
  • mto: This revision was merged to the branch mainline in revision 2149.
  • Revision ID: andrew@linuxjedi.co.uk-20110207170115-e4sryp5nkb3n2vhy
Implicit joins of the form "SELECT * FROM t1, t2" without WHERE or ON now error.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
--error ER_BAD_FIELD_ERROR
29
29
SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1  HAVING a=1) as a;
30
30
--sort_result
31
 
select * from t1 as x1, (select * from t1) as x2;
32
 
explain select * from t1 as x1, (select * from t1) as x2;
 
31
select * from t1 as x1, (select * from t1) as x2 where x1.a != 0;
 
32
explain select * from t1 as x1, (select * from t1) as x2 where x1.a != 0;
33
33
drop table if exists  t2,t3;
34
34
select * from (select 1) as a;
35
35
select a from (select 1 as a) as b;
58
58
enable_query_log;
59
59
SELECT * FROM (SELECT * FROM t1) as b ORDER BY a  ASC LIMIT 0,20;
60
60
--replace_column 9 X
61
 
explain select count(*) from t1 as tt1, (select * from t1) as tt2;
 
61
explain select count(*) from t1 as tt1, (select * from t1) as tt2 where tt1.a != 0;
62
62
drop table t1;
63
63
SELECT * FROM (SELECT (SELECT * FROM (SELECT 1 as a) as a )) as b;
64
64
select * from (select 1 as a) b  left join (select 2 as a) c using(a);
125
125
create table t1 (a int);
126
126
insert into t1 values (1),(2);
127
127
--sort_result
128
 
select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b;
129
 
explain select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b;
 
128
select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b where a.a != 0;
 
129
explain select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b where a.a != 0;
130
130
drop table t1;
131
131
 
132
132
#
221
221
#
222
222
create table t1 (a int);
223
223
create table t2 (a int);
224
 
select * from (select * from t1,t2) foo;
 
224
select * from (select * from t1,t2 where t1.a != 0) foo;
225
225
drop table t1,t2;
226
226
 
227
227
#