Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Use uft8mb4 to support 4-byte unicode characters #6197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tiwillia
Copy link
Member

Bug 1186681
https://bugzilla.redhat.com/show_bug.cgi?id=1186681
The utf8 character encoding in mysql supports unicode characters with 1-3 bytes. 4-byte unicode characters such as emojis require utf8mb4 encoding in mysql.

Fixes #6169

Since the encoding is set for a database in post_install, this update shouldn't interfere with existing mysql cartridges.

This pr also adds several environment variables. These are to set a default character set for client and server as well as to set a collation server and whether a client can specify a character set to use with its connection.

Bug 1186681
https://bugzilla.redhat.com/show_bug.cgi?id=1186681
The utf8 character encoding in mysql supports unicode characters with 1-3 bytes. 4-byte unicode characters such as emojis require utf8mb4 encoding in mysql.
@tiwillia
Copy link
Member Author

@mfojtik could you review? (you are listed as the mysql sme, lmk if I should ping someone else)

I'm unsure about the defaults in the my.cnf.erb file and whether these will impact existing mysql cartridges.

@mfojtik
Copy link
Contributor

mfojtik commented Jul 16, 2015

@tiwillia can you try to create app with current config (or tweak the setting back to current default), create some sample data and then switch it to utf8mb4?

I guess I will want to see prove that this change won't explode data in existing databases :-)

@tiwillia
Copy link
Member Author

Since the database is created in post_install, the only change an existing application will see is additional configuration directives in ~/mysql/conf/my.cnf. I can verify that these changes don't explode or inhibit an existing database. I can still use the database, access it through mysql, and do a mysqldump.

However, I found an issue creating a rails application using the utf8mb4 type that might be an issue. Reviewing now, going to go ahead and [test][extended:cartridge]

@openshift-bot
Copy link

@openshift-bot
Copy link

Evaluated for online test up to 010399e

@openshift-bot
Copy link

openshift-bot commented Jan 30, 2016

Online Action Required: Pull request cannot be automatically merged, please rebase your branch from latest HEAD and push again

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

Successfully merging this pull request may close these issues.

3 participants