diff options
author | unknown <monty@mysql.com> | 2004-05-05 12:31:17 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-05-05 12:31:17 +0300 |
commit | 68d07cbcc46b7690c23e5f112ab12cba7233fd81 (patch) | |
tree | e86d7e05dcc63cb8a7b131d757d0f6d9308aa24f /mysql-test/t/key.test | |
parent | 030587a7a62e9aa9711cbceb5c8da45cbe041eb5 (diff) | |
download | mariadb-git-68d07cbcc46b7690c23e5f112ab12cba7233fd81.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)
mysql-test/r/func_str.result:
New testfin
mysql-test/r/key.result:
New test
mysql-test/r/key_primary.result:
Update after "We didn't use 'only index' for tables of type 'const'" fix.
mysql-test/r/null_key.result:
Update after "We didn't use 'only index' for tables of type 'const'" fix.
mysql-test/r/subselect.result:
Update after "We didn't use 'only index' for tables of type 'const'" fix.
mysql-test/t/func_str.test:
Updated bug texts
Added test for conversion of long string value to integer (Bug #3472)
mysql-test/t/key.test:
Test of key read with primary key (Bug #3497)
sql/item.cc:
Added assert
sql/sql_base.cc:
Fixed crashing bug with alter table when table was in use (Bug #3643)
sql/sql_load.cc:
Indentation fixes
sql/sql_select.cc:
We didn't use 'only index' for tables of type 'const'. (Bug #3497)
Diffstat (limited to 'mysql-test/t/key.test')
-rw-r--r-- | mysql-test/t/key.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/key.test b/mysql-test/t/key.test index cdaf6062771..4fa85477318 100644 --- a/mysql-test/t/key.test +++ b/mysql-test/t/key.test @@ -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; |