~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/derived.test

  • Committer: Lee Bieber
  • Date: 2010-08-21 22:42:44 UTC
  • mto: (1727.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1728.
  • Revision ID: lbieber@kalebral-2.local-20100821224244-kh3gmsvi45dlbuu1
For the feature request (https://blueprints.launchpad.net/drizzle/+spec/limit-maximum-sort-size) 
that is requesting the ability to cap various buffers, we first tried setting the join buffer to 
1 to see how that would affect the test results and expose test results that need to 
sorted (by adding --sorted_result). 

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 1054
29
29
SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1  HAVING a=1) as a;
 
30
--sort_result
30
31
select * from t1 as x1, (select * from t1) as x2;
31
32
explain select * from t1 as x1, (select * from t1) as x2;
32
33
drop table if exists  t2,t3;
116
117
create table t1 (E1 INTEGER NOT NULL, E2 INTEGER NOT NULL, E3 INTEGER NOT NULL, PRIMARY KEY(E1)
117
118
);
118
119
insert into t1 VALUES(1,1,1), (2,2,1);
 
120
--sort_result
119
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;
120
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;
121
123
drop table t1;
122
124
 
123
125
create table t1 (a int);
124
126
insert into t1 values (1),(2);
 
127
--sort_result
125
128
select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b;
126
129
explain select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b;
127
130
drop table t1;