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
Unknown Object (File)
May 9 2025, 4:50 PM
Unknown Object (File)
Apr 23 2025, 3:30 PM
Unknown Object (File)
Apr 8 2025, 4:55 PM
Unknown Object (File)
Apr 2 2025, 8:13 AM
Unknown Object (File)
Apr 1 2025, 5:37 AM
Unknown Object (File)
Mar 25 2025, 12:06 PM
Unknown Object (File)
Mar 11 2025, 3:25 PM
Unknown Object (File)
Mar 8 2025, 10:04 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