SQL error 'Specified key was too long' upon installation

dxy - December 7, 2005 - 14:30
Project:Amazon associate tools
Version:4.6.x-1.x-dev
Component:Code
Category:support request
Priority:critical
Assigned:Prometheus6
Status:closed
Description

Hi,

When I feed amazon.sql of amazontools-4.6.0 to mysql, which drives my drupal site, I get the following error:

[root@portal1 modules]# /usr/local/mysql/bin/mysql --host=localhost --user=someone --password=something somedb < amazontools/amazon.sql
ERROR 1071 (42000) at line 3: Specified key was too long; max key length is 1000 bytes
[root@portal1 modules]#

The following is what I'm running drupal on:

- Red Hat Enterprise Linux ES 3
- MySQL 4.1.14 (UTF-8 as default encoding)
- Drupal-4.6.2

Would you enlighten me what's wrong with it?

Thanks,

#1

Prometheus6 - December 8, 2005 - 02:11

Sorry, it took a minute.

Seems the maximum index size is calculated in bytes rather than characters. It's the Author index of the amazonitem table.

  KEY Author (author,title)

...which, in fact is dead code...the author field is a serialized array because there can be multiple authors. You should be able to just delete the line.

#2

dxy - December 9, 2005 - 13:00

Thanks. I removed the line as advised and it worked just fine.
Thank you again for this wonderful module.

#3

Prometheus6 - December 22, 2005 - 03:37
Assigned to:Anonymous» Prometheus6
Status:active» fixed

#4

Anonymous - January 5, 2006 - 03:41
Status:fixed» closed

#5

greg.harvey - October 8, 2008 - 14:22

Good explanation here, for anyone chasing a similar issue:
http://www.calivia.com/blog/mike/mysql-innodb-specified-key-was-too-long...

 
 

Drupal is a registered trademark of Dries Buytaert.