mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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)
This commit is contained in:
@@ -204,3 +204,15 @@ select i from t1 where a=repeat(_utf8 0xD0B1,200);
|
||||
select i from t1 where b=repeat(_utf8 'b',310);
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test of key read with primary key (Bug #3497)
|
||||
#
|
||||
|
||||
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;
|
||||
explain select 1 from t1 where id =2 or id=3;
|
||||
explain select name from t1 where id =2;
|
||||
ALTER TABLE t1 DROP PRIMARY KEY, ADD INDEX (id);
|
||||
explain select 1 from t1 where id =2;
|
||||
drop table t1;
|
||||
|
||||
Reference in New Issue
Block a user