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

SQLSTATE[42000] Error after 1.5.1.0 --> 1.6.2.0 --> 1.7.0.2 upgrade
 
amat1
Member
 
Total Posts:  36
Joined:  2011-06-13
 

Hi all,

today I’ve tried to upgrade my old store from 1.5.1.0 to 1.7.0.2 Magento CE. I have done this the long way, downloading packages from the Magento website to my computer and using FTP to copy the files and folders of the new version over the existing installation. I first went from 1.5.1.0 to 1.6.2.0 and then repeated this from 1.6.2.0 to 1.7.0.2. Things all seemed to work out well. Both backend and frontend can be accessed. But then I noticed a problem for the category pages.

All category pages with products assigned to them are broken and now show an error page. In var/reports/ it says:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘(ROUND((price_index.min_price -(price_index.min_price/(1+(CASE price_index.tax_c’ at line 1”;i:1;s:4742:

This is not the complete error. If needed I can provide you with the entire error file…

I temporarily worked around this by disabeling layered navigation for all attributes. After that, the category pages display just fine. But of course, I want to use layered navigation again so I need a fix for this database issue. I’m not an expert on SQL so please tell me how to fix the database.

My current SQL version is 4.1.22

Thanks for your help!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1158
Joined:  2008-04-24
 

Can you please post the entire stack trace/error message? It most likely is one of your templates which needs updating after some database schema changes.

 
Magento Community Magento Community
Magento Community
Magento Community
 
amat1
Member
 
Total Posts:  36
Joined:  2011-06-13
 

Hi Sindre,

Please find attached the report file for the SQLSTATE[42000] error (102016994).

I also experience a SQLSTATE[21000] error. But this seems to be a random error (report file 140551718).

I hope you can give me some guidance for this problem smile

Thanks!

Matthijs

File Attachments
102016994.txt  (File Size: 5KB - Downloads: 210)
140551718.txt  (File Size: 5KB - Downloads: 265)
 
Magento Community Magento Community
Magento Community
Magento Community
 
bathroomsavers
Jr. Member
 
Total Posts:  3
Joined:  2012-05-13
 

Did you resolve this? I have the same problem and desperately need to fix this. Somebody, anybody?

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageAus
Jr. Member
 
Total Posts:  1
Joined:  2012-03-12
 

I stumbled across this error tonight. It certainly seems to me that it\\\’s a Mysql 4.1 issue. The upgrade works fine on our 5.0 server but when pushed to the customer\\\’s live environment, we end up with the following.

a:5:{i:0;s:282:\\\"SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \\\'(ROUND((price_index.min_price ) * 1, 2)) FROM `catalog_product_entity` AS `e`
 
Magento Community Magento Community
Magento Community
Magento Community
 
april_oneil
Jr. Member
 
Total Posts:  3
Joined:  2012-07-13
 

Guys, I have recently read one article which shows a much easier way to upgrade, without this steps of gradual upgrading from one version to another - you can skip these and upgrade straight to the version you need. Maybe it will help to avoid all that upgrade issues.
http://www.shopping-cart-migration.com/blog/42-magento/8805-magento-upgrade-headaches-is-there-another-way

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