From: mkanat%kerio.com <> Date: Sat, 23 Apr 2005 09:07:46 +0000 (+0000) Subject: Bug 290277: Index renaming may fail if misnamed PRIMARY indexes exist X-Git-Tag: bugzilla-2.19.3~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6c829a7f63c7048705d5bf86c60df015993851e;p=thirdparty%2Fbugzilla.git Bug 290277: Index renaming may fail if misnamed PRIMARY indexes exist Patch By Max Kanat-Alexander r=mkanat, a=justdave --- diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm index cb7cdbe7ed..921b27195c 100644 --- a/Bugzilla/DB/Mysql.pm +++ b/Bugzilla/DB/Mysql.pm @@ -277,17 +277,30 @@ sub bz_setup_database { # Certain indexes had names in Schema that did not easily conform # to a standard. We store those names here, so that they # can be properly renamed. + # Also, sometimes an old mysqldump would incorrectly rename + # unique indexes to "PRIMARY", so we address that here, also. my $bad_names = { # 'when' is a possible leftover from Bugzillas before 2.8 bugs_activity => ['when', 'bugs_activity_bugid_idx', 'bugs_activity_bugwhen_idx'], + cc => ['PRIMARY'], longdescs => ['longdescs_bugid_idx', 'longdescs_bugwhen_idx'], flags => ['flags_bidattid_idx'], flaginclusions => ['flaginclusions_tpcid_idx'], flagexclusions => ['flagexclusions_tpc_id_idx'], + keywords => ['PRIMARY'], + milestones => ['PRIMARY'], profiles_activity => ['profiles_activity_when_idx'], - group_control_map => ['group_control_map_gid_idx'] + group_control_map => ['group_control_map_gid_idx', 'PRIMARY'], + user_group_map => ['PRIMARY'], + group_group_map => ['PRIMARY'], + email_setting => ['PRIMARY'], + bug_group_map => ['PRIMARY'], + category_group_map => ['PRIMARY'], + watch => ['PRIMARY'], + namedqueries => ['PRIMARY'], + series_data => ['PRIMARY'], # series_categories is dealt with below, not here. };