Skip to content
This repository has been archived by the owner on Aug 14, 2019. It is now read-only.

init.pl option "create index" failed #39

Open
MLKiiwy opened this issue Dec 6, 2011 · 2 comments
Open

init.pl option "create index" failed #39

MLKiiwy opened this issue Dec 6, 2011 · 2 comments
Milestone

Comments

@MLKiiwy
Copy link

MLKiiwy commented Dec 6, 2011

Hi,

I have an issue with mbzdb.
When i try to create all the index on my database, i get :

Option: 5
The most time consuming option. This will apply indexing to your already loaded
database. If using PostgreSQL, apply the index after you load the raw data because
it is faster.... if you cancel, you can safely return by running this again.
Ready to proceed? (y/n): y
CREATE UNIQUE INDEX artist_alias_idx_locale_artist ON artist_alias (artist,locale(256))
DBD::mysql::db do failed: Specified key was too long; max key length is 767 bytes at src/functions.pl line 92, line 288.
SQL: 'CREATE UNIQUE INDEX artist_alias_idx_locale_artist ON artist_alias (artist,locale(256))'

Have you an idea, on how to fix this issue ?

thx,

ML

@MLKiiwy
Copy link
Author

MLKiiwy commented Dec 30, 2011

I made a full fix for this issue, you can find here : https://github.com/MLKiiwy/mbzdb

@writexavier
Copy link

This error has to do with the charset that you are using with the innodb mysql engine. This error occurred when I was using the utf8 charset, but did not occur with the latin1 charset. This is a result of the maximum index limitation of innodb engine which is 767 bytes.

latin1 = 1 byte = 1 chararcter
uft8 = 3 byte = 1 chararcter

Switching to the latin1 charset fixed this form me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants