UpdateDatabase/MysqlEngineCharset.php
authorAlan Knowles <alan@roojs.com>
Mon, 31 Oct 2016 03:44:47 +0000 (11:44 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 31 Oct 2016 03:44:47 +0000 (11:44 +0800)
UpdateDatabase/MysqlEngineCharset.php

index d4d772b..20a1dc7 100644 (file)
@@ -96,7 +96,18 @@ class Pman_Core_UpdateDatabase_MysqlEngineCharset {
     }
     function updateEngine()
     {
+        $db = DB_DataObject::factory('core_enum');
+        $db->query("show variables like 'innodb_file_per_table'");
+        $db->fetch();
+        if ($db->Value == 'OFF') {
+            die("Error: set innodb_file_per_table = 1 in my.cnf\n\n");
+        }
+        
         // get a list of table views...
+        // innodb in single files is far more efficient that MYD or one big innodb file.
+        // first check if database is using this format.
+        
+        
         
         $db = DB_DataObject::factory('core_enum')->getDatabaseConnection();
         $views = $db->getListOf(  'views');