A little update of the script on vb 4.2.x:
PHP Code:
<?php
error_reporting(E_ALL & ~E_NOTICE);
define('THIS_SCRIPT', 'cv');
define('CSRF_PROTECTION', false);
require_once('./global.php');
function change_table_engine($engine_from, $engine_to, $show_output = false, $test_mode = false)
{
global $vbulletin;
$engine_from_lc = strtolower($engine_from);
$engine_to_lc = strtolower($engine_to);
$tables = $vbulletin->db->query_read("SHOW TABLE STATUS");
while($temp = $vbulletin->db->fetch_array($tables))
{
if(strtolower($temp['Engine']) == $engine_from_lc AND $temp[Name] != 'vb_language' AND $engine_from_lc != $engine_to_lc AND !in_array(strtolower($temp['Engine']), array('heap', 'memory')))
{
if($show_output)
{
print "Alter Engine of table: $temp[Name] - $temp[Engine] to $engine_to<br />\n";
vbflush();
}
if(!$test_mode)
{
$vbulletin->db->query_write("ALTER TABLE " . "{$temp[Name]} ENGINE = $engine_to");
}
}
}
}
change_table_engine('MyISAM', 'InnoDB', true);
?>
In this way it will exclude
vb_language as it should stay in MyISAM.
Aldo this script should be run in AdminCP, not the root!
And if you have some big tables you should manually convert them trough shell console and after that run the script.
Regards!