mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-08 16:41:44 +01:00
Database: Use the utf8mb4_unicode_520_ci
collation, when available.
The `utf8mb4_unicode_520_ci` (Unicode Collation Algorithm 5.2.0, October 2010) collation is an improvement over `utf8mb4_unicode_ci` (UCA 4.0.0, November 2003). There is no word on when MySQL will support later UCAs. Fixes #32105. Built from https://develop.svn.wordpress.org/trunk@37523 git-svn-id: http://core.svn.wordpress.org/trunk@37491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
89d0b337e0
commit
db3917d491
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.6-alpha-37522';
|
$wp_version = '4.6-alpha-37523';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
|
@ -765,6 +765,11 @@ class wpdb {
|
|||||||
$this->collate = str_replace( 'utf8_', 'utf8mb4_', $this->collate );
|
$this->collate = str_replace( 'utf8_', 'utf8mb4_', $this->collate );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// _unicode_520_ is a better collation, we should use that when it's available.
|
||||||
|
if ( $this->has_cap( 'utf8mb4_520' ) && 'utf8mb4_unicode_ci' === $this->collate ) {
|
||||||
|
$this->collate = 'utf8mb4_unicode_520_ci';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -3193,6 +3198,7 @@ class wpdb {
|
|||||||
*
|
*
|
||||||
* @since 2.7.0
|
* @since 2.7.0
|
||||||
* @since 4.1.0 Support was added for the 'utf8mb4' feature.
|
* @since 4.1.0 Support was added for the 'utf8mb4' feature.
|
||||||
|
* @since 4.6.0 Support was added for the 'utf8mb4_520' feature.
|
||||||
*
|
*
|
||||||
* @see wpdb::db_version()
|
* @see wpdb::db_version()
|
||||||
*
|
*
|
||||||
@ -3231,6 +3237,8 @@ class wpdb {
|
|||||||
} else {
|
} else {
|
||||||
return version_compare( $client_version, '5.5.3', '>=' );
|
return version_compare( $client_version, '5.5.3', '>=' );
|
||||||
}
|
}
|
||||||
|
case 'utf8mb4_520' : // @since 4.6.0
|
||||||
|
return version_compare( $version, '5.6', '>=' );
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user