Bug #14603 | Cannot use table named 'release' | ||
---|---|---|---|
Submitted: | 3 Nov 2005 11:52 | Modified: | 3 Nov 2005 12:01 |
Reporter: | Jim Bennett | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.15 | OS: | Windows (XP) |
Assigned to: | CPU Architecture: | Any |
[3 Nov 2005 11:52]
Jim Bennett
[3 Nov 2005 12: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.0/en/reserved-words.html). RELEASE is one of MySQL's reserved words. It can be used as a name, but must be qouted properly: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 5.0.15-nt Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> use test; Database changed mysql> CREATE TABLE `release` ( -> `ID` smallint(5) unsigned NOT NULL auto_increment, -> `ReleaseTime` datetime NOT NULL default '0000-00-00 00:00:00', -> PRIMARY KEY (`ID`) -> ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Query OK, 0 rows affected (0.24 sec) mysql> show tables like 're%'; +----------------------+ | Tables_in_test (re%) | +----------------------+ | release | +----------------------+ 1 row in set (0.02 sec) mysql> desc release; 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 'release' at line 1 mysql> desc `release`; +-------------+----------------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+----------------------+------+-----+---------------------+----------------+ | ID | smallint(5) unsigned | NO | PRI | NULL | auto_increment | | ReleaseTime | datetime | NO | | 0000-00-00 00:00:00 | | +-------------+----------------------+------+-----+---------------------+----------------+ 2 rows in set (0.07 sec)