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
F15464291: D20742.diff
Wed, Apr 2, 8:13 AM
F15461144: D20742.id49455.diff
Tue, Apr 1, 5:37 AM
F15436127: D20742.diff
Tue, Mar 25, 12:06 PM
F15366822: D20742.id49455.diff
Tue, Mar 11, 3:25 PM
F15334506: D20742.id49455.diff
Sat, Mar 8, 10:04 AM
F15333399: D20742.id49456.diff
Sat, Mar 8, 2:08 AM
F15333136: D20742.id.diff
Sat, Mar 8, 12:14 AM
Unknown Object (File)
Feb 25 2025, 11:19 PM
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