Upon activating the module, I get this error:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes: CREATE TABLE {field_data_field_asset_video_file} ( `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_asset_video_file_url` VARCHAR(2048) NULL DEFAULT NULL, `field_asset_video_file_provider` VARCHAR(2048) NULL DEFAULT NULL, `field_asset_video_file_source` VARCHAR(2048) NULL DEFAULT NULL, `field_asset_video_file_snapshot` VARCHAR(255) NULL DEFAULT NULL, 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_asset_video_file_provider` (`field_asset_video_file_provider`), INDEX `field_asset_video_file_source` (`field_asset_video_file_source`), INDEX `field_asset_video_file_url` (`field_asset_video_file_url`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Data storage for field 15 (field_asset_video_file)'; Array ( ) in db_create_table() (line 2720 of /vagrant/web/includes/database/database.inc).
Related information could be found here: http://stackoverflow.com/questions/1814532/1071-specified-key-was-too-lo...
What's strange, is that it's not the first time I use this module, and never show this. And I don't think index keys names have changed recently right?
Anyone has encountered this, then fixed it?
Thanks,
Cheers,
Jérémy
Comment | File | Size | Author |
---|---|---|---|
#7 | 2297897-key-length.patch | 545 bytes | wwhurley |
#2 | asset-sql-syntax-error-2297897-2.patch | 946 bytes | kiseleva.t |
Comments
Comment #1
jchatard CreditAttribution: jchatard commentedSo this seems to be related to Innodb which has shorter indexes keys.
Will digg, because I don't want to switch to Mysam
Comment #2
kiseleva.t CreditAttribution: kiseleva.t at DrupalJedi commentedHi,
I faced with the same problem and it solved for me by attached patch.
Comment #3
IRuslan CreditAttribution: IRuslan as a volunteer and at DrupalJedi commentedComment #5
IRuslan CreditAttribution: IRuslan as a volunteer and at DrupalJedi commentedThanks for spotting this issue.
I used a bit different solution, pushed to dev.
Comment #7
wwhurley CreditAttribution: wwhurley at Forum One commentedUnfortunately this causes the following error (along with stack trace) when installing the module:
The indices must be given a length in order to be added to a TEXT field. See http://dev.mysql.com/doc/refman/5.6/en/column-indexes.html for more information. Attached is a patch that adds a 255 character index which fits within the 767 byte index length limit.
Comment #8
IRuslan CreditAttribution: IRuslan as a volunteer and at DrupalJedi commentedComment #9
IRuslan CreditAttribution: IRuslan as a volunteer and at DrupalJedi commentedComment #11
IRuslan CreditAttribution: IRuslan as a volunteer and at DrupalJedi commented@wwhurley
Thanks, very important fix.
I've also fixed the same problem within Emvideo sub-module.