Commit f56b76db authored by jocuri%softhome.net's avatar jocuri%softhome.net

Patch for bug 277303: checksetup.pl shouldn't emit a syntax error when trying to…

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 <mkanat@kerio.com>, r=wurblzap, a=justdave.
parent 5fed7ece
...@@ -3443,15 +3443,8 @@ if (GetFieldDef("products", "product")) { ...@@ -3443,15 +3443,8 @@ if (GetFieldDef("products", "product")) {
" AND product_id = $product_id"); " AND product_id = $product_id");
} }
print "Fixing Indexes and Uniqueness.\n"; print "Fixing Indexes and Uniqueness.\n";
$dbh->do("ALTER TABLE milestones DROP INDEX product"); # Drop any indexes that may exist on the milestones table.
DropIndexes('milestones');
# 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;
$dbh->do("ALTER TABLE milestones ADD UNIQUE (product_id, value)"); $dbh->do("ALTER TABLE milestones ADD UNIQUE (product_id, value)");
$dbh->do("ALTER TABLE bugs DROP INDEX product"); $dbh->do("ALTER TABLE bugs DROP INDEX product");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment