From 02f8d4fb6a4be89050653d31c962ca8ed3dca919 Mon Sep 17 00:00:00 2001 From: "travis%sedsystems.ca" <> Date: Fri, 14 Jan 2005 02:02:19 +0000 Subject: [PATCH] Bug 278148: checksetup.pl *still* errors when trying to drop index on milestones table Patch by Max K-A r=travis a=justdave --- checksetup.pl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/checksetup.pl b/checksetup.pl index 38dc064972..ec7aaa6a82 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -2232,9 +2232,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; } -- 2.47.2