Errors when enabling the module

webchick - July 8, 2008 - 23:46
Project:Document Import API
Version:6.x-2.0-alpha2
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs work
Description

I get this when enabling the module:

user warning: Specified key was too long; max key length is 1000 bytes query: CREATE TABLE docapi_library ( `doc_id` INT unsigned NOT NULL auto_increment, `plugin_id` INT unsigned NOT NULL, `uid` INT unsigned NOT NULL, `filemime` VARCHAR(255) NOT NULL DEFAULT 'text/plain', `filename` VARCHAR(255) NOT NULL DEFAULT '', `filepath` VARCHAR(255) NOT NULL, `filesize` INT unsigned NOT NULL, `created` DATETIME NOT NULL, `changed` DATETIME NOT NULL, PRIMARY KEY (doc_id), INDEX filepathfilename (filepath, filename) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /Applications/MAMP/htdocs/soc6x/includes/database.inc on line 509.

#1

bradfordcp - July 9, 2008 - 12:09

I think this depends on the settings of your MySQL server, but as a precaution I will trim down the length of the name on the key on line 75 of docapi.install. Thanks!

#2

bradfordcp - July 9, 2008 - 13:12
Status:active» fixed

I have created a new release with the fix in place. Please see ALPHA2 located at http://drupal.org/node/280342

#3

agentrickard - July 9, 2008 - 20:10

This is a weird core limitation of MySQL. I'm surprised we haven't been bitten by it. SchemaAPI might want to handle some of this.

See http://bugs.mysql.com/bug.php?id=4541

#4

agentrickard - July 9, 2008 - 20:24
Status:fixed» needs work

Here's the corrected schema.

      'indexes' => array(
        'filepath' => array('filepath'),
        'filename' => array('filename'),
      ),

      'indexes' => array(
        'plugin_id' => array('plugin_id'),
        'mimetype' => array('mimetype'),
      ),

Unless we are not doing lookups on these columns, in which case, the indexes are ot necessary.

#5

webchick - July 9, 2008 - 20:54

I disabled, uninstalled, cvs upped, reinstalled, and same error still.

#6

agentrickard - July 9, 2008 - 22:29

Alpha2 had the same issue. See #4 for a fix. Schema update pending tomorrow.

#7

vojnar - September 21, 2008 - 15:08

This problem still exists!!!
What do we have to do step by step to fix this issue?

Rgards,
Gabor

#8

adam_b - November 7, 2008 - 17:35
Version:6.x-2.x-dev» 6.x-2.0-alpha2

I'm having the same problem using Alpha2 - any progress, please?

 
 

Drupal is a registered trademark of Dries Buytaert.