summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortravis%sedsystems.ca <>2005-01-14 03:03:46 +0100
committertravis%sedsystems.ca <>2005-01-14 03:03:46 +0100
commit427d238b1a9d03d2da9f561f3abc3b14eb95bf59 (patch)
tree9f1ca4a61c90046ccd2101cc7e04d0d2ec55ac46
parent889d3425c6b9f7fa1434c19257455ae0f131c76e (diff)
downloadbugzilla-427d238b1a9d03d2da9f561f3abc3b14eb95bf59.tar.gz
bugzilla-427d238b1a9d03d2da9f561f3abc3b14eb95bf59.tar.xz
Bug 278148: checksetup.pl *still* errors when trying to drop index on milestones table
Patch by Max K-A <mkanat@kerio.com> r=travis a=justdave
-rwxr-xr-xchecksetup.pl11
1 files changed, 8 insertions, 3 deletions
diff --git a/checksetup.pl b/checksetup.pl
index f4835bb26..865c22a43 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -2365,9 +2365,14 @@ sub DropIndexes ($)
#
next if exists $SEEN{$$ref[2]};
- my $dropSth = $dbh->prepare("ALTER TABLE $table DROP INDEX $$ref[2]");
- $dropSth->execute;
- $dropSth->finish;
+ if ($$ref[2] eq 'PRIMARY') {
+ # The syntax for dropping a PRIMARY KEY is different
+ # from the normal DROP INDEX syntax.
+ $dbh->do("ALTER TABLE $table DROP PRIMARY KEY");
+ }
+ else {
+ $dbh->do("ALTER TABLE $table DROP INDEX $$ref[2]");
+ }
$SEEN{$$ref[2]} = 1;
}