Collation problem upgrading from 1.3.8 to 1.3.9
I'm running the database upgrade from zc_install and got the following error ...
Code:
1253 COLLATION 'latin1_general_ci' is not valid for CHARACTER SET 'utf8'
in:
[CREATE TABLE zen_counter_history_clean as SELECT * FROM zen_counter_history WHERE 1 GROUP BY startdate COLLATE latin1_general_ci;]
I see in phpMyAdmin that my tables are utf8_unicode_ci and type MyISAM.
What is your recommendation on getting the database upgraded?
Re: Collation problem upgrading from 1.3.8 to 1.3.9
You will have to edit the upgrade sql and change latin1_general_ci to utf8
Re: Collation problem upgrading from 1.3.8 to 1.3.9
Or could I use phpMyAdmin and change all my tables from utf8 to latin1_general_ci instead? Not sure if doing that would corrupt my data or not.
And then run the script as is.
Re: Collation problem upgrading from 1.3.8 to 1.3.9
Because I'm not seeing how to edit the mysql_upgrade_zencart_138_to_139.sql file.
The line in question is ...
Code:
# fix counter_history race condition
#NEXT_X_ROWS_AS_ONE_COMMAND:5
CREATE TABLE counter_history_clean as
SELECT * FROM counter_history WHERE 1 GROUP BY startdate;
DROP TABLE counter_history;
RENAME TABLE counter_history_clean
TO counter_history;
And I don't see the mention of "latin" anywhere in this file. I don't find the word "collate" in the script either.
I also wonder... If the above sql statement fails, does it abort the script? Or do the subsequent sql statements get run nevertheless?
Re: Collation problem upgrading from 1.3.8 to 1.3.9
Which 1.3.9 version are you upgrading to?
Re: Collation problem upgrading from 1.3.8 to 1.3.9
Quote:
Because I'm not seeing how to edit the mysql_upgrade_zencart_138_to_139.sql file.
My bad should have stated installer
Quote:
Originally Posted by DrByte
Evidently you've created the table with UTF8 character set. If that's what you want to continue using, then change the DB_CHARSET in /zc_install/includes/installer_params.php to 'utf8' before using zc_install.
Post#6
http://www.zen-cart.com/forum/showthread.php?t=157297
Re: Collation problem upgrading from 1.3.8 to 1.3.9
Upgrading to 1.3.9h.
And yes, setting DB_CHARSET from latin1 to utf8 appears to work. Database upgraded successfully.
Thanks.
Re: Collation problem upgrading from 1.3.8 to 1.3.9
So this is the Easy 3 step Upgrade ! :laugh:
Re: Collation problem upgrading from 1.3.8 to 1.3.9
Quote:
Originally Posted by
stuffdone
So this is the Easy 3 step Upgrade ! :laugh:
@stuffdone,
Maybe you would like to donate your time and help with the zencart community for detailed instructions on upgrading..
Quote:
Nothing is easy when you procrastinate 10 versions behind schedule...
Re: Collation problem upgrading from 1.3.8 to 1.3.9
Thank you for the info on editing DB_CHARSET!