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
F19045400: D20742.id.diff
Thu, Nov 27, 7:24 AM
F18949172: D20742.diff
Nov 12 2025, 12:32 AM
F18840040: D20742.id49456.diff
Oct 27 2025, 8:41 PM
F18837764: D20742.diff
Oct 27 2025, 7:36 AM
F18830557: D20742.id.diff
Oct 25 2025, 7:24 AM
F18826314: D20742.diff
Oct 24 2025, 3:25 AM
F18685505: D20742.diff
Sep 26 2025, 11:09 AM
F18657689: D20742.diff
Sep 23 2025, 2:55 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