diff --git a/config/global.ini.php b/config/global.ini.php index df84a0e3a466fb2e4ead7fb8fa9746e22a4ee679..1b3462453f136195e5a37e9c9b0ec47ae05068fe 100644 --- a/config/global.ini.php +++ b/config/global.ini.php @@ -20,6 +20,7 @@ tables_prefix = port = 3306 adapter = PDO_MYSQL type = InnoDB +schema = Mysql ; if charset is set to utf8, Piwik will ensure that it is storing its data using UTF8 charset. ; it will add a sql query SET at each page view. @@ -35,6 +36,7 @@ tables_prefix = piwiktests_ port = 3306 adapter = PDO_MYSQL type = InnoDB +schema = Mysql [log] ; possible values for log: screen, database, file diff --git a/core/Db/Schema.php b/core/Db/Schema.php index ff9854b910d0607c10433a23b9a18eeba4a3bc51..13fd0fe44cf7d701e6d7f403b1c1a5f90e05b505 100644 --- a/core/Db/Schema.php +++ b/core/Db/Schema.php @@ -49,11 +49,9 @@ class Schema extends Singleton public static function getSchemas($adapterName) { static $allSchemaNames = array( - // MySQL storage engines 'MYSQL' => array( 'Mysql', -// 'Innodb', -// 'Infinidb', + // InfiniDB ), // Microsoft SQL Server @@ -112,11 +110,7 @@ class Schema extends Singleton { $config = Config::getInstance(); $dbInfos = $config->database; - if (isset($dbInfos['schema'])) { - $schemaName = $dbInfos['schema']; - } else { - $schemaName = 'Mysql'; - } + $schemaName = $dbInfos['schema']; $className = self::getSchemaClassName($schemaName); $this->schema = new $className(); } diff --git a/core/Updates/0.6.3.php b/core/Updates/0.6.3.php index eba5b428517f605771dd971696f730e4a6dba8e8..87ef2d27a1f31cb38d30b7846eb85557d8a3def5 100644 --- a/core/Updates/0.6.3.php +++ b/core/Updates/0.6.3.php @@ -35,14 +35,12 @@ class Updates_0_6_3 extends Updates if (!isset($dbInfos['schema'])) { try { if (is_writable(Config::getLocalConfigPath())) { - $dbInfos['schema'] = 'Myisam'; $config->database = $dbInfos; $config->forceSave(); } else { throw new \Exception('mandatory update failed'); } } catch (\Exception $e) { - throw new \Piwik\UpdaterErrorException("Please edit your config/config.ini.php file and add below <code>[database]</code> the following line: <br /><code>schema = Myisam</code>"); } } diff --git a/core/Updates/1.8.4-b1.php b/core/Updates/1.8.4-b1.php index 7c4b6984f8a85297da9d49686ada4c9a8a1b5a1e..97e70daa8d58022cf5fa7b2344a0c569618f5b49 100644 --- a/core/Updates/1.8.4-b1.php +++ b/core/Updates/1.8.4-b1.php @@ -72,7 +72,7 @@ class Updates_1_8_4_b1 extends Updates `before` int(10) unsigned NOT NULL, `after` int(10) unsigned NOT NULL, KEY `mainkey` (`before`) - ) ENGINE=MyISAM; + ) ENGINE=InnoDB; " => false, // grouping by name only would be case-insensitive, so we GROUP BY name,hash