Błąd 1118 Row size too large podczas indeksowania Product Flat Data
< 1 min czytania
Rozwiązanie na : Błąd 1118 Row size to large podczas indeksowania Product Flat Data
Podczas reindeksacji “Product Flat Data” Magento przestanie odpowiadać i pozostawi log:
Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
Pomóc może zmiana w pliku:
app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Flat/Indexer.php
# ~530 if (!$this->_isFlatTableExists($store)) { $sql = "CREATE TABLE {$tableNameQuote} (\n"; foreach ($columns as $field => $fieldProp) { + if ($fieldProp['type'] == "varchar(255)") + $fieldProp['type'] = "varchar(64)"; $sql .= sprintf(" %s,\n", $this->_sqlColunmDefinition($field, $fieldProp)); ... # ~633 foreach ($addIndexes as $indexName => $indexProp) { $sql .= sprintf(' ADD %s,', $this->_sqlIndexDefinition($indexName, $indexProp)); } $sql = rtrim($sql, ","); + $sql = str_replace("varchar(255)","varchar(64)",$sql); $this->_getWriteAdapter()->query($sql);