function updateCharacterSet()
{
+ $db = DB_DataObject::factory('core_enum')->getDatabaseConnection();
+ $views = $db->getListOf( 'views');
+
+
foreach (array_keys($this->schema) as $tbl){
if(strpos($tbl, '__keys') !== false ){
continue;
}
+ if(in_array($tbl , $views)) {
+ continue;
+ }
+
$ce = DB_DataObject::factory('core_enum');
$ce->query("
}
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');
+
+
+
+
foreach (array_keys($this->schema) as $tbl){
if(strpos($tbl, '__keys') !== false ){
continue;
}
+ if(in_array($tbl , $views)) {
+ continue;
+ }
$ce = DB_DataObject::factory('core_enum');
- $ce->query("select engine from information_schema.tables where table_schema='{$ce->database()}' and table_name = '{$tbl}'");
+ $ce->query("
+ select
+ engine
+ from
+ information_schema.tables
+ where
+ table_schema='{$ce->database()}'
+ and
+ table_name = '{$tbl}'
+ ");
- $ce->fetch();
+ if (!$ce->fetch()) {
+ continue;
+ }
if($ce->engine == 'InnoDB' ){
echo "InnoDB: SKIP $tbl\n";