From 928b4edffb6659d27e108097c6873341d57eb22f Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Mon, 6 Oct 2014 13:03:23 -0700 Subject: [PATCH] Storage - escape collation type in create database code pathway Summary: without escapage here, creating databases fails. Fixes T6251. Test Plan: ran the command CREATE DATABASE foo COLLATION binary and it failed; ran the command CREATE DATABASE foo2 COLLATION "binary" and it worked; trusting that the %T still works as advertised. Reviewers: chad, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6251 Differential Revision: https://secure.phabricator.com/D10641 --- .../storage/management/PhabricatorStorageManagementAPI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php b/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php index de3571674b..57dbf34f31 100644 --- a/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php +++ b/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php @@ -114,7 +114,7 @@ final class PhabricatorStorageManagementAPI { queryfx( $this->getConn(null), - 'CREATE DATABASE IF NOT EXISTS %T COLLATE %Q', + 'CREATE DATABASE IF NOT EXISTS %T COLLATE %T', $this->getDatabaseName($fragment), $collate_text); }