New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.0.33 Problems Installing with utf8mb4 and InnoDB #2020
Comments
Also detailed here |
I don't have an environment where I can duplicate this yet, but am guessing that the combination of InnoDB + utf8mb4 must have an even shorter index size limitation than MyISAM + utf8mb4. I'm assuming you don't see the same error with MyISAM + utf8mb4? But assuming the InnoDB/utf8mb4 combination adds more limitations to index size, I guess the next question would be what table/column it's coming from, and what the limitations are. I suppose I need to find an environment I can duplicate this in, as the error messages aren't clear about where the issue is occurring. But if you or @LostKobrakai have any idea, please let me know. As for |
For me it was only the caches table. I ran the code in the install.sql manually and iirc this worked without issue or I needed to change the text key lenght, not sure. |
@LostKobrakai do you see the error if you attempt to run this query manually?
I'm hoping not, not being able to have a 128 char primary key would be a problem. Also, which install.sql did you test? We've got one in /wire/core/install.sql and another in each of the site profiles, like /site-blank/install/install.sql for example. |
I think I did use the site-default one, but just notices it didn't use InnoDB on that run. But I just checked what you posted above and it did run manually without problem. |
Utf8mb4 and myisam installs well. The number of allowed characters just depends on your character set. UTF8 Since utf8bm4 is up to 4 bytes the key length should be up to 191 chars |
It seems the problem is with the indexes This is not a bug, but a (rather well known) limitation in MySQL/MariaDB. From the manual at http://dev.mysql.com/doc/refman/5.6/en/create-table.html "For CHAR, VARCHAR, BINARY, and VARBINARY columns, indexes can be created A utf8 character can use up to 3 bytes. Hence you cannot index columns or |
Ah, I'm using mariadb here as well. |
The limitation in utf8mb4 is actually 250 rather than 255 if I recall. Looks like I still had some varchar(255) in the install.sql files, which needed to be varchar(250) for utf8mb4. I have updated those and pushed that. Hopefully this fixes it but please let me know what you find. Thanks. |
Thanks, I've pushed another update that makes it use 191 when InnoDB+utf8mb4. Rather than updating the install.sql files, the installer (install.php) just does a live replacement on the SQL when executing the install queries. That way 250 will still be used when it can be, as 191 is getting a little shorter than I'd like. |
Its seems working now 👍 |
Using
A Mysql Database with
utf8mb4_general_ci
Selected
Blank
ProfileAfter selecting
utf8mb4 and InnoDB
Shows an Error
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
After sending the admin data
shows (
<db>
is the name for the database)SQLSTATE[42S02]: Base table or view not found: 1146 Table '<db>.caches' doesn't exist
And the installation can not continue.
Cheers 👍
The text was updated successfully, but these errors were encountered: