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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next DB schema : use utf8mb4 ? #2226

Open
ozh opened this Issue Apr 17, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@ozh
Member

ozh commented Apr 17, 2017

We should probably move from utf8 to utf8mb4 for yourls_url at least, to support emojis and other 馃挬

However this will make the upgrade routine more complex because maximum length of columns and index keys will be affected. See migration notes on https://mathiasbynens.be/notes/mysql-utf8mb4

At least we should probably decrease the maximum length of yourls_url.keyword to something like 150 instead of 200, to make sure folks on InnoDB without innodb_large_prefix are not affected.

Background story on this issue: #2115 and #2125

@ozh ozh added this to the 2.0 milestone Apr 17, 2017

@ozh ozh self-assigned this Apr 17, 2017

@Showfom

This comment has been minimized.

Show comment
Hide comment
@Showfom

Showfom Apr 18, 2017

I already use utf8mb4 with no problem, but not tested with emoji

Showfom commented Apr 18, 2017

I already use utf8mb4 with no problem, but not tested with emoji

@master3395

This comment has been minimized.

Show comment
Hide comment
@master3395

master3395 May 14, 2017

Contributor

I am running yourls latest version with utf8mb4_unicode_ci
0 problems.

Contributor

master3395 commented May 14, 2017

I am running yourls latest version with utf8mb4_unicode_ci
0 problems.

@ozh

This comment has been minimized.

Show comment
Hide comment
@ozh

ozh Aug 19, 2017

Member

A couple stats & facts for later

  • utf8mb4 requires MySQL 5.5.3 (released in early 2010)
  • 5.9% of installs used over the 6 months use an older mysql engine (6,5% over the last 12 months, 16,8% of all installs since the beginning, but only 3.7% of installs running 1.7.2, which is latest stable as of writing, and presumably used by folks who are keen to update their install)
Member

ozh commented Aug 19, 2017

A couple stats & facts for later

  • utf8mb4 requires MySQL 5.5.3 (released in early 2010)
  • 5.9% of installs used over the 6 months use an older mysql engine (6,5% over the last 12 months, 16,8% of all installs since the beginning, but only 3.7% of installs running 1.7.2, which is latest stable as of writing, and presumably used by folks who are keen to update their install)
@ozh

This comment has been minimized.

Show comment
Hide comment
@ozh

ozh Aug 19, 2017

Member

Ponder this option : enforce charset utf8mb4 is the engine has the capability, enforce utf8 otherwise. See wpdb::has_cap() for instance.

Member

ozh commented Aug 19, 2017

Ponder this option : enforce charset utf8mb4 is the engine has the capability, enforce utf8 otherwise. See wpdb::has_cap() for instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment