~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/select.result

  • Committer: Patrick Crews
  • Date: 2010-08-17 17:42:29 UTC
  • mfrom: (1711.1.24 build)
  • Revision ID: gleebix@gmail.com-20100817174229-e28p5025ndgkkxif
Rollup patch - optimizer fixes, mutex removal, client cleanup, translations update

Show diffs side-by-side

added added

removed removed

Lines of Context:
2952
2952
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6;
2953
2953
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
2954
2954
1       SIMPLE  t1      range   PRIMARY,b       b       5       NULL    3       Using where; Using index
2955
 
1       SIMPLE  t2      ref     c       c       5       test.t1.a       1       
 
2955
1       SIMPLE  t2      ref     c       c       5       test.t1.a       1       Using where
2956
2956
EXPLAIN
2957
2957
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;
2958
2958
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
2959
2959
1       SIMPLE  t1      range   PRIMARY,b       b       5       NULL    3       Using where; Using index
2960
 
1       SIMPLE  t2      ref     c       c       5       test.t1.a       1       
 
2960
1       SIMPLE  t2      ref     c       c       5       test.t1.a       1       Using where
2961
2961
DROP TABLE t1, t2;
2962
2962
create table t1 (
2963
2963
a int    not null auto_increment primary key,
3011
3011
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
3012
3012
1       SIMPLE  t1      const   PRIMARY PRIMARY 4       const   1       
3013
3013
1       SIMPLE  t2      const   idx1    NULL    NULL    NULL    1       
3014
 
1       SIMPLE  t3      ref     idx1    idx1    5       const   2       
 
3014
1       SIMPLE  t3      ref     idx1    idx1    5       const   2       Using where
3015
3015
SELECT * FROM t1 LEFT JOIN t2 ON t2.b=t1.a INNER JOIN t3 ON t3.d=t1.id
3016
3016
WHERE t1.id=2;
3017
3017
id      a       b       c       d       e