diff --git a/wp-includes/version.php b/wp-includes/version.php index 643d351aed..1b4cf12084 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-beta3-31938'; +$wp_version = '4.2-beta3-31939'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index ae0ec7ec94..91ad6f2286 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -2810,7 +2810,16 @@ class wpdb { $client_version = mysql_get_client_info(); } - return version_compare( $client_version, '5.5.3', '>=' ); + /* + * libmysql has supported utf8mb4 since 5.5.3, same as the MySQL server. + * mysqlnd has supported utf8mb4 since 5.0.9. + */ + if ( false !== strpos( $client_version, 'mysqlnd' ) ) { + $client_version = preg_replace( '/^\D+([\d.]+).*/', '$1', $client_version ); + return version_compare( $client_version, '5.0.9', '>=' ); + } else { + return version_compare( $client_version, '5.5.3', '>=' ); + } } return false;