The module installs ok on my local development machine but throws the following error in a hosted environment:

DOException: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes: CREATE TABLE {field_data_field_cvm_cvm} ( `entity_type` VARCHAR(128) NOT NULL DEFAULT '' COMMENT 'The entity type this data is attached to', `bundle` VARCHAR(128) NOT NULL DEFAULT '' COMMENT 'The field instance bundle to which this row belongs, used when deleting a field instance', `deleted` TINYINT NOT NULL DEFAULT 0 COMMENT 'A boolean indicating whether this data item has been deleted', `entity_id` INT unsigned NOT NULL COMMENT 'The entity id this data is attached to', `revision_id` INT unsigned NULL DEFAULT NULL COMMENT 'The entity revision id this data is attached to, or NULL if the entity type is not versioned', `language` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'The language for this data item.', `delta` INT unsigned NOT NULL COMMENT 'The sequence number for this data item, used for multi-value fields', `field_cvm_cvm_view_mode` VARCHAR(255) NOT NULL COMMENT 'The view mode to use when context validates', `field_cvm_cvm_context` VARCHAR(255) NOT NULL COMMENT 'The context to authenticate against', PRIMARY KEY (`entity_type`, `entity_id`, `deleted`, `delta`, `language`), INDEX `entity_type` (`entity_type`), INDEX `bundle` (`bundle`), INDEX `deleted` (`deleted`), INDEX `entity_id` (`entity_id`), INDEX `revision_id` (`revision_id`), INDEX `language` (`language`), INDEX `field_cvm_cvm_view_mode` (`field_cvm_cvm_view_mode`), INDEX `field_cvm_cvm_context` (`field_cvm_cvm_context`), INDEX `field_cvm_cvm_view_context` (`field_cvm_cvm_view_mode`, `field_cvm_cvm_context`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Data storage for field 44 (field_cvm_cvm)'; Array ( ) in db_create_table() (line 2717 of /is/htdocs/wp11248269_BJ19LE475A/www/drupal7/includes/database/database.inc).

From what I learned from http://bugs.mysql.com/bug.php?id=4541 this issue is probably environment related.

Local:

  • Windows XP SP3
  • XAMPP 1.7.7
  • PHP 5.3.8
  • MySQL 5.5.16

Hosted:

  • Linux
  • PHP 5.3.27
  • MySQL 5.5.30-1~dotdeb.0-log

Frank

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Frank Ralf’s picture

Issue summary: View changes
Frank Ralf’s picture

Changing the length in cvm_field.install from 255 to 128 as suggested in the above mentioned threads seems to do the trick.

Frank Ralf’s picture

Status: Active » Needs review
FileSize
665 bytes

  • sherakama committed f253373 on 7.x-1.x authored by Frank Ralf
    Issue #2159763 by Frank Ralf: PDOException: Specified key was too long;...
sherakama’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.