Bug #28383 | A table named 'div' | ||
---|---|---|---|
Submitted: | 11 May 2007 19:23 | Modified: | 11 May 2007 21:52 |
Reporter: | Simon Forsberg | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | OS: | Linux (Debian) | |
Assigned to: | CPU Architecture: | Any |
[11 May 2007 19:23]
Simon Forsberg
[11 May 2007 20:53]
Paul DuBois
Because DIV is now a reserved word, you can use it as an identifier by quoting it as `DIV`. Each manual has a section that indicates which words are new reserved words for the MySQL series to which the manual applies: http://dev.mysql.com/doc/refman/4.1/en/reserved-words.html http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html These sections also discuss the identifier-quoting rules.
[11 May 2007 21:52]
MySQL Verification Team
Thank you for the bug report. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.0.42-debug Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> create table `div` (id serial); Query OK, 0 rows affected (0.02 sec) mysql> insert into `div` values (null); Query OK, 1 row affected (0.00 sec) mysql> select * from `div`; +----+ | id | +----+ | 1 | +----+ 1 row in set (0.00 sec) mysql> rename table `div` to div2; Query OK, 0 rows affected (0.00 sec) mysql> select * from div2; +----+ | id | +----+ | 1 | +----+ 1 row in set (0.00 sec) mysql>