Closed (fixed)
Project:
Drupal core
Version:
4.6.3
Component:
database system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Apr 2005 at 03:44 UTC
Updated:
2 Aug 2006 at 12:41 UTC
when installing drupal, i get a wierd error.
com4@antitech:~/drupal$ /usr/local/mysql/bin/mysql -u jason -p jason < database/database.mysql
Enter password:
ERROR 1064 at line 120: 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 'types text NOT NULL
) TYPE=MyISAM' at line 11
com4@antitech:~/drupal$ /usr/local/mysql/bin/mysql --version
/usr/local/mysql/bin/mysql Ver 14.3 Distrib 4.1.1-alpha, for intel-linux (i686)
i noticed that if i changed 'types' to 'type' it wouldn't freak out. that'll obviously break drupal though, so i'm not quite sure what's going on.
Comments
Comment #1
com4 commentedhttp://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/Reserved_words.html
Note types is on the list.
If you continue reading Martin Francis replies "The way around this is to place backticks (`name`) around the table name and relevant column names"
So, I guess the fix would be to change the line from types text NOT NULL to `types` text NOT NULL on line 130 of database.mysql.
Comment #2
ezheidtmann commentedI have no trouble with mysql server version 4.0.24_Debian-2-log. This seems to be an early warning before 4.1 becomes popular.
Comment #3
com4 commentedYeah. I guess this is what I get for using alpha. ;)
I post though to also note that you need to change types in the sql insert statements in the various modules to `types` with the backticks. This is a gimmie, but maybe someone will benifit from the "tip".
Comment #4
danielc commented> I guess this is what I get for using alpha.
You do realize that the 4.1 series of MySQL is is up to version sub-version 11 (4.1.11). 1-alpha is over a year old and has vulnerabilities in it.
Comment #5
dries commentedPlease provide (i) a patch that (ii) has been tested. Marking this active.
Comment #6
killes@www.drop.org commentedStill valid.
Comment #7
tostinni commentedTypes column doesn't exists anymore in CVS, bringing issue back to 4.6.3
Also, I had an install on MySQL 4.1.12 of Drupal 4.6.3 without any problem.
Should we still consider this as a bug ?
Comment #8
jax commentedThe mysql documentation referred to by the first followup is outdated and probably was only relevant for that specific alpha version. If you look at the current documentation for MySQL 4.1 and 5, the TYPES word is no longer reserved and thus doesn't need to be enclosed in backticks.
http://dev.mysql.com/doc/refman/4.1/en/reserved-words.html
http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html