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:
authordiosmosis <benaka@piwik.pro>2015-03-18 03:58:30 +0300
committerdiosmosis <benaka@piwik.pro>2015-03-18 03:58:30 +0300
commit317fdce1c7a7116f6879f46f78ade506c5057f46 (patch)
tree4715bd5813e7c2388ff47f1c95d87691f9fcea76
parent9347d34ade2d368689998dc198b33727db4c4def (diff)
Correctly filter out InnoDB tables in Db::optimizeTables.
-rw-r--r--core/Db.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/Db.php b/core/Db.php
index 25409ecce5..8c718ceac5 100644
--- a/core/Db.php
+++ b/core/Db.php
@@ -324,7 +324,7 @@ class Db
$optimize = Config::getInstance()->General['enable_sql_optimize_queries'];
if (empty($optimize)) {
- return;
+ return false;
}
if (empty($tables)) {
@@ -345,14 +345,16 @@ class Db
$myisamDbTables[] = $row['Name'];
}
}
+
+ $tables = $myisamDbTables;
}
- if (empty($myisamDbTables)) {
+ if (empty($tables)) {
return false;
}
// optimize the tables
- return self::query("OPTIMIZE TABLE " . implode(',', $myisamDbTables));
+ return self::query("OPTIMIZE TABLE " . implode(',', $tables));
}
private static function getTableStatus()