WPDB: When we're checking to see if the MySQL client library supports `utf8mb4`, we need a separate check for `mysqlnd` versions, which using different version numbering to `libmysqlclient`.
Props MattyRob. Fixes #31644. Built from https://develop.svn.wordpress.org/trunk@31939 git-svn-id: http://core.svn.wordpress.org/trunk@31918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
486e80bdf5
commit
2a8a5c963a
|
@ -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.
|
||||
|
|
|
@ -2810,8 +2810,17 @@ class wpdb {
|
|||
$client_version = mysql_get_client_info();
|
||||
}
|
||||
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue