From 77b5d7bc864b32ced9c37dfb5e6fb606a5690b24 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 12 Jan 2017 16:54:29 +0100 Subject: Change the row-format before changing the collation Signed-off-by: Joas Schilling --- lib/private/Repair/Collation.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib') diff --git a/lib/private/Repair/Collation.php b/lib/private/Repair/Collation.php index 54de1a719bd..a3535fb33a2 100644 --- a/lib/private/Repair/Collation.php +++ b/lib/private/Repair/Collation.php @@ -75,6 +75,18 @@ class Collation implements IRepairStep { $tables = $this->getAllNonUTF8BinTables($this->connection); foreach ($tables as $table) { + $output->info("Change row format for $table ..."); + $query = $this->connection->prepare('ALTER TABLE `' . $table . '` ROW_FORMAT = DYNAMIC;'); + try { + $query->execute(); + } catch (DriverException $e) { + // Just log this + $this->logger->logException($e); + if (!$this->ignoreFailures) { + throw $e; + } + } + $output->info("Change collation for $table ..."); $query = $this->connection->prepare('ALTER TABLE `' . $table . '` CONVERT TO CHARACTER SET ' . $characterSet . ' COLLATE ' . $characterSet . '_bin;'); try { -- cgit v1.2.3