From 0eb5442fd9b42ac10848efbb1ea55e9d7da0c180 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Sep 2006 13:10:14 +0300 Subject: [PATCH] Bug #21772: can not name a column 'upgrade' when create a table in version 5.0.24 Upgrade was a reserved word. Unreserve UPGRADE so it can be used in unquoted identifiers. mysql-test/r/create.result: Bug #21772: can not name a column 'upgrade' when create a table in version 5.0.24 - test case mysql-test/t/create.test: Bug #21772: can not name a column 'upgrade' when create a table in version 5.0.24 - test case sql/sql_yacc.yy: Bug #21772: can not name a column 'upgrade' when create a table in version 5.0.24 - unreserve UPGRADE. --- mysql-test/r/create.result | 2 ++ mysql-test/t/create.test | 6 ++++++ sql/sql_yacc.yy | 1 + 3 files changed, 9 insertions(+) diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 3f8083a0e20..5f885ad199b 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -773,3 +773,5 @@ Warnings: Warning 1071 Specified key was too long; max key length is 765 bytes insert into t1 values('aaa'); drop table t1; +create table t1 (upgrade int); +drop table t1; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 07edbf206fe..db73782fdbf 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -674,4 +674,10 @@ create table t1(f1 varchar(800) binary not null, key(f1)) engine = innodb insert into t1 values('aaa'); drop table t1; +# +# Bug#21772: can not name a column 'upgrade' when create a table +# +create table t1 (upgrade int); +drop table t1; + # End of 5.0 tests diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index aee810e75ad..97f6cdd27e4 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -7555,6 +7555,7 @@ keyword: | TRUNCATE_SYM {} | UNICODE_SYM {} | XA_SYM {} + | UPGRADE_SYM {} ; /*