Bug #18619 Unable to create table with a column named "release"
Submitted: 29 Mar 2006 15:49 Modified: 29 Mar 2006 16:01
Reporter: Sullivan Beck Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.5 OS:FreeBSD (FreeBSD)
Assigned to: CPU Architecture:Any

[29 Mar 2006 15:49] Sullivan Beck
Description:
The following SQL command fails:

CREATE TABLE foo (
  release varchar(10) NOT NULL default 'foo',
  params text
);

If I rename the column (i.e. change "release" to "drelease"), it works. It's possible that other column names will fail, but this is the only one I've found.

I have not had time to try the newest 5.1.x release (I'm using a binary package and the newest one isn't available at this time).

How to repeat:
See description.

Suggested fix:
Not available.
[29 Mar 2006 16:01] Valeriy Kravchuk
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

Please, read the manual, http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html. RELEASE is listed as a reserved word there. You have to quote it, like `release`.