1
#--source include/have_tokudb.inc
2
SET DEFAULT_STORAGE_ENGINE='tokudb';
5
DROP TABLE IF EXISTS t1;
8
create table t1(a int, b int, c int, d int, primary key(a), key(b) clustering=yes, key (c))engine=tokudb;
10
insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),(9,90,900,9000);
16
--replace_column 9 NULL;
17
explain select * from t1 where a > 5;
18
select * from t1 where a > 5;
21
--replace_column 9 NULL;
22
explain select * from t1 where b > 30;
23
select * from t1 where b > 30;
26
--replace_column 9 NULL;
27
explain select * from t1 where c > 750;
28
select * from t1 where c > 750;
33
--replace_column 9 NULL;
34
explain select a from t1 where a > 8;
35
select a from t1 where a > 8;
38
--replace_column 9 NULL;
39
explain select a,b from t1 where b > 30;
40
select a,b from t1 where b > 30;
43
--replace_column 9 NULL;
44
explain select a,b from t1 where c > 750;
45
select a,c from t1 where c > 750;
47
update t1 set c = c+5, b = b+5 where b>30;
50
--replace_column 9 NULL;
51
explain select * from t1 where a > 5;
52
select * from t1 where a > 5;
55
--replace_column 9 NULL;
56
explain select * from t1 where b > 30;
57
select * from t1 where b > 30;
60
--replace_column 9 NULL;
61
explain select * from t1 where c > 750;
62
select * from t1 where c > 750;
66
--replace_column 9 NULL;
67
explain select a from t1 where a > 8;
68
select a from t1 where a > 8;
71
--replace_column 4 NA 9 NULL;
72
explain select a,b from t1 where b > 30;
73
select a,b from t1 where b > 30;
76
--replace_column 9 NULL;
77
explain select a,b from t1 where c > 750;
78
select a,c from t1 where c > 750;
81
alter table t1 drop primary key;
83
--replace_column 9 NULL;
84
explain select * from t1 where a > 5;
85
select * from t1 where a > 5;
88
--replace_column 9 NULL;
89
explain select * from t1 where b > 30;
90
select * from t1 where b > 30;
93
--replace_column 9 NULL;
94
explain select * from t1 where c > 750;
95
select * from t1 where c > 750;
99
--replace_column 9 NULL;
100
explain select a from t1 where a > 5;
101
select a from t1 where a > 5;
104
--replace_column 9 NULL;
105
explain select a,b from t1 where b > 30;
106
select a,b from t1 where b > 30;
109
--replace_column 9 NULL;
110
explain select a,b from t1 where c > 750;
111
select a,c from t1 where c > 750;
113
update t1 set c = c+5, b = b+5 where b>30;
118
--replace_column 9 NULL;
119
explain select * from t1 where a > 5;
120
select * from t1 where a > 5;
123
--replace_column 9 NULL;
124
explain select * from t1 where b > 30;
125
select * from t1 where b > 30;
128
--replace_column 9 NULL;
129
explain select * from t1 where c > 750;
130
select * from t1 where c > 750;
135
--replace_column 9 NULL;
136
explain select a from t1 where a > 5;
137
select a from t1 where a > 5;
140
--replace_column 9 NULL;
141
explain select a,b from t1 where b > 30;
142
select a,b from t1 where b > 30;
145
--replace_column 9 NULL;
146
explain select a,b from t1 where c > 750;
147
select a,c from t1 where c > 750;