From 6aa729b1c9741f46b69d3041d58f66a99b7ebee7 Mon Sep 17 00:00:00 2001 From: vrana Date: Thu, 5 Apr 2012 23:07:11 -0700 Subject: [PATCH] Support MySQL 5.5 Summary: `116.utf8.sql` throws this under MySQL 5.5: > Column length too big for column 'keyBody' (max = 21845); use BLOB or TEXT instead I guess that's because MySQL 5.5 changed maximum length of UTF-8 character from 3 bytes to 4. I've updated also `116.utf8.sql` for people with new installs. Test Plan: upgrade_schema.php Reviewers: epriestley Reviewed By: epriestley CC: aran Differential Revision: https://secure.phabricator.com/D2117 --- resources/sql/patches/116.utf8-backup-first-expect-wait.sql | 4 ++-- resources/sql/patches/127.userkeybody.sql | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 resources/sql/patches/127.userkeybody.sql diff --git a/resources/sql/patches/116.utf8-backup-first-expect-wait.sql b/resources/sql/patches/116.utf8-backup-first-expect-wait.sql index 9276354b92..1a013a241d 100644 --- a/resources/sql/patches/116.utf8-backup-first-expect-wait.sql +++ b/resources/sql/patches/116.utf8-backup-first-expect-wait.sql @@ -1125,7 +1125,7 @@ ALTER TABLE `phabricator_user`.`user_sshkey` MODIFY `userPHID` varchar(64) CHARACTER SET binary, MODIFY `name` varchar(255) CHARACTER SET binary, MODIFY `keyType` varchar(255) CHARACTER SET binary, - MODIFY `keyBody` varchar(32768) CHARACTER SET binary, + MODIFY `keyBody` text CHARACTER SET binary, MODIFY `keyHash` varchar(32) CHARACTER SET binary, MODIFY `keyComment` varchar(255) CHARACTER SET binary; ALTER TABLE `phabricator_user`.`user_sshkey` @@ -1133,7 +1133,7 @@ ALTER TABLE `phabricator_user`.`user_sshkey` MODIFY `userPHID` varchar(64) COLLATE utf8_bin NOT NULL, MODIFY `name` varchar(255) COLLATE utf8_general_ci, MODIFY `keyType` varchar(255) COLLATE utf8_general_ci, - MODIFY `keyBody` varchar(32768) COLLATE utf8_bin, + MODIFY `keyBody` text COLLATE utf8_bin, MODIFY `keyHash` varchar(32) COLLATE utf8_bin NOT NULL, MODIFY `keyComment` varchar(255) COLLATE utf8_general_ci; diff --git a/resources/sql/patches/127.userkeybody.sql b/resources/sql/patches/127.userkeybody.sql new file mode 100644 index 0000000000..712da7c740 --- /dev/null +++ b/resources/sql/patches/127.userkeybody.sql @@ -0,0 +1,2 @@ +ALTER TABLE `phabricator_user`.`user_sshkey` + MODIFY `keyBody` text COLLATE utf8_bin;