Homec4science

Correct column mutations for old versions of MySQL

Authored by epriestley <git@epriestley.com> on Oct 2 2014, 23:44.

Description

Correct column mutations for old versions of MySQL

Summary:
Ref T1191. Although I fixed some of the mutations earlier (in D10598), I missed the column mutations under old versions of MySQL. In particular, this isn't valid:

  • ALTER TABLE ... MODIFY columnName VARCHAR(64) COLLATE binary

Issue the permitted version of this instead, which is:

  • ALTER TABLE ... MODIFY columnName VARBINARY(64)

Also fixed an issue where a clean schema had the wrong nullability for a column in the draft table. Force it to the expected nullability.

The other trick here is around the one column with a FULLTEXT index on it, which needs a little massaging.

Test Plan:

  • Forced my local install to return false for utf8mb4 support.
  • Did a clean adjust into binary columns.
  • Poked around, added emoji to things.
  • Reverted the fake check and did a clean adjust into utf8mb4 columns.
  • Emoji survived.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: fabe, epriestley

Maniphest Tasks: T1191

Differential Revision: https://secure.phabricator.com/D10627

Details

Committed
epriestley <git@epriestley.com>Oct 2 2014, 23:44
Pushed
aubortJan 31 2017, 17:16
Parents
rPHe333017c3e32: Strip email signatures from Mailbox
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHd67b7f0f47c4: Correct column mutations for old versions of MySQL (authored by epriestley <git@epriestley.com>).Oct 2 2014, 23:44