Merge pull request #3063 from nextcloud/backport-3051-change-row-format-before-collation

[stable11] Change the row-format before changing the collation
This commit is contained in:
Morris Jobke 2017-01-16 10:45:10 -06:00 committed by GitHub
commit 88cb3c7cbd
1 changed files with 12 additions and 0 deletions

View File

@ -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 {