From: jocuri%softhome.net <> Date: Sun, 9 Jan 2005 02:10:25 +0000 (+0000) Subject: Patch for bug 277303: checksetup.pl shouldn't emit a syntax error when trying to... X-Git-Tag: bugzilla-2.18~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43e09e602e662356331017ba67c5216425783a43;p=thirdparty%2Fbugzilla.git Patch for bug 277303: checksetup.pl shouldn't emit a syntax error when trying to fix indexes on the milestones table; patch by Max K-A , r=wurblzap, a=justdave. --- diff --git a/checksetup.pl b/checksetup.pl index 5a30e814e7..60620f3293 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -3336,15 +3336,8 @@ if (GetFieldDef("products", "product")) { " AND product_id = $product_id"); } print "Fixing Indexes and Uniqueness.\n"; - $dbh->do("ALTER TABLE milestones DROP INDEX product"); - - # mkanat@kerio.com - bug 244756 - # Silently drop the PRIMARY key if a buggy mysqldump has put it there. - # Don't print any error messages if the index isn't there. - my $originalprintwarn = $dbh->{'PrintWarn'}; - $dbh->{'PrintWarn'} = 0; - $dbh->do("ALTER TABLE milestones DROP INDEX PRIMARY"); - $dbh->{'PrintWarn'} = $originalprintwarn; + # Drop any indexes that may exist on the milestones table. + DropIndexes('milestones'); $dbh->do("ALTER TABLE milestones ADD UNIQUE (product_id, value)"); $dbh->do("ALTER TABLE bugs DROP INDEX product");