1
1
drop table if exists t1,t2;
2
create table t1 (a int, b int not null,unique key (a,b),index(b)) engine=myisam;
2
create temporary table t1 (a int, b int not null,unique key (a,b),index(b)) engine=myisam;
3
3
insert ignore into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(null,7),(9,9),(8,8),(7,7),(null,9),(null,9),(6,6);
4
4
explain select * from t1 where a is null;
5
5
id select_type table type possible_keys key key_len ref rows Extra