diff options
author | jocuri%softhome.net <> | 2005-01-09 02:09:28 +0000 |
---|---|---|
committer | jocuri%softhome.net <> | 2005-01-09 02:09:28 +0000 |
commit | f56b76db0fbf990a3dfef9dfe47ba49cf48ef2b1 (patch) | |
tree | 4732ef76c5a90dbea2201bfa0f92aa0110a7e424 /checksetup.pl | |
parent | 5fed7ece4b48ecd990d50be4f09f13954f06c075 (diff) | |
download | bugs-f56b76db0fbf990a3dfef9dfe47ba49cf48ef2b1.tar bugs-f56b76db0fbf990a3dfef9dfe47ba49cf48ef2b1.tar.gz bugs-f56b76db0fbf990a3dfef9dfe47ba49cf48ef2b1.tar.bz2 bugs-f56b76db0fbf990a3dfef9dfe47ba49cf48ef2b1.tar.xz bugs-f56b76db0fbf990a3dfef9dfe47ba49cf48ef2b1.zip |
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.
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-x | checksetup.pl | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/checksetup.pl b/checksetup.pl index 7e77af97f..f9e93835e 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -3443,15 +3443,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"); |