diff options
author | monty@mysql.com <> | 2004-05-05 12:31:17 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2004-05-05 12:31:17 +0300 |
commit | 7e3cf5958cf304d12c005eb06fdfb3f23b026645 (patch) | |
tree | e86d7e05dcc63cb8a7b131d757d0f6d9308aa24f /mysql-test/r/key.result | |
parent | 59ddd8c7383ae69009c8570d427a4e15ccf2a357 (diff) | |
download | mariadb-git-7e3cf5958cf304d12c005eb06fdfb3f23b026645.tar.gz |
Fixed crashing bug with alter table when table was in use (Bug #3643)
We didn't use 'only index' for tables of type 'const'. (Bug #3497)
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; |