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

com4’s picture

http://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.

ezheidtmann’s picture

I 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.

com4’s picture

Yeah. 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".

danielc’s picture

> 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.

Dries’s picture

Please provide (i) a patch that (ii) has been tested. Marking this active.

killes@www.drop.org’s picture

Version: 4.6.0 » x.y.z

Still valid.

tostinni’s picture

Version: x.y.z » 4.6.3

Types 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 ?

Jax’s picture

Status: Active » Closed (fixed)

The 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