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,

Comments

Prometheus6’s picture

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.

dxy’s picture

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

Prometheus6’s picture

Assigned: Unassigned » Prometheus6
Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)
greg.harvey’s picture

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