1--source include/have_tokudb.inc 2 3--disable_warnings 4drop table if exists a,b,c,foo; 5--enable_warnings 6 7create table a (a int auto_increment, primary key (a)) engine=TokuDB; 8create table b (a int auto_increment, primary key (a)) engine=TokuDB; 9create table c (a int auto_increment, primary key (a)) engine=TokuDB; 10 11insert into a values (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(); 12insert into b values (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(); 13insert into c values (),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(),(); 14 15create table foo (a int, b int, c int, d int, e int, key(a,b,c)) engine=TokuDB; 16 17insert into foo (a,b,c) select * from a,b,c; 18 19flush status; 20show status like '%Handler_read_next%'; 21replace_column 9 NA; 22explain select * from foo where a between 5 and 6 and c=10; 23select * from foo where a between 5 and 6 and c=10; 24show status like '%Handler_read_next%'; 25 26flush status; 27show status like '%Handler_read_prev%'; 28replace_column 9 NA; 29explain select * from foo where a between 5 and 6 and c=10; 30select * from foo where a between 5 and 6 and c=10 order by a desc; 31show status like '%Handler_read_prev%'; 32 33flush status; 34show status like '%Handler_read_prev%'; 35replace_column 9 NA; 36explain select * from foo where a > 19 and c=10; 37select * from foo where a > 19 and c=10 order by a desc; 38show status like '%Handler_read_prev%'; 39 40flush status; 41show status like '%Handler_read_next%'; 42replace_column 9 NA; 43explain select * from foo where a > 19 and c=10; 44select * from foo where a > 19 and c=10; 45show status like '%Handler_read_next%'; 46 47drop table foo,a,b,c; 48