~vkolesnikov/pbxt/pbxt-preload-test-bug

« back to all changes in this revision

Viewing changes to pbxt/mysql-test-update/mysql-test/r/derived.result

  • Committer: paul-mccullagh
  • Date: 2008-03-10 11:36:34 UTC
  • Revision ID: paul-mccullagh-417ebf175a9c8ee6e5b3777d9e2398e1fb197391
Implemented full durability

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
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
60
1       PRIMARY x1      ALL     NULL    NULL    NULL    NULL    4       
61
 
1       PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    4       
 
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;
64
64
select * from (select 1) as a;
115
115
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
116
116
1       PRIMARY <derived2>      system  NULL    NULL    NULL    NULL    1       
117
117
2       DERIVED t2      ALL     NULL    NULL    NULL    NULL    1       
118
 
2       DERIVED t1      ALL     NULL    NULL    NULL    NULL    4       Using where
 
118
2       DERIVED t1      ALL     NULL    NULL    NULL    NULL    4       Using where; Using join buffer
119
119
drop table t1, t2;
120
120
create table t1(a int not null, t char(8), index(a));
121
121
SELECT * FROM (SELECT * FROM t1) as b ORDER BY a  ASC LIMIT 0,20;
143
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
145
1       PRIMARY tt1     index   NULL    a       4       NULL    10000   Using index
146
 
1       PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    10000   
 
146
1       PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    10000   Using join buffer
147
147
2       DERIVED t1      ALL     NULL    NULL    NULL    NULL    10000   
148
148
drop table t1;
149
149
SELECT * FROM (SELECT (SELECT * FROM (SELECT 1 as a) as a )) as b;
190
190
explain SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum;
191
191
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
192
192
1       PRIMARY m2      ALL     NULL    NULL    NULL    NULL    9       
193
 
1       PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    6       Using where
 
193
1       PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    6       Using where; Using join buffer
194
194
2       DERIVED mp      ALL     NULL    NULL    NULL    NULL    9       Using temporary; Using filesort
195
195
2       DERIVED m1      eq_ref  PRIMARY PRIMARY 3       test.mp.mat_id  1       
196
196
explain SELECT STRAIGHT_JOIN d.pla_id, m2.test FROM t1 m2  INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum;
197
197
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
198
198
1       PRIMARY m2      ALL     NULL    NULL    NULL    NULL    9       
199
 
1       PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    6       Using where
 
199
1       PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    6       Using where; Using join buffer
200
200
2       DERIVED mp      ALL     NULL    NULL    NULL    NULL    9       Using temporary; Using filesort
201
201
2       DERIVED m1      eq_ref  PRIMARY PRIMARY 3       test.mp.mat_id  1       
202
202
drop table t1,t2;
203
203
SELECT a.x FROM (SELECT 1 AS x) AS a HAVING a.x = 1;
204
204
x
205
205
1
 
206
create user mysqltest_1;
206
207
create table t1 select 1 as a;
207
208
analyze table t1;
208
209
Table   Op      Msg_type        Msg_text
249
250
explain select * from ( select * from t1 union select * from t1) a,(select * from t1 union select * from t1) b;
250
251
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
251
252
1       PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    2       
252
 
1       PRIMARY <derived4>      ALL     NULL    NULL    NULL    NULL    2       
 
253
1       PRIMARY <derived4>      ALL     NULL    NULL    NULL    NULL    2       Using join buffer
253
254
4       DERIVED t1      ALL     NULL    NULL    NULL    NULL    2       
254
255
5       UNION   t1      ALL     NULL    NULL    NULL    NULL    2       
255
256
NULL    UNION RESULT    <union4,5>      ALL     NULL    NULL    NULL    NULL    NULL    
316
317
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
317
318
1       PRIMARY <derived2>      ALL     NULL    NULL    NULL    NULL    3       Using temporary; Using filesort
318
319
2       DERIVED x       ALL     NULL    NULL    NULL    NULL    17      Using temporary; Using filesort
319
 
2       DERIVED y       ALL     NULL    NULL    NULL    NULL    17      Using where
 
320
2       DERIVED y       ALL     NULL    NULL    NULL    NULL    17      Using where; Using join buffer
320
321
drop table t1;
321
322
create table t2 (a int, b int, primary key (a));
322
323
insert into t2 values (1,7),(2,7);
384
385
select t2.* from (select * from t1) as A inner join t2 on A.ID = t2.FID;
385
386
ID      DATA    FID
386
387
drop table t1, t2;
 
388
drop user mysqltest_1;