Page MenuHomePhabricator

Support key schemata and column nullability
ClosedPublic

Authored by epriestley on Sep 15 2014, 6:18 PM.
Tags
None
Referenced Files
F14043222: D10499.id25233.diff
Tue, Nov 12, 8:25 AM
F14019692: D10499.id25268.diff
Tue, Nov 5, 11:27 PM
F14017149: D10499.id25269.diff
Mon, Nov 4, 2:26 PM
F14017100: D10499.id25233.diff
Mon, Nov 4, 2:19 PM
F14009553: D10499.id.diff
Wed, Oct 30, 7:55 PM
F13996811: D10499.id25268.diff
Thu, Oct 24, 12:06 AM
F13990130: D10499.id.diff
Tue, Oct 22, 1:30 AM
F13981182: D10499.id.diff
Oct 19 2024, 2:46 PM
Subscribers

Details

Summary

Ref T1191. The major issue motivation here is that InnoDB keys have a maximum length of 767 bytes. When we move utf8 colums to utf8mb4 columns, they'll jump from 3 bytes per character to 4 bytes per character, which may make some indexes too long. Add key schema to help spot this.

Also add nullability since it doesn't hurt.

Test Plan

See screenshots.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Support key schemata and column nullability.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.

You forgot the screenshots of testage. (NBD for me but if you have 'em handy maybe add 'em for completeness sake?)

src/applications/config/controller/PhabricatorConfigDatabaseController.php
408

767 ==> self::MAX_INNODB_KEY_LENGTH or something?

This revision is now accepted and ready to land.Sep 16 2014, 6:39 PM

Oh, derp. I think I just deleted them locally. Let me grab some fresh ones -- nothing too exciting, but they help fill in the picture.

Couple of screenshots:

Screen_Shot_2014-09-18_at_8.26.30_AM.png (1×1 px, 283 KB)

Notable part here is highlighting the too-long key, which makes it easier to spot this stuff before we commit to migrating any actual data. This helped identify T6098 / T6099 (and probably a bunch of others by the time all the schemata are set up).

Screen_Shot_2014-09-18_at_8.27.30_AM.png (1×1 px, 238 KB)

epriestley edited edge metadata.
  • Use a constant for the InnoDB magic number.
This revision was automatically updated to reflect the committed changes.