Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #10404, comment 5


Ignore:
Timestamp:
02/19/2013 05:07:12 AM (12 years ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10404, comment 5

    initial v1  
    22
    33Here is the error after a recent plugin activation:
     4{{{
    45WordPress database error Too many keys specified; max 64 keys allowed for query ALTER TABLE wp_2_store_locator ADD INDEX (sl_store) made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include_once('/plugins/store-locator-le/store-locator-le.php'), wpCSL_plugin__slplus->__construct, call_user_func_array, SLPlus_Activate::update, SLPlus_Activate->install_main_table, SLPlus_Activate->dbupdater, dbDelta
    5 
     6}}}
    67
    78Here is the dbDelta structure from my plugin:
     9{{{
    810                $sql = "CREATE TABLE $table_name (
    911                        sl_id mediumint(8) unsigned NOT NULL auto_increment,
     
    4042                        ";
    4143dbDelta($sql)
    42 
     44}}}
    4345
    4446
    4547The table now has a number of duplicate indexes:
    46 
     48{{{
    4749sl_store
    4850sl_store_2
     
    6062...
    6163sl_longitude_21
    62 
     64}}}
    6365
    6466Am I using dbDelta incorrectly or is this still a known issue?  Any workarounds?