Jump to content

UTF8 tables


keat

Recommended Posts

I've restored a copy of the V3 and am running the upgrade to 6.1.5 again.

The site was reporting it's self as 3.0.18 however, I've no idea how accurate this is, as all these V3's are hybrids.

Could that make a difference ?

 

Link to comment
Share on other sites

This particular site has been messed with, updated, moved servers so many times, I'm not surprised that there would be errors.

I re-ran the upgrade, but there are still a number of UTF8 tables.

I'm now going to perform a clean install and compare.

Link to comment
Share on other sites

There is a step in the database schema upgrade cycles where each table has a new table created with a _utf8 suffix and having a utf8 character set and collation. Then, all the data is copied over from the existing table to the utf8 table relying on the database server to correct regional character set high-order bytes (like the British Pound currency symbol) to the appropriate utf8 byte pair. Then, the original table is dropped and the utf8 table is renamed back to the original table's name.

For the result to be that there are tables with the original names and related tables with the utf8 suffix suggests that:
1. That step ran out of time
2. The username accessing the database for this step has insufficient privileges

No.1 is unlikely.

No.2 requires that the user have DROP privileges so that the utf8 tables can be renamed. That can't happen if the original tables are still there.

(During schema upgrades, CubeCart has little to no code to log and ultimately report any errors that may have occured.)

In your hosting control panel, have the MySQL Admin Tool examine the privileges of the user CubeCart uses to access the database. Using phpMyAdmin, examine the structure of a non-utf8 table, CubeCart_category, for example. If this table is still 'latin', then reason No.2 is likely.

 

Link to comment
Share on other sites

There were about a dozen utf8 tables, all of which were empty.

I performed a clean install and made a note of the database tables then compared against my updated site.

The database user had full privileges. 

I can't see anything missing from the site.

I seem to recall that my original site did this a year ago.

I updated another v3 last week which is sitting on a different server and this has no rogue utf8 tables.

 

Link to comment
Share on other sites

I've just jumped on the server and taken a quick look at the original V3, and all tables witch exception to one are latin1_swedish_ci, what ever that means.

There is one table (cats_idx) which is UTF8

 

On one of the test updates, I took a sneaky look in PHP MYAdmin to see what tables were being created, and somewhere around  V4 upgrade processes, I could see tables with a UTF8 suffix

Link to comment
Share on other sites

It would be just fantastic if your account could enable General Logging on the database server (would need a VPS complete with database as part of it).

Then go through an upgrade sequence. The queries logged should show what tables are being found, created, data copied, dropped and renamed.

 

Link to comment
Share on other sites

The upgrade code, when making UTF8 tables, is looking for 'latin1' anywhere in the stated CREATE statement.

"You have investigated the table structure and see that your tables are 'latin1_swedish_ci'. But this is the COLLATION, not the CHARSET.)

So, this is good. I see statements such as:

CREATE TABLE `CubeCart_Downloads_utf8` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `customerId` int(11) NOT NULL DEFAULT '0',
  `cart_order_id` varchar(32) NOT NULL DEFAULT '',
  `noDownloads` int(11) NOT NULL DEFAULT '0',
  `expire` int(11) NOT NULL DEFAULT '0',
  `productId` int(11) NOT NULL DEFAULT '0',
  `accessKey` varchar(10) NOT NULL DEFAULT '',
  KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8

Evidently, however, the command $db->misc() (via $db->_sqlDebug) is returning false because there is no following statement "SHOW TABLES LIKE CubeCart_Downloads_utf8". (The CubeCart_system_error_log may be present by this time. So, look in there.)

So, the next step is to find the database server's error log. Find out if there is an error about the above statement.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...