~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/derived.test

  • Committer: Brian Aker
  • Date: 2011-02-22 23:14:37 UTC
  • mfrom: (2192.1.2 drizzle-staging)
  • Revision ID: brian@tangent.org-20110222231437-s9vawppxyq1s6ldk
Rollup changes in build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
SELECT 1 FROM (SELECT 1) a WHERE a=2;
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
 
--sort_result
 
30
--sorted_result
31
31
select * from t1 as x1, (select * from t1) as x2 where x1.a != 0;
32
32
explain select * from t1 as x1, (select * from t1) as x2 where x1.a != 0;
33
33
drop table if exists  t2,t3;
117
117
create table t1 (E1 INTEGER NOT NULL, E2 INTEGER NOT NULL, E3 INTEGER NOT NULL, PRIMARY KEY(E1)
118
118
);
119
119
insert into t1 VALUES(1,1,1), (2,2,1);
120
 
--sort_result
 
120
--sorted_result
121
121
select count(*) from t1 INNER JOIN (SELECT A.E1, A.E2, A.E3 FROM t1 AS A WHERE A.E3 = (SELECT MAX(B.E3) FROM t1 AS B WHERE A.E2 = B.E2)) AS THEMAX ON t1.E1 = THEMAX.E2 AND t1.E1 = t1.E2;
122
122
explain select count(*) from t1 INNER JOIN (SELECT A.E1, A.E2, A.E3 FROM t1 AS A WHERE A.E3 = (SELECT MAX(B.E3) FROM t1 AS B WHERE A.E2 = B.E2)) AS THEMAX ON t1.E1 = THEMAX.E2 AND t1.E1 = t1.E2;
123
123
drop table t1;
124
124
 
125
125
create table t1 (a int);
126
126
insert into t1 values (1),(2);
127
 
--sort_result
 
127
--sorted_result
128
128
select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b where a.a != 0;
129
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;