explain.test
Upload User: tsgydb
Upload Date: 2007-04-14
Package Size: 10674k
Code Size: 1k
Category:

MySQL

Development Platform:

Visual C++

  1. #
  2. # Test of different EXPLAIN's
  3. drop table if exists t1;
  4. create table t1 (id int not null, str char(10), unique(str));
  5. insert into t1 values (1, null),(2, null),(3, "foo"),(4, "bar");
  6. select * from t1 where str is null;
  7. select * from t1 where str="foo";
  8. explain select * from t1 where str is null;
  9. explain select * from t1 where str="foo";
  10. explain select * from t1 ignore key (str) where str="foo";
  11. explain select * from t1 use key (str,str) where str="foo";
  12. #The following should give errors
  13. !$1072 explain select * from t1 use key (str,str,foo) where str="foo";
  14. !$1072 explain select * from t1 ignore key (str,str,foo) where str="foo";
  15. drop table t1;
  16. explain select 1;