Download & Extend

"TYPES" is not a legal field name table "BLOCKS"

Project:Drupal core
Version:x.y.z
Component:block.module
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

There was a "TYPES" field added to the BLOCKS table. MySQL does not like this; "types" is considered a reserved word. (MySQL-server-4.1.0-0) The field name needs to be changed to something else.

Comments

#1

here's a patch

AttachmentSizeStatusTest resultOperations
types.diff3.51 KBIgnored: Check issue status.NoneNone

#2

Changing Status to patch.

I guess we didn't catch this - the field wasn't orginally called types. Good eye.

andre

#3

I suggest we name this field 'nodes'. Also, we'll need an upgrade path for those who are running CVS HEAD.

#4

I'm a bit confused by this. The word "types" doesn't show up here:
http://dev.mysql.com/doc/mysql/en/reserved-words.html

#5

I remembered seeing it here: http://drupal.org/node/2497 If this is incorrect, then the documentation needs to be changed.

But all in all, nodes isn't a bad idea - I can submit a patch along with the upgrade path if 'types' is indeed a reserved word in either mySQL or pgSQL.

andre

#6

"TYPES" /is/ a reserved word in mysql 4.1.0 and 4.1.1. it doesn't show up at http://dev.mysql.com/doc/mysql/en/reserved-words.html because it isn't reserved anymore since some point release later. it isn't even documented in the mysql changelog that it has ever been a reserved word ...

once again the suggestion to get rid of sql reserved words issues once and for all

#7

I'll submit a patch later today to use the word 'nodes' in block - along with the database upgrade path.

andre

#8

Here is the patch to block.module

AttachmentSizeStatusTest resultOperations
block_module_7.patch1.69 KBIgnored: Check issue status.NoneNone

#9

And the db files and upgrade path.

AttachmentSizeStatusTest resultOperations
blocks_db_change_5.patch1.79 KBIgnored: Check issue status.NoneNone

#10

Status:needs review» closed (fixed)

This column has been removed by http://drupal.org/node/21353. See differences at http://cvs.drupal.org/viewcvs/drupal/drupal/database/database.mysql?r1=1....

nobody click here