If "utf8mb4" is unavailable on the client, fall back to "binary"
Fixes T11291. It appears the issue there is:
- Server which supports utf8mb4.
- Client which does not.
- The client fails to select utf8mb4 and falls back to utf8, which does not support 4-byte characters.
- Inserting 4-byte characters fails.
The fix here is to fall back to binary instead of utf8. From T11291#185523, this appears to fix the issue in an environment where it previously reproduced.
This also appears fine locally (modern client + modern server), if I force a fallback from utf8mb4.
This should be free from weird side-effects (we verify UTF8 when building queries anyway; we use binary columns on older MySQL).
We could also just fail here, but that would probably force a large set of users running old MySQL to upgrade.
- See discussion in T11291.
- Locally, forcing this fallback causes no obvious problems.
Reviewed By: chad
Maniphest Tasks: T11291
Differential Revision: https://secure.phabricator.com/D16279