Bug #14167 | column name "show" causes sql query fail if used in WHERE causule | ||
---|---|---|---|
Submitted: | 20 Oct 2005 8:10 | Modified: | 20 Oct 2005 8:50 |
Reporter: | Marek Cevelicek | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | OS: | Windows (windows xp sp2) | |
Assigned to: | CPU Architecture: | Any |
[20 Oct 2005 8:10]
Marek Cevelicek
[20 Oct 2005 8:44]
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: Read the manual (http://dev.mysql.com/doc/refman/4.1/en/reserved-words.html), please. This is how it works: mysql> create table tt (c1 int, show int); 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 'showint)' at line 1 mysql> create table tt (c1 int, `show` int); Query OK, 0 rows affected (0,02 sec) mysql> insert into tt values(1, 1); Query OK, 1 row affected (0,11 sec) mysql> select * from tt; +------+------+ | c1 | show | +------+------+ | 1 | 1 | +------+------+ 1 row in set (0,00 sec) mysql> select * from tt where show = 1; 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 'show = 1' at line 1 mysql> select * from tt where `show` = 1; +------+------+ | c1 | show | +------+------+ | 1 | 1 | +------+------+ 1 row in set (0,07 sec)
[20 Oct 2005 8:44]
Vasily Kishkin
Could you please provide table definition of "news"?
[20 Oct 2005 8:50]
Vasily Kishkin
Sorry. Valery has already verified the bug.