diff options
author | unknown <sergefp@mysql.com> | 2004-06-24 15:52:52 +0400 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2004-06-24 15:52:52 +0400 |
commit | 69224754767cc7c14aa98e38a5cd0922278508d5 (patch) | |
tree | 93fe4d6a5ce536054600bc026d4ba1c68de3f7d2 | |
parent | 200545c5ffd49317828fcae79f87110755c6e1d3 (diff) | |
parent | 91e27b0266cf654efc364450b0d504b4b32f6a93 (diff) | |
download | mariadb-git-69224754767cc7c14aa98e38a5cd0922278508d5.tar.gz |
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-root
sql/sql_yacc.yy:
Auto merged
-rw-r--r-- | mysql-test/r/alter_table.result | 6 | ||||
-rw-r--r-- | mysql-test/t/alter_table.test | 8 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index c2ed40f3f94..1441b3c3600 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -470,3 +470,9 @@ t1 CREATE TABLE `t1` ( ALTER TABLE t1 DROP PRIMARY KEY; ERROR 42000: Can't DROP 'PRIMARY'; check that column/key exists DROP TABLE t1; +create table t1 (a int, b int, key(a)); +insert into t1 values (1,1), (2,2); +alter table t1 drop key no_such_key; +ERROR 42000: Can't DROP 'no_such_key'; check that column/key exists +alter table t1 drop key a; +drop table t1; diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index 32654bb0bc4..122dcaa6c49 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -304,3 +304,11 @@ SHOW CREATE TABLE t1; --error 1091 ALTER TABLE t1 DROP PRIMARY KEY; DROP TABLE t1; + +# BUG#3899 +create table t1 (a int, b int, key(a)); +insert into t1 values (1,1), (2,2); +--error 1091 +alter table t1 drop key no_such_key; +alter table t1 drop key a; +drop table t1; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index e79b5d86e87..e2083cbb85b 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1817,7 +1817,7 @@ alter: lex->create_info.db_type= DB_TYPE_DEFAULT; lex->create_info.default_table_charset= thd->variables.collation_database; lex->create_info.row_type= ROW_TYPE_NOT_USED; - lex->alter_info.clear(); + lex->alter_info.reset(); lex->alter_info.is_simple= 1; lex->alter_info.flags= 0; } |