From fcff6de3c332af489fbcaa13c0ba6b4fbc0ed95c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tautvidas=20Sipavi=C4=8Dius?= Date: Mon, 22 May 2017 18:55:18 +0300 Subject: [PATCH] Skip conversion for charset utf8 -> utf8mb4 --- lib/Config/Populator.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Config/Populator.php b/lib/Config/Populator.php index 896b4559ca..f3c38dd9d8 100644 --- a/lib/Config/Populator.php +++ b/lib/Config/Populator.php @@ -328,6 +328,8 @@ class Populator { $destination_charset = $wpdb->get_var('SELECT @@SESSION.character_set_connection'); if($source_charset === $destination_charset) return; + // UTF8 is a superset of UTF8MB4, thus a conversion is not necessary + if(substr($source_charset, 0, 4) === 'utf8' && $destination_charset === 'utf8mb4') return; $tables = array( 'segments' => array('name', 'type', 'description'),