blob: aa33246bfeb92aa10e3e56db576f96a78ef2c055 (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
SET DEFAULT_STORAGE_ENGINE='tokudb';
*** Bug #22169 ***
DROP TABLE IF EXISTS t1;
create table t1 (a int, b varchar(20), c int, key (a));
insert into t1 values (1,"10",100);
insert into t1 values (2,"20",200);
insert into t1 values (3,"30",300);
insert into t1 values (4,"40",400);
insert into t1 values (5,"50",500);
explain select * from t1 where a > 3;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 2 Using where
select * from t1 where a > 3;
a b c
4 40 400
5 50 500
select b from t1 where a > 3;
b
40
50
select c from t1 where a > 3;
c
400
500
delete from t1 where a <2;
explain select * from t1 where a >= 4;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 2 Using where
select * from t1 where a >= 4;
a b c
4 40 400
5 50 500
select b from t1 where a >= 4;
b
40
50
select c from t1 where a >= 4;
c
400
500
update t1 set c = c+1000;
explain select * from t1 where a >= 4;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 2 Using where
select * from t1 where a >= 4;
a b c
4 40 1400
5 50 1500
select b from t1 where a >= 4;
b
40
50
select c from t1 where a >= 4;
c
1400
1500
DROP TABLE t1;
|