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)
Tue, Jan 21, 10:31 AM
Unknown Object (File)
Wed, Dec 25, 2:23 PM
Unknown Object (File)
Dec 15 2024, 5:44 PM
Unknown Object (File)
Dec 9 2024, 4:37 PM
Unknown Object (File)
Nov 28 2024, 4:41 PM
Unknown Object (File)
Nov 25 2024, 5:51 AM
Unknown Object (File)
Nov 24 2024, 8:46 PM
Unknown Object (File)
Nov 21 2024, 7:38 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