1SET DEFAULT_STORAGE_ENGINE='tokudb';
2*** Bug #22169 ***
3DROP TABLE IF EXISTS t1;
4create table t1 (a int, b varchar(20), c int, key (b(3)) clustering=yes);
5insert into t1 values (1,"100000",100);
6insert into t1 values (2,"200000",200);
7insert into t1 values (3,"300000",300);
8insert into t1 values (4,"400000",400);
9insert into t1 values (5,"500000",500);
10select b from t1 where b > "10";
11b
12100000
13200000
14300000
15400000
16500000
17alter table t1 drop key b;
18alter table t1 add key b(b(2)) clustering=yes;
19select b from t1 where b > "10";
20b
21100000
22200000
23300000
24400000
25500000
26DROP TABLE t1;
27