When enabling this module, I got the following error:

WD php: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max[error]
key length is 767 bytes: CREATE TABLE {autocache_cache_url_table} (
`cid` VARCHAR(250) NOT NULL COMMENT 'Cache identifier',
`url` VARCHAR(1000) NOT NULL COMMENT 'Path to clear',
INDEX `main` (`cid`, `url`)
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'CID to URL'; Array
(
)
 in db_create_table() (line 2720 of /Users/pat/Sites/CommonMedia/ODPHP/site/includes/database/database.inc).

I tried SET @@global.innodb_large_prefix = 1;, but still got an error when I tried to install: Specified key was too long; max key length is 3072 bytes

Comments

pdcarto’s picture

Status: Active » Needs review
StatusFileSize
new819 bytes

Looks like this table with the too-long index is deleted by a later update hook. So this patch just removes it from hook_schema.

blakefrederick’s picture

Exactly what I needed. Thanks pdcarto!

  • tcmug committed 773cf85 on 7.x-1.x authored by pdcarto
    Issue #2349109 by pdcarto: Can't install on InnoDB due to key length...
tcmug’s picture

Thank you!

Committed and pushed out a new release for this.

tcmug’s picture

Status: Needs review » Closed (fixed)