HomePhabricator

Make repository identity email address association case-insensitive

Description

Make repository identity email address association case-insensitive

Summary:
Ref T13444. Currently, identities for a particular email address are queried with "LIKE" against a binary column, which makes the query case-sensitive.

  • Extract the email address into a separate "sort255" column.
  • Add a key for it.
  • Make the query a standard "IN (%Ls)" query.
  • Deal with weird cases where an email address is 10000 bytes long or full of binary junk.

Test Plan:

  • Ran migration, inspected database for general sanity.
  • Ran query script in T13444, saw it return the same hits for "git@" and "GIT@".

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13444

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