summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/tokudb/t/ext_key_1_innodb.test
blob: 766d0c107dbf522e67c0105e2badefef9bf76777 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
source include/have_tokudb.inc;
source include/have_innodb.inc;

disable_warnings;
drop table if exists t;
enable_warnings;

create table t (id int not null, x int not null, y int not null, primary key(id), key(x)) engine=innodb;

insert into t values (0,0,0),(1,1,1),(2,2,2),(3,2,3),(4,2,4);

explain select x,id from t force index (x) where x=0 and id=0;
flush status;
select x,id from t force index (x) where x=0 and id=0;
show status like 'handler_read%';

explain select y,id from t force index (x) where x=0 and id=0;
flush status;
select y,id from t force index (x) where x=0 and id=0;
show status like 'handler_read%';

explain select x,id from t force index (x) where x=0 and id=1;
flush status;
select x,id from t force index (x) where x=0 and id=1;
show status like 'handler_read%';

explain select y,id from t force index (x)where x=0 and id=1;
flush status;
select y,id from t force index(x) where x=0 and id=1;
show status like 'handler_read%';

explain select x,id from t force index (x) where x=2 and id=3;
flush status;
select x,id from t force index (x) where x=2 and id=3;
show status like 'handler_read%';

explain select x,id from t force index (x) where x=2 and id=0;
flush status;
select x,id from t force index (x) where x=2 and id=0;
show status like 'handler_read%';

drop table t;