diff options
author | unknown <monty@mysql.com> | 2004-05-05 12:40:59 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-05-05 12:40:59 +0300 |
commit | 575541b9f755425eaeb07babfa07b6fd30f6d5d1 (patch) | |
tree | eb4d181ba7b2a1b850dcf5027a812ccc7c5aa124 /mysql-test/r/key.result | |
parent | af847c22af26e1cc308eeab08d35942741809408 (diff) | |
parent | e75a26ba3f5675dd1c89ce3eeb4057a64c888915 (diff) | |
download | mariadb-git-575541b9f755425eaeb07babfa07b6fd30f6d5d1.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
mysql-test/r/subselect.result:
Auto merged
sql/item.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
tests/client_test.c:
Auto merged
Diffstat (limited to 'mysql-test/r/key.result')
-rw-r--r-- | mysql-test/r/key.result | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result index 115f15bacb6..b8387389075 100644 --- a/mysql-test/r/key.result +++ b/mysql-test/r/key.result @@ -206,3 +206,19 @@ select i from t1 where b=repeat(_utf8 'b',310); i 1 drop table t1; +CREATE TABLE t1 (id int unsigned auto_increment, name char(50), primary key (id)) engine=myisam; +insert into t1 (name) values ('a'), ('b'),('c'),('d'),('e'),('f'),('g'); +explain select 1 from t1 where id =2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index +explain select 1 from t1 where id =2 or id=3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using where; Using index +explain select name from t1 where id =2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 +ALTER TABLE t1 DROP PRIMARY KEY, ADD INDEX (id); +explain select 1 from t1 where id =2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref id id 4 const 1 Using where; Using index +drop table t1; |