Skip to content
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

Host column size still too big for utf8 character set #226

Open
jhindersson opened this issue May 25, 2018 · 2 comments
Open

Host column size still too big for utf8 character set #226

jhindersson opened this issue May 25, 2018 · 2 comments

Comments

@jhindersson
Copy link

The commit f8becb3 changed the host column size from 1024 to 512, when using default-character-set utf8 this is still too big and needs to be max 255.

This prevents upgrading to the latest stable released version (3.1.2 20180523).

@mandeepdhami
Copy link
Member

Why is this too big?

@jhindersson
Copy link
Author

As utf8 charset is 3 bytes per characters a 512 character size index would be 1536 bytes which is larger than the max of 767 bytes (255*3 = 765 though which is 2 bytes within margin). Actually following MySQL best practices it should use utf8mb4 which is 4 bytes per character which would limit the field further to 191 characters.

The error produced is the following:
DBError: (pymysql.err.InternalError) (1071, u'Specified key was too long; max key length is 767 bytes') [SQL: u'CREATE INDEX ix_aim_endpoint_group_static_paths_host ON aim_endpoint_group_static_paths (host)']", "stdout": "", "stdout_lines": [], "warnings": []}

Actually the value is raised in MySQL 5.7 or MariaDB 10.2 but both includes new features which breaks alembic in it's current version (0.8.10) so this might be raised but not before the builds is done using alembic version 0.9.8.

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

No branches or pull requests

2 participants