Bug #13696 using the word lock as a field name causes error
Submitted: 3 Oct 2005 3:42 Modified: 3 Oct 2005 16:44
Reporter: Robert McKee Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:1.0.6 OS:Microsoft Windows (XP)
Assigned to: Reggie Burnett CPU Architecture:Any

[3 Oct 2005 3:42] Robert McKee
Description:
Doesn't work. Even enclosing lock with []'s gives the same errors. Stumped me for a few hours.  Gives an error of invalid SQL syntax near lock) VALUES (?l).

How to repeat:
MySqlConnection1.Open() 
c.CommandText = "INSERT INTO test(lock) VALUES (?l)" 
c.Parameters.Add("?l", "123") 
c.Parameters("?l").Value = "Hello" 
c.Connection = MySqlConnection1 
c.ExecuteNonQuery()
[3 Oct 2005 7:48] Valeriy Kravchuk
What version of MySQL server do you use? There were problems with some specific names, like nu (nul) on Windows platform in many versions of MySQL...
[3 Oct 2005 16:44] Reggie Burnett
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:

lock is not allowed in a sql statement.  Use `lock` and it will work (verified with 1.0.6)