-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Problems with some ACL tables and utf8mb4 encoding #7
Comments
👍 Getting this error as well. Downgrading temporarily back to utf8 for a quick fix/restore. |
Me too. Need to set a limit to the index length for mysql since utf8mb4 200 character string is 800 bytes and max index is 767 bytes.
Fix is in /vendor/symfony/security-acl/Dbal/Schema.php line 70 Or use utf8 until it is fixed. |
Another solution which works for me, ensure :
which gives in my.cnf :
in config.yml, add dynamic (or compress) row format to dbal default_table_options:
|
Same issue, for now just switched back to utf8. |
@fabpot How about this being solved? 🤔 |
@fabpot Same issue for me |
Same issue here, does anyone already solved? Unfortunately, a downgrade is not an option. |
did you ever find a solution for this? |
see symfony/symfony#14560 for the previous discussion
I'm in the process of converting our database from 'utf8' to 'utf8mb4' to support 4-byte unicode chars (emojis for example) and running the conversion queries a problem shows up with the length of some unique keys in the ACL schema which I can't control myself (well, of course I can but then in every migration I make afterwards these will come up and try to revert any ALTER TABLE I make to these tables)
By default InnoDB can have a maximum index size of 767 bytes. With utf8 encoding, which uses at most 3 bytes per char, you get 255 characters. But in utf8mb4 you now can only index string columns with at most 191 characters. This InnoDB setting can be changed but you have to change all the database and table file formats (see http://mechanics.flite.com/blog/2014/07/29/using-innodb-large-prefix-to-avoid-error-1071/).
So my question would be if the default string lengths of 200 chars that the
acl_security_identities
andacl_classes
unique keys have could be tuned to 191 chars, it's only 9 chars less, I guess it would not be a big problem.Thanks!
The text was updated successfully, but these errors were encountered: