Bug #37112 Server accepts VALUE() syntax as well as VALUES()
Submitted: 31 May 2008 0:29 Modified: 12 Jun 2008 16:26
Reporter: Baron Schwartz (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.0.45, 4.1, 5.1, 6.0-BK OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[31 May 2008 0:29] Baron Schwartz
Description:
http://dev.mysql.com/doc/refman/5.0/en/insert.html says

INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]
    [INTO] tbl_name [(col_name,...)]
    VALUES ({expr | DEFAULT},...),(...),...

But VALUE() is also accepted.  Interestingly it is not accepted in the ON DUPLICATE KEY UPDATE clause.

How to repeat:
mysql> create table a(a int);
Query OK, 0 rows affected (0.20 sec)

mysql> insert into a(a) value(5);
Query OK, 1 row affected (0.06 sec)

mysql> insert into a(a) value(5), (6);
Query OK, 2 rows affected (0.07 sec)
Records: 2  Duplicates: 0  Warnings: 0

mysql> insert into a(a) values(5) on duplicate key update a=value(a);
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 '(a)' at line 1
[31 May 2008 14:44] Sveta Smirnova
Thank you for the report.

Verified as described.
[12 Jun 2008 16:26] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.
[16 Jun 2008 21:54] Paul DuBois
This syntax also works for REPLACE.