Magento Forum

   
HELP!!! Fatal error after upgrade to 1.4, whole site dead! 
 
breakoolj
Jr. Member
 
Total Posts:  9
Joined:  2008-08-28
 

i got this error message after upgrade from 1.3.2.4 to 1.4 :
Fatal error: Call to undefined method Varien_Db_Adapter_Pdo_Mysql::insertMultiple() in /home/bilbric/public_html/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-0.8.12-1.4.0.0.0.php on line 76

then i refresh the page,both frontend and backend not work, on the page message is this:

PDOException Object
(
[message:protected] => SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘customer_eav_attribute’ already exists
[string:private] =>
[code:protected] => 42S01
[file:protected] => /home/bilbric/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line:protected] => 276
[trace:private] => Array
(
[0] => Array
(
[file] => /home/bilbric/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line] => 276
[function] => query
[class] => PDO
[type] => ->
[args] => Array
(
[0] => CREATE TABLE `customer_eav_attribute` (
`attribute_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`is_visible` tinyint(1) unsigned NOT NULL DEFAULT ‘1’,
`is_visible_on_front` tinyint(1) unsigned NOT NULL DEFAULT ‘0’,
`input_filter` varchar(255) NOT NULL,
`lines_to_divide_multiline` smallint(5) unsigned NOT NULL DEFAULT ‘0’,
`min_text_length` int(11) unsigned NOT NULL DEFAULT ‘0’,
`max_text_length` int(11) unsigned NOT NULL DEFAULT ‘0’,
PRIMARY KEY (`attribute_id`),
CONSTRAINT `FK_CUSTOMER_EAV_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8
)

)

[1] => Array
(
[file] => /home/bilbric/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line] => 397
[function] => raw_query
[class] => Varien_Db_Adapter_Pdo_Mysql
[type] => ->
[args] => Array
(
[0] => CREATE TABLE `customer_eav_attribute` (
`attribute_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`is_visible` tinyint(1) unsigned NOT NULL DEFAULT ‘1’,
`is_visible_on_front` tinyint(1) unsigned NOT NULL DEFAULT ‘0’,
`input_filter` varchar(255) NOT NULL,
`lines_to_divide_multiline` smallint(5) unsigned NOT NULL DEFAULT ‘0’,
`min_text_length` int(11) unsigned NOT NULL DEFAULT ‘0’,
`max_text_length` int(11) unsigned NOT NULL DEFAULT ‘0’,
PRIMARY KEY (`attribute_id`),
CONSTRAINT `FK_CUSTOMER_EAV_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8
)

)

[2] => Array
(
[file] => /home/bilbric/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 612
[function] => multi_query
[class] => Varien_Db_Adapter_Pdo_Mysql
[type] => ->
[args] => Array
(
[0] =>
CREATE TABLE `customer_eav_attribute` (
`attribute_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`is_visible` tinyint(1) unsigned NOT NULL DEFAULT ‘1’,
`is_visible_on_front` tinyint(1) unsigned NOT NULL DEFAULT ‘0’,
`input_filter` varchar(255) NOT NULL,
`lines_to_divide_multiline` smallint(5) unsigned NOT NULL DEFAULT ‘0’,
`min_text_length` int(11) unsigned NOT NULL DEFAULT ‘0’,
`max_text_length` int(11) unsigned NOT NULL DEFAULT ‘0’,
PRIMARY KEY (`attribute_id`),
CONSTRAINT `FK_CUSTOMER_EAV_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

)

)

[3] => Array
(
[file] => /home/bilbric/public_html/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-0.8.12-1.4.0.0.0.php
[line] => 48
[function] => run
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
[0] =>
CREATE TABLE `customer_eav_attribute` (
`attribute_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`is_visible` tinyint(1) unsigned NOT NULL DEFAULT ‘1’,
`is_visible_on_front` tinyint(1) unsigned NOT NULL DEFAULT ‘0’,
`input_filter` varchar(255) NOT NULL,
`lines_to_divide_multiline` smallint(5) unsigned NOT NULL DEFAULT ‘0’,
`min_text_length` int(11) unsigned NOT NULL DEFAULT ‘0’,
`max_text_length` int(11) unsigned NOT NULL DEFAULT ‘0’,
PRIMARY KEY (`attribute_id`),
CONSTRAINT `FK_CUSTOMER_EAV_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

)

)

[4] => Array
(
[file] => /home/bilbric/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 360
[args] => Array
(
[0] => /home/bilbric/public_html/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-0.8.12-1.4.0.0.0.php
)

[function] => include
)

[5] => Array
(
[file] => /home/bilbric/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 273
[function] => _modifyResourceDb
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
[0] => upgrade
[1] => 0.8.12
[2] => 1.4.0.0.6
)

)

[6] => Array
(
[file] => /home/bilbric/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 217
[function] => _upgradeResourceDb
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
[0] => 0.8.12
[1] => 1.4.0.0.6
)

)

[7] => Array
(
[file] => /home/bilbric/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 153
[function] => applyUpdates
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
)

)

[8] => Array
(
[file] => /home/bilbric/public_html/app/code/core/Mage/Core/Model/App.php
[line] => 363
[function] => applyAllUpdates
[class] => Mage_Core_Model_Resource_Setup
[type] => ::
[args] => Array
(
)

)

[9] => Array
(
[file] => /home/bilbric/public_html/app/code/core/Mage/Core/Model/App.php
[line] => 295
[function] => _initModules
[class] => Mage_Core_Model_App
[type] => ->
[args] => Array
(
)

)

[10] => Array
(
[file] => /home/bilbric/public_html/app/Mage.php
[line] => 596
[function] => run
[class] => Mage_Core_Model_App
[type] => ->
[args] => Array
(
[0] => Array
(
[scope_code] =>
[scope_type] => store
[options] => Array
(
)

)

)

)

[11] => Array
(
[file] => /home/bilbric/public_html/index.php
[line] => 65
[function] => run
[class] => Mage
[type] => ::
[args] => Array
(
)

)

)

[errorInfo] => Array
(
[0] => 42S01
[1] => 1050
[2] => Table ‘customer_eav_attribute’ already exists
)

)

anyone could help me?

 
Magento Community Magento Community
Magento Community
Magento Community
 
diybrewing
Jr. Member
 
Total Posts:  26
Joined:  2008-11-06
 

I had this same issue and had to downgrade again. Did you use magento connect?

 
Magento Community Magento Community
Magento Community
Magento Community
 
breakoolj
Jr. Member
 
Total Posts:  9
Joined:  2008-08-28
 
diybrewing - 14 February 2010 05:28 AM

I had this same issue and had to downgrade again. Did you use magento connect?

yes i was use magentoo connect. now i try to do a fresh install.

 
Magento Community Magento Community
Magento Community
Magento Community
 
elainebrown
Jr. Member
 
Total Posts:  12
Joined:  2009-07-27
 

How do you downgrade when you don’t have access to the backend / magento downloader?

 
Magento Community Magento Community
Magento Community
Magento Community
 
tihu
Jr. Member
 
Total Posts:  18
Joined:  2008-08-29
 
elainebrown - 14 February 2010 11:54 PM

How do you downgrade when you don’t have access to the backend / magento downloader?

You have to use backup you made before upgrade.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sixsicsix
Jr. Member
 
Total Posts:  23
Joined:  2009-08-14
 

Delete this file:

/home/bilbric/public_html/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-0.8.12-1.4.0.0.0.php

And reload your domain name. Guaran-f’ing-tee it will fix it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
breakoolj
Jr. Member
 
Total Posts:  9
Joined:  2008-08-28
 
sixsicsix - 15 February 2010 01:48 PM

Delete this file:

/home/bilbric/public_html/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-0.8.12-1.4.0.0.0.php

And reload your domain name. Guaran-f’ing-tee it will fix it.

thanks i’ll try it

 
Magento Community Magento Community
Magento Community
Magento Community
 
Joel of MMCC
Jr. Member
 
Total Posts:  13
Joined:  2009-04-10
 
breakoolj - 15 February 2010 05:19 PM

sixsicsix - 15 February 2010 01:48 PM
Delete this file:

/home/bilbric/public_html/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-0.8.12-1.4.0.0.0.php

And reload your domain name. Guaran-f’ing-tee it will fix it.

thanks i’ll try it

And did it fix it? Enquiring minds wanna know!

 
Magento Community Magento Community
Magento Community
Magento Community
 
lurebeauty
Sr. Member
 
Avatar
Total Posts:  229
Joined:  2009-07-06
 

I got a simliar error after upgrading to 1.4 , and i cant figure out how to fix it , ive looked for hours and im lost:  can someone help?

PDOException Object
(
[message:protected] => SQLSTATE[HY000]: General error: 1005 Can’t create table ‘./core_email_variable.frm’ (errno: 121)
[string:private] =>
[code:protected] => HY000
[file:protected] => /home/lure/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line:protected] => 276
[trace:private] => Array
(
[0] => Array
(
[file] => /home/lure/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line] => 276
[function] => query
[class] => PDO
[type] => ->
[args] => Array
(
[0] => CREATE TABLE IF NOT EXISTS `core_email_variable` (
`variable_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(255) NOT NULL DEFAULT ‘’,
`name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT ‘’,
PRIMARY KEY (`variable_id`),
UNIQUE KEY `IDX_CODE` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
)

)

[1] => Array
(
[file] => /home/lure/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line] => 397
[function] => raw_query
[class] => Varien_Db_Adapter_Pdo_Mysql
[type] => ->
[args] => Array
(
[0] => CREATE TABLE IF NOT EXISTS `core_email_variable` (
`variable_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(255) NOT NULL DEFAULT ‘’,
`name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT ‘’,
PRIMARY KEY (`variable_id`),
UNIQUE KEY `IDX_CODE` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
)

)

[2] => Array
(
[file] => /home/lure/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 612
[function] => multi_query
[class] => Varien_Db_Adapter_Pdo_Mysql
[type] => ->
[args] => Array
(
[0] =>
CREATE TABLE IF NOT EXISTS `core_email_variable` (
`variable_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(255) NOT NULL DEFAULT ‘’,
`name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT ‘’,
PRIMARY KEY (`variable_id`),
UNIQUE KEY `IDX_CODE` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `core_email_variable_value` (
`value_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`variable_id` int(11) unsigned NOT NULL DEFAULT ‘0’,
`store_id` smallint(5) unsigned NOT NULL DEFAULT ‘0’,
`value` varchar(255) NOT NULL DEFAULT ‘’,
PRIMARY KEY (`value_id`),
UNIQUE KEY `IDX_VARIABLE_STORE` (`variable_id`,`store_id`),
KEY `IDX_VARIABLE_ID` (`variable_id`),
KEY `IDX_STORE_ID` (`store_id`),
CONSTRAINT `FK_CORE_EMAIL_VARIABLE_VALUE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_CORE_EMAIL_VARIABLE_VALUE_VARIABLE_ID` FOREIGN KEY (`variable_id`) REFERENCES `core_email_variable` (`variable_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8

)

)

[3] => Array
(
[file] => /home/lure/public_html/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.16-0.8.17.php
[line] => 52
[function] => run
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
[0] =>
CREATE TABLE IF NOT EXISTS `core_email_variable` (
`variable_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(255) NOT NULL DEFAULT ‘’,
`name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT ‘’,
PRIMARY KEY (`variable_id`),
UNIQUE KEY `IDX_CODE` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `core_email_variable_value` (
`value_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`variable_id` int(11) unsigned NOT NULL DEFAULT ‘0’,
`store_id` smallint(5) unsigned NOT NULL DEFAULT ‘0’,
`value` varchar(255) NOT NULL DEFAULT ‘’,
PRIMARY KEY (`value_id`),
UNIQUE KEY `IDX_VARIABLE_STORE` (`variable_id`,`store_id`),
KEY `IDX_VARIABLE_ID` (`variable_id`),
KEY `IDX_STORE_ID` (`store_id`),
CONSTRAINT `FK_CORE_EMAIL_VARIABLE_VALUE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_CORE_EMAIL_VARIABLE_VALUE_VARIABLE_ID` FOREIGN KEY (`variable_id`) REFERENCES `core_email_variable` (`variable_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8

)

)

[4] => Array
(
[file] => /home/lure/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 360
[args] => Array
(
[0] => /home/lure/public_html/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.16-0.8.17.php
)

[function] => include
)

[5] => Array
(
[file] => /home/lure/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 273
[function] => _modifyResourceDb
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
[0] => upgrade
[1] => 0.8.16
[2] => 0.8.26
)

)

[6] => Array
(
[file] => /home/lure/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 217
[function] => _upgradeResourceDb
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
[0] => 0.8.16
[1] => 0.8.26
)

)

[7] => Array
(
[file] => /home/lure/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 153
[function] => applyUpdates
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
)

)

[8] => Array
(
[file] => /home/lure/public_html/app/code/core/Mage/Core/Model/App.php
[line] => 363
[function] => applyAllUpdates
[class] => Mage_Core_Model_Resource_Setup
[type] => ::
[args] => Array
(
)

)

[9] => Array
(
[file] => /home/lure/public_html/app/code/core/Mage/Core/Model/App.php
[line] => 295
[function] => _initModules
[class] => Mage_Core_Model_App
[type] => ->
[args] => Array
(
)

)

[10] => Array
(
[file] => /home/lure/public_html/app/Mage.php
[line] => 596
[function] => run
[class] => Mage_Core_Model_App
[type] => ->
[args] => Array
(
[0] => Array
(
[scope_code] =>
[scope_type] => store
[options] => Array
(
)

)

)

)

[11] => Array
(
[file] => /home/lure/public_html/index.php
[line] => 66
[function] => run
[class] => Mage
[type] => ::
[args] => Array
(
)

)

)

[errorInfo] => Array
(
[0] => HY000
[1] => 1005
[2] => Can’t create table ‘./core_email_variable.frm’ (errno: 121)
)

)

 
Magento Community Magento Community
Magento Community
Magento Community
 
timparis
Jr. Member
 
Total Posts:  2
Joined:  2009-12-04
 

I’ve got similar database problems trying to upgrade from 1.3.2 to 1.4: Is this a database permission issue?

PDOException Object
(
[message:protected] => SQLSTATE[HY000]: General error: 1005 Can’t create table ‘buffalol_magento.catalog_product_index_tier_price’ (errno: 150)
[string:private] =>
[code:protected] => HY000
[file:protected] => /home/buffalol/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line:protected] => 276
[trace:private] => Array
(
[0] => Array
(
[file] => /home/buffalol/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line] => 276
[function] => query
[class] => PDO
[type] => ->
[args] => Array
(
[0] => CREATE TABLE IF NOT EXISTS `catalog_product_index_tier_price` (
`entity_id` INT(10) UNSIGNED NOT NULL,
`customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,
`website_id` SMALLINT(5) UNSIGNED NOT NULL,
`min_price` DECIMAL(12,4) DEFAULT NULL,
PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`),
CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_ENTITY` FOREIGN KEY (`entity_id`)
REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_CUSTOMER` FOREIGN KEY (`customer_group_id`)
REFERENCES `customer_group` (`customer_group_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_WEBSITE` FOREIGN KEY (`website_id`)
REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=INNODB DEFAULT CHARSET=utf8
)

)

[1] => Array
(
[file] => /home/buffalol/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php
[line] => 397
[function] => raw_query
[class] => Varien_Db_Adapter_Pdo_Mysql
[type] => ->
[args] => Array
(
[0] => CREATE TABLE IF NOT EXISTS `catalog_product_index_tier_price` (
`entity_id` INT(10) UNSIGNED NOT NULL,
`customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,
`website_id` SMALLINT(5) UNSIGNED NOT NULL,
`min_price` DECIMAL(12,4) DEFAULT NULL,
PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`),
CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_ENTITY` FOREIGN KEY (`entity_id`)
REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_CUSTOMER` FOREIGN KEY (`customer_group_id`)
REFERENCES `customer_group` (`customer_group_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_WEBSITE` FOREIGN KEY (`website_id`)
REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=INNODB DEFAULT CHARSET=utf8
)

)

[2] => Array
(
[file] => /home/buffalol/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 612
[function] => multi_query
[class] => Varien_Db_Adapter_Pdo_Mysql
[type] => ->
[args] => Array
(
[0] =>
-- Removing old index tables if exists
DROP TABLE IF EXISTS `catalog_product_entity_tier_price_idx`;
DROP TABLE IF EXISTS `core_website_date_idx`;

CREATE TABLE IF NOT EXISTS `catalog_product_index_tier_price` (
`entity_id` INT(10) UNSIGNED NOT NULL,
`customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,
`website_id` SMALLINT(5) UNSIGNED NOT NULL,
`min_price` DECIMAL(12,4) DEFAULT NULL,
PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`),
CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_ENTITY` FOREIGN KEY (`entity_id`)
REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_CUSTOMER` FOREIGN KEY (`customer_group_id`)
REFERENCES `customer_group` (`customer_group_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_WEBSITE` FOREIGN KEY (`website_id`)
REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=INNODB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `catalog_product_index_website` (
`website_id` SMALLINT(5) UNSIGNED NOT NULL,
`date` DATE DEFAULT NULL,
`rate` FLOAT(12, 4) UNSIGNED DEFAULT 1,
PRIMARY KEY (`website_id`),
KEY `IDX_DATE` (`date`),
CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_WEBSITE` FOREIGN KEY (`website_id`)
REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=INNODB DEFAULT CHARSET=utf8;

)

)

[3] => Array
(
[file] => /home/buffalol/public_html/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.19-1.4.0.0.20.php
[line] => 58
[function] => run
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
[0] =>
-- Removing old index tables if exists
DROP TABLE IF EXISTS `catalog_product_entity_tier_price_idx`;
DROP TABLE IF EXISTS `core_website_date_idx`;

CREATE TABLE IF NOT EXISTS `catalog_product_index_tier_price` (
`entity_id` INT(10) UNSIGNED NOT NULL,
`customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,
`website_id` SMALLINT(5) UNSIGNED NOT NULL,
`min_price` DECIMAL(12,4) DEFAULT NULL,
PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`),
CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_ENTITY` FOREIGN KEY (`entity_id`)
REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_CUSTOMER` FOREIGN KEY (`customer_group_id`)
REFERENCES `customer_group` (`customer_group_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_WEBSITE` FOREIGN KEY (`website_id`)
REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=INNODB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `catalog_product_index_website` (
`website_id` SMALLINT(5) UNSIGNED NOT NULL,
`date` DATE DEFAULT NULL,
`rate` FLOAT(12, 4) UNSIGNED DEFAULT 1,
PRIMARY KEY (`website_id`),
KEY `IDX_DATE` (`date`),
CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_WEBSITE` FOREIGN KEY (`website_id`)
REFERENCES `core_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=INNODB DEFAULT CHARSET=utf8;

)

)

[4] => Array
(
[file] => /home/buffalol/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 360
[args] => Array
(
[0] => /home/buffalol/public_html/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.19-1.4.0.0.20.php
)

[function] => include
)

[5] => Array
(
[file] => /home/buffalol/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 273
[function] => _modifyResourceDb
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
[0] => upgrade
[1] => 1.4.0.0.19
[2] => 1.4.0.0.21
)

)

[6] => Array
(
[file] => /home/buffalol/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 217
[function] => _upgradeResourceDb
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
[0] => 1.4.0.0.19
[1] => 1.4.0.0.21
)

)

[7] => Array
(
[file] => /home/buffalol/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php
[line] => 153
[function] => applyUpdates
[class] => Mage_Core_Model_Resource_Setup
[type] => ->
[args] => Array
(
)

)

[8] => Array
(
[file] => /home/buffalol/public_html/app/code/core/Mage/Core/Model/App.php
[line] => 363
[function] => applyAllUpdates
[class] => Mage_Core_Model_Resource_Setup
[type] => ::
[args] => Array
(
)

)

[9] => Array
(
[file] => /home/buffalol/public_html/app/code/core/Mage/Core/Model/App.php
[line] => 295
[function] => _initModules
[class] => Mage_Core_Model_App
[type] => ->
[args] => Array
(
)

)

[10] => Array
(
[file] => /home/buffalol/public_html/app/Mage.php
[line] => 596
[function] => run
[class] => Mage_Core_Model_App
[type] => ->
[args] => Array
(
[0] => Array
(
[scope_code] =>
[scope_type] => store
[options] => Array
(
)

)

)

)

[11] => Array
(
[file] => /home/buffalol/public_html/index.php
[line] => 52
[function] => run
[class] => Mage
[type] => ::
[args] => Array
(
)

)

)

[errorInfo] => Array
(
[0] => HY000
[1] => 1005
[2] => Can’t create table ‘buffalol_magento.catalog_product_index_tier_price’ (errno: 150)
)

)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael D. Yaeger
Jr. Member
 
Total Posts:  1
Joined:  2010-09-01
 
sixsicsix - 15 February 2010 01:48 PM

Delete this file:

/home/bilbric/public_html/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-0.8.12-1.4.0.0.0.php

And reload your domain name. Guaran-f’ing-tee it will fix it.

I renamed the file and loaded the domain, the installation (which was new) started over again. I renamed the file back to its original name and started again. This time it went all the way through.

Now, I can load the backend, but no frontend. Oh, the joys of Magento…

 
Magento Community Magento Community
Magento Community
Magento Community
 
mattdev_nz
Jr. Member
 
Avatar
Total Posts:  27
Joined:  2010-06-21
New Zealand
 

As every environment and setup is different, this is a generic response.

* Take a backup of your database before proceeding *

It is most likely that your database tables are not the correct engine - which most should be Innodb however if they are myisam you will have foreign key errors amongst many other issues *keep reading*

Magento system requirements for strorage engine in mysql is Innodb

It has always been a requirement, however the installer in previous versions did not check for it.

Also by default certain versions of mysql default to myisam compounding our problems.

First step is to convert your database tables to correct engine.

Note to add your table prefix applicable to your db that you set in Magento setup

http://www.magentocommerce.com/wiki/groups/227/convert_database_to_innodb

Except these tables: http://www.magentocommerce.com/wiki/groups/227/tables_using_myisam_engine/

Note: Some tables should have an engine of MEMORY - particularly tables with a suffix of _tmp

Then in phpmyadmin / mysql command line drop each table that the error refers to - first check that the table is empty (it was for all of my cases)

If not empty, export data to be safe, then drop it.

Hit F5 in your browser for Mage backend / setup script and you will likely have another similar error - in the case of an old messy database I had to do this ~20 times for a client

@breakoolj your table to drop is “customer_eav_attribute”

@lurebeauty your table to drop is “core_email_variable”

@timparis your table to drop is “catalog_product_index_tier_price”

Look for CREATE TABLE IF NOT EXISTS in your particular error message and repeat process, dropping tables until update scripts finish

*do not* as others propose, by-pass or delete the update scripts - this will cause you further problems. Attack the root cause.

Why anyone would by-pass or delete a 1300-line setup script is beyond stupidity for an ecommerce store IMO

If you cannot drop a table, it is likely that another depends on it i.e. foreign key error or similar - to find out, at mysql prompt type show engine innodb status\g

i.e. mysql> SHOW ENGINE INNODB STATUS\G

Look for LATEST FOREIGN KEY ERROR section

This will tell you what table is referencing the first table you are trying to drop. Then drop the table that references the first one

Expect multiple dependencies.

Then repeat process of dropping the table, hit F5 in your browser to let further update scripts run and repeat process of dropping tables.

Eventually you will have a backend in v1.4.2 smile

Also,
Check your Mysql default engine type is innodb - earlier versions of mysql defaulted to myisam - from memory prior to 5.5.5 ?

To do this, at mysql prompt, type show engines\g - this will show you what engines are available on your install and what is the default.

To change the default edit your my.cnf file, adding default-storage-engine=innodb

Innodb requires concise configuration: http://dev.mysql.com/doc/refman/5.0/en/innodb-configuration.html

Then restart mysqld, re-check show engines and your default should now be innodb

Note this affects your entire mysql server.

For people doing major upgrades, follow this article:

J Norton’s Blog on upgrading to 1.4.0.1

Further reading if you need help sleeping can be found here:

http://www.magentocommerce.com/boards/viewthread/15330/P5/
http://www.kavoir.com/2009/09/mysql-engines-innodb-vs-myisam-a-comparison-of-pros-and-cons.html

http://dev.mysql.com/doc/refman/5.5/en/innodb-storage-engine.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
dbashyal
Sr. Member
 
Avatar
Total Posts:  164
Joined:  2008-09-12
rockdale, sydney, australia
 

@mattdev_nz thx for the link to - http://www.magentocommerce.com/wiki/groups/227/convert_database_to_innodb

That saved my day. I wish I had found it 5hrs ago :(

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top