Bug #21772 can not name a column 'upgrade' when create a table in version 5.0.24
Submitted: 22 Aug 2006 7:28 Modified: 21 Sep 2006 1:45
Reporter: hua wei Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.24 OS:Linux (centos 4.3 linux)
Assigned to: Georgi Kodinov CPU Architecture:Any
Tags: CREATE TABLE, upgrade

[22 Aug 2006 7:28] hua wei
create table xxxx (upgrade int);
this will fail in version 5.0.24 and you get a error message:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'upgrade int)' at line 1

create table xxxx (upgradex int);
this will succeed.

in version 5.0.15, there is no such error.

How to repeat:
use the following to create a table.

create table xxxx (upgrade int);
[22 Aug 2006 8:28] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Please, carefully read http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html
[24 Aug 2006 9:43] Sergei Golubchik
Why "UPGRADE" must be a reserved word ?
If there's no good reason for it, we should un-reserve it.
[8 Sep 2006 10:10] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:


ChangeSet@1.2261, 2006-09-08 13:10:14+03:00, gkodinov@macbook.gmz +3 -0
  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.
[8 Sep 2006 17:15] Marc ALFF
Also verified that UPGRADE is not a keyword in SQL-2003.

Patch approved.
[19 Sep 2006 8:33] Georgi Kodinov
Pushed into 5.0.26/5.1.12-beta
[21 Sep 2006 1:45] Paul DuBois
Noted in 5.0.26, 5.1.12 changelogs.

UPGRADE was treated as a reserved word, although it is not.