Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-06-30 04:40:14 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-06-30 04:40:14 +0400
commit493d211eba375135b8b306cbe9dcd0705c3d9ff8 (patch)
treef1e7a15e367320fc82c6e691979dd80cf03ef1cc /core/Columns
parentc70371aa61d7b25cfb6f604f765965564e23e292 (diff)
this is just a lucky guess... maybe we avoid those "Error while sending QUERY packet." errors on travis by splitting them into smaller alter tables. This is more or less the only difference to master branch where this problem does not occur
Diffstat (limited to 'core/Columns')
-rw-r--r--core/Columns/Updates.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/Columns/Updates.php b/core/Columns/Updates.php
index 152d5878ef..16233c78ff 100644
--- a/core/Columns/Updates.php
+++ b/core/Columns/Updates.php
@@ -42,7 +42,11 @@ class Updates extends \Piwik\Updates
$changingColumns = self::getUpdates();
foreach ($changingColumns as $table => $columns) {
- $sqls["ALTER TABLE `" . Common::prefixTable($table) . "` " . implode(', ', $columns)] = false;
+ $chunks = array_chunk($columns, 3);
+
+ foreach ($chunks as $columnsToAlter) {
+ $sqls["ALTER TABLE `" . Common::prefixTable($table) . "` " . implode(', ', $columnsToAlter)] = false;
+ }
}
return $sqls;