"types" is a reserved keyword as of MySQL 4.x.x. See http://drupal.org/node/view/1612.

Comments

marco’s picture

Assigned: Unassigned » marco
Priority: Critical » Normal

This is a problem in MySQL 4.1.x only, which is alpha at the moment, while it doesn't seem to be a problem in MySQL 4.0.x, currently in production.
This can be fixed changing the field name as suggested by Ax, or using double quotes.

I lower the priority and wait for some feedback on the best way to fix (renaming or double quotes)

Dries’s picture

I assume that using double quotes is a MySQL-ism and not ANSI SQL?

marco’s picture

Double quotes is ANSI, but works in MySQL only in ANSI Mode. In standard mode you must use backticks, which is not ANSI.
So it seems table renaming is the only portable solution.

moshe weitzman’s picture

fixed with a table rename. now in CVS. thanks marco

Anonymous’s picture

marco’s picture

it has not been committed yet, I re-open

al’s picture

Title: "Types" is a reserved keyword as of MySQL 4.x.x » Types is a reserved keyword as of MySQL 4.1.x

I think this has been fixed:
al@drupal:~/drupal/drupal> grep types database/database.mysql
Can someone please confirm and CLOSE this?

killes@www.drop.org’s picture

Confirmed, did not find "types" in sql-statement in core.