Page MenuHomePhabricator

When "utf8mb4" is available, use it as the default client charset when invoking standalone "mysql" commands

Authored by epriestley on Aug 27 2019, 10:33 PM.



Fixes T13390. We have some old code which doesn't dynamically select between "utf8mb4" and "utf8". This can lead to dumping utf8mb4 data over a utf8 connection in bin/storage dump, which possibly corrupts some emoji/whales.

Instead, prefer "utf8mb4" if it's available.

Test Plan

Ran bin/storage dump and bin/storage shell, saw sub-commands select utf8mb4 as the client charset.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Aug 27 2019, 10:33 PM
epriestley requested review of this revision.Aug 27 2019, 10:35 PM
This revision was not accepted when it landed; it landed in state Needs Review.Aug 27 2019, 11:36 PM
This revision was automatically updated to reflect the committed changes.