Skip to content

Commit

Permalink
ddl: delete pkIsHandle log in drop index (#39088)
Browse files Browse the repository at this point in the history
  • Loading branch information
Defined2014 authored Nov 11, 2022
1 parent 483d2bc commit b702ac7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ddl/ddl_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -6542,10 +6542,7 @@ func CheckIsDropPrimaryKey(indexName model.CIStr, indexInfo *model.IndexInfo, t
if indexInfo == nil && !t.Meta().PKIsHandle {
return isPK, dbterror.ErrCantDropFieldOrKey.GenWithStackByArgs("PRIMARY")
}
if t.Meta().PKIsHandle {
return isPK, dbterror.ErrUnsupportedModifyPrimaryKey.GenWithStack("Unsupported drop primary key when the table's pkIsHandle is true")
}
if t.Meta().IsCommonHandle {
if t.Meta().IsCommonHandle || t.Meta().PKIsHandle {
return isPK, dbterror.ErrUnsupportedModifyPrimaryKey.GenWithStack("Unsupported drop primary key when the table is using clustered index")
}
}
Expand Down

0 comments on commit b702ac7

Please sign in to comment.