Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2006
    Posts
    514
    Plugin Contributions
    0

    Default Database upgrade success but has one strange utf8 table

    I upgraded from 138a to 139d today. The db upgrade was successful without any errors and the site works ok so far in my testing.

    I noticed however that one table "counter_history" is in utf-8_general_ci while all my other other tables are in latin1.

    Is this what is suppose to happen? or did I make a mistake somewhere? The counter history is working fine.

    here is that table before and after the upgrade (phpmyadmin dump)

    Before:
    PHP Code:
    -- Table structure for table `counter_history`
    --

    DROP TABLE IF EXISTS `counter_history`;
    CREATE TABLE IF NOT EXISTS `counter_history` (
      `
    startdatechar(8) default NULL,
      `
    counterint(12) default NULL,
      `
    session_counterint(12) default NULL
    ENGINE=MyISAM DEFAULT CHARSET=latin1;

    -- 

    After:

    PHP Code:
    -- Table structure for table `counter_history`
    --

    DROP TABLE IF EXISTS `counter_history`;
    CREATE TABLE IF NOT EXISTS `counter_history` (
      `
    startdatechar(8character set latin1 NOT NULL default '',
      `
    counterint(12) default NULL,
      `
    session_counterint(12) default NULL,
      
    PRIMARY KEY  (`startdate`)
    ENGINE=MyISAM DEFAULT CHARSET=utf8;

    -- 
    This appears to be the only difference in my dbs.

    Before the upgrade I created 2 new "my_db_charset.php" files and defined latin1 as the CHARSET in both: : define('DB_CHARSET', 'latin1'); and left the installer_params.php unchanged as latin1.


    or should I do the upgrade again?
    Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

  2. #2
    Join Date
    Jan 2004
    Posts
    58,455
    Blog Entries
    3
    Plugin Contributions
    111

    Default Re: Database upgrade success but has one strange utf8 table

    There's nothing wrong.
    The upgrade intentionally deletes the old counter_history table and recreates it.
    And the table was created using the new character set (presumably set by defaults on your server).
    It will function just fine.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Nov 2006
    Posts
    514
    Plugin Contributions
    0

    Default Re: Database upgrade success but has one strange utf8 table

    Ah, I see now....yes my server MySQL client version: 5.0.90 seems to not like latin1 and any chance it gets it defaults to utf8.

    If I leave it as is, will I be able to upgrade to ZC 2.0 ok?
    Zencart 1.3.9h - PHP 5.2.13 - My SQL 5.0.84 - Apache 1.3.41

  4. #4
    Join Date
    Jan 2004
    Posts
    58,455
    Blog Entries
    3
    Plugin Contributions
    111

    Default Re: Database upgrade success but has one strange utf8 table

    Let's deal with 2.0 when that time comes.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    May 2006
    Location
    Charlottesville VA
    Posts
    1,214
    Plugin Contributions
    18

    Default Re: Database upgrade success but has one strange utf8 table

    I ran into a problem with an upgrade with this same table - only it stopped at that point because of that same scenario.

    1253 COLLATION 'latin1_general_ci' is not valid for CHARACTER SET 'utf8'
    in:
    [CREATE TABLE counter_history_clean as SELECT * FROM counter_history WHERE 1 GROUP BY startdate COLLATE latin1_general_ci;]

    I've never had this happen before on my server and an upgrade so I went back to the original hosting and had the same thing happen on the other server.

    So now I'm stuck and don't see a way past this. I've tried a couple of things but it keeps hanging up on this table.

  6. #6
    Join Date
    Jan 2004
    Posts
    58,455
    Blog Entries
    3
    Plugin Contributions
    111

    Default Re: Database upgrade success but has one strange utf8 table

    change the DB_CHARSET in the installer_params to 'latin1' instead of 'utf8'
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    May 2006
    Location
    Charlottesville VA
    Posts
    1,214
    Plugin Contributions
    18

    Default Re: Database upgrade success but has one strange utf8 table

    Beautiful! Thanks.

    Now can you explain what happened? Or is it just not incredibly important to know?

  8. #8
    Join Date
    Jan 2004
    Posts
    58,455
    Blog Entries
    3
    Plugin Contributions
    111

    Default Re: Database upgrade success but has one strange utf8 table

    Your database is latin1, and your ZC upgrader was attempting to treat it as utf8.
    If your database isn't utf8, don't treat it as utf8.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    May 2006
    Location
    Charlottesville VA
    Posts
    1,214
    Plugin Contributions
    18

    Default Re: Database upgrade success but has one strange utf8 table

    aha, thanks!

 

 

Similar Threads

  1. made products_description table utf8 compatible?
    By soki in forum General Questions
    Replies: 2
    Last Post: 22 May 2008, 06:22 PM
  2. Replies: 3
    Last Post: 4 Sep 2007, 01:06 PM
  3. Database upgrade 1.3.0.1 to 1.3.0.2 - some table skipped?
    By donnyw in forum Upgrading from 1.2 to 1.3.x
    Replies: 6
    Last Post: 15 Aug 2006, 03:37 AM
  4. Cant Add Subcategories After Upgrade Very Strange
    By enchantedone in forum Upgrading from 1.2 to 1.3.x
    Replies: 3
    Last Post: 30 Jun 2006, 05:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •