Make WordPress Core

Ticket #36948: spatial_index_patch.patch

File spatial_index_patch.patch, 721 bytes (added by stuporglue, 9 years ago)

This patch allows spatial indexes to be added with dbDelta

  • wp-admin/includes/upgrade.php

     
    21982198                                case 'primary':
    21992199                                case 'index':
    22002200                                case 'fulltext':
     2201                                case 'spatial':
    22012202                                case 'unique':
    22022203                                case 'key':
    22032204                                        $validfield = false;
     
    23012302                                if ( 'FULLTEXT' === strtoupper( $index_data['index_type'] ) ) {
    23022303                                        $index_string .= 'FULLTEXT ';
    23032304                                }
     2305                                if ( 'SPATIAL' === strtoupper( $index_data['index_type'] ) ) {
     2306                                        $index_string .= 'SPATIAL ';
     2307                                }
    23042308                                $index_string .= 'KEY ';
    23052309                                if ($index_name != 'PRIMARY') {
    23062310                                        $index_string .= $index_name;