error in query on MySQL reserved words

Support Ticket

+status
closed
+tags
 

Just set up a local Wagn to test, and ran into an error when adding a new +card to a User card. Getting a:

Mysql::Error: 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 'key = 'foo_user')  LIMIT 1' at line 1: SELECT * FROM `cards` WHERE (key = 'foo_user')  LIMIT 1

Seems like 'key' is a reserved MySQL word; (Surrounding 'key' with backticks in the query seems to circumvent this problem).

See http://wiki.rubyonrails.org/rails/pages/ReservedWords#other_names_reported_to_have_caused_trouble.  Is there any quick fix for this? (apart from changing the db scheme :P )

 

resolved after upgrade to 1.1