Collation (general and 520) mixed up by WP
-
Hi, I’m not sure if that issue has been resolved, but it is happening too often on installations I manage.
The case: the original WP was installed time ago on database with support for utf8mb4 and utf8mb4_unicode_general_ci.
Those blog has the collation (DB_COLLATE) set to an empty string.
As soon as the provider upgrade the database, if new plugins are installed, their tables are created (they use the $charset_collate variable) with utf8mb4_unicode_520_ci but WP standard tables are NOT updated to that collation. So every possible SQL join using matching text fields returns an error.
Would not be a good choice, when the collate is not specified, if WP converts it’s own tables? Otherwise there is even a discrepancy between the collate returned by $wpdb and the actual table collate.
For a specific case, a new installation of WooCommerce has all the (extra) tables with 520 collate while the blog has general collate.
Thank you, Stefano.
- The topic ‘Collation (general and 520) mixed up by WP’ is closed to new replies.