code: func checkDropTablePartition(meta *model.TableInfo, partName string) error {
  	oldDefs := meta.Partition.Definitions
  	for _, def := range oldDefs {
  		if strings.EqualFold(def.Name.L, strings.ToLower(partName)) {
  			if len(oldDefs) == 1 {
  				return errors.Trace(ErrDropLastPartition)
  			}
  			return nil
  		}
  	}
  	return errors.Trace(ErrDropPartitionNonExistent.GenWithStackByArgs(partName))
  }
docs: // checkDropTablePartition checks if the partition exists and does not allow deleting the last existing partition in the table.