EVOLUTION-MANAGER
Edit File: cluster_tokudb_bug_993_2.result
SET DEFAULT_STORAGE_ENGINE='tokudb'; *** Bug #22169 *** DROP TABLE IF EXISTS z1; create table z1 (a int, b int, c int, d int, e int, primary key (c,d), key (a,b) clustering=yes); insert into z1 values (1,1,1,1,1), (1,2,3,4,5), (3,4,1,100,1),(3,4,1,2,3),(3,5,1,21,1),(7,8,4,2,6),(9,10,34,3,2); insert into z1 values (-1,-1,-1,-1,-1), (-1,-2,-3,-4,-5), (-3,-4,-1,-100,-1),(-3,-4,-1,-2,-3),(-3,-5,-1,-21,-1),(-7,-8,-4,-2,-6),(-9,-10,-34,-3,-2); select * from z1 group by a,b; a b c d e -9 -10 -34 -3 -2 -7 -8 -4 -2 -6 -3 -5 -1 -21 -1 -3 -4 -1 -100 -1 -1 -2 -3 -4 -5 -1 -1 -1 -1 -1 1 1 1 1 1 1 2 3 4 5 3 4 1 2 3 3 5 1 21 1 7 8 4 2 6 9 10 34 3 2 explain select a,b from z1 where a < 1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE z1 range a a 5 NULL 7 Using where; Using index select max(a) from z1 where a < 1; max(a) -1 explain select a,b from z1 where a < 9; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE z1 index a a 10 NULL 14 Using where; Using index select max(a) from z1 where a < 9; max(a) 7 explain select a,b from z1 where a < 7; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE z1 range a a 5 NULL 12 Using where; Using index select max(a) from z1 where a < 7; max(a) 3 explain select a,b from z1 where a < 3; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE z1 range a a 5 NULL 9 Using where; Using index select max(a) from z1 where a < 3; max(a) 1 explain select max(b) from z1 where a = 1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away select max(b) from z1 where a = 1; max(b) 2 explain select max(b) from z1 where a = 3; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away select max(b) from z1 where a = 3; max(b) 5 explain select max(b) from z1 where a = 9; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away select max(b) from z1 where a = 9; max(b) 10 DROP TABLE z1;