Page MenuHomePhabricator

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

Authored by epriestley on Aug 27 2019, 10:33 PM.
Tags
None
Referenced Files
F18685505: D20742.diff
Fri, Sep 26, 11:09 AM
F18657689: D20742.diff
Tue, Sep 23, 2:55 AM
F18644973: D20742.id49455.diff
Fri, Sep 19, 6:36 AM
F18612754: D20742.id49456.diff
Sep 14 2025, 9:51 AM
F18599704: D20742.diff
Sep 13 2025, 8:01 AM
F18571591: D20742.id49455.diff
Sep 10 2025, 5:11 AM
F18570546: D20742.id49456.diff
Sep 10 2025, 3:54 AM
F18570544: D20742.id49455.diff
Sep 10 2025, 3:54 AM
Subscribers
None

Details

Summary

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

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable