mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 20:24:26 +00:00
WPDB: If a site is using the utf8 charset, and their version of MySQL supports utf8mb4, auto-upgrade them to utf8mb4.
This patch also resizes some indexes, to allow for the 767 byte index size limit in standard MySQL installs. See #21212 git-svn-id: https://develop.svn.wordpress.org/trunk@31349 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -280,6 +280,11 @@ switch($step) {
|
||||
case 'DB_HOST' :
|
||||
$config_file[ $line_num ] = "define('" . $constant . "'," . $padding . "'" . addcslashes( constant( $constant ), "\\'" ) . "');\r\n";
|
||||
break;
|
||||
case 'DB_CHARSET' :
|
||||
if ( 'utf8mb4' === $wpdb->charset || ( ! $wpdb->charset && $wpdb->has_cap( 'utf8mb4' ) ) ) {
|
||||
$config_file[ $line_num ] = "define('" . $constant . "'," . $padding . "'utf8mb4');\r\n";
|
||||
}
|
||||
break;
|
||||
case 'AUTH_KEY' :
|
||||
case 'SECURE_AUTH_KEY' :
|
||||
case 'LOGGED_IN_KEY' :
|
||||
|
||||
Reference in New Issue
Block a user