SQL error with MySQL 5.x: Reserved word
benthere - March 10, 2006 - 00:59
| Project: | Movie Review |
| Version: | 4.7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Emiliano |
| Status: | closed |
Jump to:
Description
Tried to install, got to the step where you import the .mysql file. Received error:
ERROR 1064 (42000) at line 1: 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 'release varchar(255) NOT NULL default '0',
tvseries int(1) NOT NULL default '0' at line 4Googled error: http://www.modwest.com/help/kb.phtml?qid=265&cat=6. Says 1064 means a reserved word was used.
That page links+redirects to http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html.
"release" is a reserved word in 5.x but apparently not in 4.1: http://dev.mysql.com/doc/refman/4.1/en/reserved-words.html
mysql -v shows my version is 5.0.18.
Solution would be to rename that field in the table.

#1
heya, ran into this while updating the module for personal use on my 4.7.0 site
if you look at the http://drupal.org/node/61872 you can find my module for 4.7.0 though be aware that i am not the developer of the module, nor am i a developer by trade.
its easy to rename the filed from "release" to "year" then open the 4.6.0 module and find all instances of 'release' being used (as opposed to mentioned in a text field like "release year") and replace with "year"
hope this helps.
#2
s0niqu3,
thanks a lot for your help. I'll check this naming stuff... I fear that 'year' may cause problems also...
#3
I just updated moviereview module and changed the field 'release' to 'releaseyear' in the moviereview table.
There's a new update.mysql file which has a command to update the table.
Thanks to everyone who helped. ;-)