Skip to content

Commit

Permalink
sql: schema changer not to validate shard column constraint
Browse files Browse the repository at this point in the history
Fixes cockroachdb#67613
The shard column constraint is created internally and should
be automatically upheld. So not need to verify it when backfilling
hash sharded indexes.

Release not: None
  • Loading branch information
chengxiong-ruan committed Dec 20, 2021
1 parent 93c9a3b commit 2d98984
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sql/create_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (p *planner) setupFamilyAndConstraintForShard(
if err != nil {
return err
}
ck.Validity = descpb.ConstraintValidity_Validating
ck.Validity = descpb.ConstraintValidity_Validated
tableDesc.AddCheckMutation(ck, descpb.DescriptorMutation_ADD)
}
return nil
Expand Down

0 comments on commit 2d98984

Please sign in to comment.