Changeset 35487
- Timestamp:
- 11/01/2015 11:09:49 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/upgrade.php
r35170 r35487 2196 2196 $index_ary[$keyname]['columns'][] = array('fieldname' => $tableindex->Column_name, 'subpart' => $tableindex->Sub_part); 2197 2197 $index_ary[$keyname]['unique'] = ($tableindex->Non_unique == 0)?true:false; 2198 $index_ary[$keyname]['index_type'] = $tableindex->Index_type; 2198 2199 } 2199 2200 … … 2207 2208 } elseif ( $index_data['unique'] ) { 2208 2209 $index_string .= 'UNIQUE '; 2210 } 2211 if ( 'FULLTEXT' === strtoupper( $index_data['index_type'] ) ) { 2212 $index_string .= 'FULLTEXT '; 2209 2213 } 2210 2214 $index_string .= 'KEY '; -
trunk/tests/phpunit/tests/dbdelta.php
r33425 r35487 26 26 global $wpdb; 27 27 28 // Forcing MyISAM, because InnoDB only started supporting FULLTEXT indexes in MySQL 5.7. 28 29 $wpdb->query( 29 30 " … … 33 34 PRIMARY KEY (id), 34 35 KEY key_1 (column_1), 35 KEY compoud_key (id,column_1) 36 ) 36 KEY compoud_key (id,column_1), 37 FULLTEXT KEY fulltext_key (column_1) 38 ) ENGINE=MyISAM 37 39 " 38 40 ); … … 249 251 250 252 } 251 253 254 /** 255 * Test that FULLTEXT indexes are detected. 256 * @ticket 14445 257 */ 258 public function test_fulltext_index() { 259 global $wpdb; 260 261 $updates = dbDelta( 262 " 263 CREATE TABLE {$wpdb->prefix}dbdelta_test ( 264 id bigint(20) NOT NULL AUTO_INCREMENT, 265 column_1 varchar(255) NOT NULL, 266 PRIMARY KEY (id), 267 KEY key_1 (column_1), 268 KEY compoud_key (id,column_1), 269 FULLTEXT KEY fulltext_key (column_1) 270 ) 271 ", false 272 ); 273 274 $this->assertEmpty( $updates ); 275 } 276 252 277 // 253 278 // Assertions.
Note: See TracChangeset
for help on using the changeset viewer.