~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/haildb/tests/r/index_multicolumn_unique.result

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
create table t1 (a int primary key, b int, c int, unique abcindex(a,b,c), unique bcindex(b,c));
2
 
insert into t1 values (1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),(6,2,3),(7,2,4),(8,2,1);
3
 
explain select * from t1 force index (abcindex) where a=2 and b=2;
4
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
5
 
1       SIMPLE  t1      ref     abcindex        abcindex        9       const,const     #       Using where; Using index
6
 
select * from t1 force index (abcindex) where a=2 and b=2;
7
 
a       b       c
8
 
2       2       2
9
 
explain select a from t1 force index (bcindex) where b=2 and c>2;
10
 
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
11
 
1       SIMPLE  t1      range   bcindex bcindex 10      NULL    #       Using where
12
 
select a from t1 force index (bcindex) where b=2 and c>2;
13
 
a
14
 
6
15
 
7
16
 
DROP TABLE t1;