Skip to:
Content

bbPress.org

Ticket #3026: 3026.patch

File 3026.patch, 1.2 KB (added by johnjamesjacoby, 8 years ago)

Limit maximum index length to 191

  • src/includes/admin/converter.php

    # This patch file was generated by NetBeans IDE
    # Following Index: paths are relative to: /Users/johnjamesjacoby/Work/VVV/www/wordpress-develop/src/wp-content/plugins/bbpress
    # This patch can be applied using context Tools: Patch action on respective folder.
    # It uses platform neutral UTF-8 encoding and \n newlines.
    # Above lines and this line are ignored by the patching process.
     
    649649                        $charset_collate .= " COLLATE $bbp_db->collate";
    650650                }
    651651
     652                $max_index_length = 191;
     653
    652654                /** Translator ****************************************************/
    653655
    654656                $sql = "CREATE TABLE {$table_name} (
     
    657659                                        value_id bigint(20) unsigned not null default '0',
    658660                                        meta_key varchar(255) null,
    659661                                        meta_value varchar(255) null,
    660                                 PRIMARY KEY  (meta_id),
     662                                PRIMARY KEY (meta_id),
    661663                                        KEY value_id (value_id),
    662                                         KEY meta_join (meta_key, meta_value) ) {$charset_collate};";
     664                                        KEY meta_join (meta_key({$max_index_length}), meta_value({$max_index_length})) ) {$charset_collate};";
    663665
    664666                dbDelta( $sql );
    665667        }