Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

1.7 Upgrade Error with core_store table
 
Jason1979
Jr. Member
 
Total Posts:  4
Joined:  2010-08-14
 

I have a client that is currently on 1.4.2. Ultimately we are trying to get to 1.7. I have successfully upgraded to 1.5.1 however if I try going to 1.6.2 or 1.7 I keep getting the same upgrade error…

a:5:{i:0;s:268:\\\"Error in file: “/home/jlmweb/public_html/fp/public_html/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php” - SQLSTATE[HY000]: General error: 1025 Error on rename of ‘./jlmweb_store4/#sql-dfb_219342d’ to ‘./jlmweb_store4/core_store’ (errno: 150)\\\";i:1;s:1088:\\\"#0 /home/jlmweb/public_html/fp/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception(’Mage_Core’, ‘Error in file: ...’)

I’ve done a lot of searching but I haven’t been able to find anything like this regarding core_store. I’ve come across something similar with catalog_category_flat_store_1 but not core_store.

Has anyone ran into this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
kalenjordan
Sr. Member
 
Avatar
Total Posts:  218
Joined:  2011-10-31
Pasadena, CA
 

Hey Jason, I think it may be the same root cause as this issue:
http://www.magentocommerce.com/boards/viewthread/17670/

Can you get a full stack trace though?  Would be good to know exactly which line in the upgrade script is throwing.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jason1979
Jr. Member
 
Total Posts:  4
Joined:  2010-08-14
 

Here is the stack trace. I did get past this error by removing FOREIGN KEYS, but then it would just error on another table (core_layout_link). So I removed KEYS from that table and then it errored on another table. I got up to 5 tables and it kept erroring out. I don’t know how many tables it would have gone through what kind of impact it would have had on the Magento system itself. Each time I had to restore the original database and files and start the upgrade over.

a:5:{i:0;s:268:"Error in file: "/home/jlmweb/public_html/fp/public_html/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php" - SQLSTATE[HY000]: General error: 1025 Error on rename of './jlmweb_store9/#sql-dfb_2ab3f81' to './jlmweb_store9/core_store' (errno: 150)";i:1;s:1088:"#0 /home/jlmweb/public_html/fp/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/jlmweb/public_html/fp/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '0.8.27', '1.6.0.2')
#2 /home/jlmweb/public_html/fp/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('0.8.27', '1.6.0.2')
#3 /home/jlmweb/public_html/fp/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/jlmweb/public_html/fp/public_html/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/jlmweb/public_html/fp/public_html/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 /home/jlmweb/public_html/fp/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#7 /home/jlmweb/public_html/fp/public_html/index.php(87): Mage::run('', 'store')
#8 {main}"
;s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}
 
Magento Community Magento Community
Magento Community
Magento Community
 
kalenjordan
Sr. Member
 
Avatar
Total Posts:  218
Joined:  2011-10-31
Pasadena, CA
 

Weird.  Actually that trace still isn’t showing which line number in mysql4-upgrade-1.5.9.9-1.6.0.0 is actually failing.  You see how every file in the trace has a line number next to it except for the upgrade script itself?

At any rate, it’s definitely a foreign key error.  This stackoverflow post has a little more detail on what you can do to dig in and try to find the root cause:
http://stackoverflow.com/a/179501/1117286

Disabling foreign keys may become very problematic down the line, you’re basically disabling the mechanism that the database uses to maintain it’s own integrity.

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