mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 10:44:26 +00:00
Database: Normalise index names in dbDelta().
When comparing index definitions, normalise the index names to lower case, as they are not case sensitive within MySQL. Fixes #34874. git-svn-id: https://develop.svn.wordpress.org/trunk@38591 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -802,6 +802,29 @@ class Tests_dbDelta extends WP_UnitTestCase {
|
||||
$this->assertEmpty( $updates );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 34874
|
||||
*/
|
||||
function test_key_names_are_not_case_sensitive_and_do_not_recreate_indices() {
|
||||
global $wpdb;
|
||||
|
||||
$updates = dbDelta(
|
||||
"
|
||||
CREATE TABLE {$wpdb->prefix}dbdelta_test (
|
||||
id bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
column_1 varchar(255) NOT NULL,
|
||||
column_2 text,
|
||||
column_3 blob,
|
||||
PRIMARY KEY (id),
|
||||
KEY KEY_1 (column_1),
|
||||
KEY compOUND_key (id,column_1),
|
||||
FULLTEXT KEY FULLtext_kEY (column_1)
|
||||
) ENGINE=MyISAM
|
||||
", false );
|
||||
|
||||
$this->assertEmpty( $updates );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 31679
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user