重新索引扁平产品数据时出错 [英] Error when reindexing flat product data

查看:90
本文介绍了重新索引扁平产品数据时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此错误重新编制索引的过程有问题."在Magento中,当我尝试在产品平面数据上为数据重新编制索引时. 我使用的是Magento 1.4.1.1,数据库中有超过5万个项目.

I receive this error "There was a problem with reindexing process." in Magento when I try to Reindex Data at Product Flat Data. I use Magento 1.4.1.1, and I have over 50 000 itemes in database.

是否可以解决此问题?

以下是我在exception.log中发现的错误:

Here are the errors what I find in exception.log:

2011-04-14T19:24:05+00:00 DEBUG (7): Exception message: SQLSTATE[HY000]: General error: 1005 Can't create table 'magentonou.catalog_product_flat_3' (errno: 150)
Trace: #0 E:\Wamp\www\includes\src\__default.php(48621): Zend_Db_Statement_Pdo->_execute(Array)
#1 E:\Wamp\www\includes\src\__default.php(40291): Zend_Db_Statement->execute(Array)
#2 E:\Wamp\www\includes\src\__default.php(41312): Zend_Db_Adapter_Abstract->query('CREATE TABLE `c...', Array)
#3 E:\Wamp\www\includes\src\__default.php(42062): Zend_Db_Adapter_Pdo_Abstract->query('CREATE TABLE `c...', Array)
#4 E:\Wamp\www\includes\src\Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer.php(544): Varien_Db_Adapter_Pdo_Mysql->query('CREATE TABLE `c...')
#5 E:\Wamp\www\includes\src\Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer.php(122): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->prepareFlatTable('3')
#6 E:\Wamp\www\includes\src\Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer.php(115): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->rebuild('3')
#7 E:\Wamp\www\includes\src\Mage_Catalog_Model_Product_Flat_Indexer.php(64): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Flat_Indexer->rebuild(NULL)
#8 E:\Wamp\www\includes\src\Mage_Catalog_Model_Product_Indexer_Flat.php(301): Mage_Catalog_Model_Product_Flat_Indexer->rebuild()
#9 E:\Wamp\www\includes\src\Mage_Index_Model_Process.php(139): Mage_Catalog_Model_Product_Indexer_Flat->reindexAll()
#10 E:\Wamp\www\includes\src\Mage_Index_Model_Process.php(167): Mage_Index_Model_Process->reindexAll()
#11 E:\Wamp\www\app\code\core\Mage\Index\controllers\Adminhtml\ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#12 E:\Wamp\www\includes\src\__default.php(11748): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#13 E:\Wamp\www\includes\src\__default.php(15669): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')
#14 E:\Wamp\www\includes\src\__default.php(15271): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#15 E:\Wamp\www\includes\src\__default.php(17470): Mage_Core_Controller_Varien_Front->dispatch()
#16 E:\Wamp\www\app\Mage.php(596): Mage_Core_Model_App->run(Array)
#17 E:\Wamp\www\index.php(80): Mage::run('', 'store')
#18 {main}

推荐答案

解决方案

看一下catalog_eav_attribute和eav_attribute表.对于所有设置为1的用户定义字段,将used_in_product_listing字段更新为0.在运行此字段之前,请使用SELECT子句,并查看将其拉出的字段.另外,请先在测试环境上运行!

Take a look at the catalog_eav_attribute and eav_attribute tables. Update the used_in_product_listing field to 0 for all user defined fields that are set to 1. Before running this, use a SELECT clause and see what fields its pulling out. Also, run on a test environment first!!

update `catalog_eav_attribute` as cea left join eav_attribute as ea on cea.attribute_id = ea.attribute_id set cea.used_in_product_listing = 0 where cea.used_in_product_listing = 1 and is_user_defined = 1

…并且已修正!

这篇关于重新索引扁平产品数据时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆