-- source include/have_innodb.inc drop table if exists t1; create table t1 (f1 int not null, f2 int not null,f3 int not null, f4 char(1), primary key (f1,f2), key ix(f3))Engine=InnoDB; let $1=55; while ($1) { eval insert into t1(f1,f2,f3,f4) values ($1,$1,$1,'A'); dec $1; } select * from t1 where (f3>=5 and f3<=10) or (f3>=1 and f3<=4);