diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 330cfad8e9..b1c4bc28fa 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -1980,12 +1980,23 @@ function dbDelta( $queries = '', $execute = true ) { $index_columns .= '('.$column_data['subpart'].')'; } } + + // The alternative index string doesn't care about subparts + $alt_index_columns = preg_replace( '/\([^)]*\)/', '', $index_columns ); + // Add the column list to the index create string. - $index_string .= ' ('.$index_columns.')'; - if (!(($aindex = array_search($index_string, $indices)) === false)) { - unset($indices[$aindex]); - // todo: Remove this? - //echo "
{$table}:
Found index:".$index_string."
\n"; + $index_strings = array( + "$index_string ($index_columns)", + "$index_string ($alt_index_columns)", + ); + + foreach( $index_strings as $index_string ) { + if ( ! ( ( $aindex = array_search( $index_string, $indices ) ) === false ) ) { + unset( $indices[ $aindex ] ); + break; + // todo: Remove this? + //echo "
{$table}:
Found index:".$index_string."
\n"; + } } // todo: Remove this? //else echo "
{$table}:
Did not find index:".$index_string."
".print_r($indices, true)."
\n"; diff --git a/wp-includes/version.php b/wp-includes/version.php index ffb04eed0c..9d4dd86bf3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-beta4-32107'; +$wp_version = '4.2-beta4-32108'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.