header('Content-Type:text/html;charset-UTF-8');
require_once 'app/Mage.php';
Mage::app('default');
$read = Mage::getSingleton('core/resource')->getConnection('core_read');
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
$nochange = array('cataloginventory_stock_status_tmp','catalog_category_anc_categs_index_tmp','catalog_category_anc_products_index_tmp','catalog_category_product_index_enbl_tmp',
'catalog_category_product_index_tmp','catalog_product_index_eav_decimal_tmp','catalog_product_index_eav_tmp','catalog_product_index_price_bundle_opt_tmp',
'catalog_product_index_price_bundle_sel_tmp','catalog_product_index_price_bundle_tmp','catalog_product_index_price_cfg_opt_agr_tmp','catalog_product_index_price_cfg_opt_tmp',
'catalog_product_index_price_downlod_tmp','catalog_product_index_price_final_tmp','catalog_product_index_price_opt_agr_tmp','catalog_product_index_price_opt_tmp','catalog_product_index_price_tmp',
'catalogsearch_fulltext','importexport_importdata','sendfriend_log');
$sql = "SHOW TABLES FROM `tablename`";
$rows = $read->fetchAll($sql);
foreach($rows as $row)
{
if(!in_array($row['Tables_in_tablename'],$nochange)){
echo "ALTER TABLE `" . $row['Tables_in_voguerue'] . "` ENGINE = INNODB" . "<br />";
$write->query("ALTER TABLE `" . $row['Tables_in_voguerue'] . "` ENGINE = INNODB");
}
}
magento修复数据表存储引擎为InnoDB
最新推荐文章于 2022-12-07 12:21:18 发布