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
Core schema changes to accommodate utf8mb4 index length limits #1596
Conversation
bf9a0d2
to
0798f61
Compare
0798f61
to
06a8319
Compare
In phpmyadmin, on the sessions table it will not allow varchar(256) with InnoDB, even with utf8_general_ci (10.1.29-MariaDB). |
Some reading I've done further suggests it may require MySQL higher than 5.7.7 or MariaDB higher than 10.2.2 What error message/s do you get? |
I note the ZC156 installer appears to complete successfully despite having failed to create this table: no error flagged (subsequently the admin login fails with a debug). |
Did I "get" that the It's frustrating that zc_install doesn't seem to be getting flagged about the error. Grrr. |
Puzzling I have mariadb 10.2.12 installed, so my testing results are a bit different. |
I've installed ZC158 many times on Xampp having created the DB with This is php 7.4.16, mysql 5.7.24. |
MySQL has significantly tinier capacity (1000) than MariaDB does (over 3000) on index lengths. The issue is that if you want to support mb4 on MySQL then you can NEVER have columns longer than 250 characters, because each character requires 4 bytes. 250 * 4 = 1000 which is MySQL's maximum index size. The problem is compounded many times over when indexing multiple columns. There are some options:
For v158 I've reverted the default install to use a shorter length. |
Note: the cases where the field length was changed instead of the index are either primary keys or fields whose length can afford to be shorter.
Supporting 256 chars in db requires MySQL 5.0.3 or newer.