WPDB: When checking to see if we can use utf8mb4, we also need to make sure PHP's MySQL client library is capable of using utf8mb4.

See #21212


Built from https://develop.svn.wordpress.org/trunk@31391


git-svn-id: http://core.svn.wordpress.org/trunk@31372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2015-02-09 22:28:28 +00:00
parent 93fced2d15
commit 980668299c
2 changed files with 9 additions and 2 deletions

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.2-alpha-31390'; $wp_version = '4.2-alpha-31391';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -2801,7 +2801,14 @@ class wpdb {
case 'set_charset' : case 'set_charset' :
return version_compare( $version, '5.0.7', '>=' ); return version_compare( $version, '5.0.7', '>=' );
case 'utf8mb4' : // @since 4.1.0 case 'utf8mb4' : // @since 4.1.0
return version_compare( $version, '5.5.3', '>=' ); if ( version_compare( $version, '5.5.3', '<' ) ) {
return false;
}
if ( $this->use_mysqli ) {
return mysqli_get_client_version( $this->dbh ) >= 50503;
} else {
return mysql_get_client_version( $this->dbh ) >= 50503;
}
} }
return false; return false;