From 31e1653a4e45bc77fc5c6dfa126efa9b45f0010c Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 11 Aug 2014 12:29:46 -0700 Subject: [PATCH] Convert `pushlog` and `refcursor` to BLOB storage Summary: Fixes T5840. Some time ago I incorrectly believed that `latin1_bin` collation was synonymous with "binary". It is not, and does not permit UTF8 characters outside of BMP, among other sequences. These two tables currently have `LONGTEXT` columns which should be `LONGBLOB`. The table design is explicilty intended to accommodate invalid/unreasonably long ref names, but the collation prevents this from working properly. After T1191, we'll have a general system for resolving this, but a user hit an issue yesterday (T5840) with a brnach name containing Chinese characters. Test Plan: - Tried emoji inserts into both tables, was rebuffed. - Ran migration. - Performed emoji inserts into both tables. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T5840 Differential Revision: https://secure.phabricator.com/D10217 --- resources/sql/autopatches/20140811.blob.1.sql | 2 ++ resources/sql/autopatches/20140811.blob.2.sql | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 resources/sql/autopatches/20140811.blob.1.sql create mode 100644 resources/sql/autopatches/20140811.blob.2.sql diff --git a/resources/sql/autopatches/20140811.blob.1.sql b/resources/sql/autopatches/20140811.blob.1.sql new file mode 100644 index 0000000000..059adc1df4 --- /dev/null +++ b/resources/sql/autopatches/20140811.blob.1.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_repository.repository_refcursor + CHANGE refNameRaw refNameRaw LONGBLOB NOT NULL; diff --git a/resources/sql/autopatches/20140811.blob.2.sql b/resources/sql/autopatches/20140811.blob.2.sql new file mode 100644 index 0000000000..f30d9d98c6 --- /dev/null +++ b/resources/sql/autopatches/20140811.blob.2.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_repository.repository_pushlog + CHANGE refNameRaw refNameRaw LONGBLOB;