Skip to content

Commit

Permalink
sql: Fix mutex leak within TestCheckConstraintDropAndColumn
Browse files Browse the repository at this point in the history
The test does not unlock the jobControlMu mutex in the case
of an error. This PR fixes that.

Epic: none
Fixes: #107433
Release note: none
  • Loading branch information
rimadeodhar committed Jul 31, 2023
1 parent 37e61e9 commit 8de7765
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/sql/schema_changer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7006,6 +7006,7 @@ func TestCheckConstraintDropAndColumn(t *testing.T) {
jobControlMu.Lock()
scJob, err := s.JobRegistry().(*jobs.Registry).LoadJob(ctx, jobID)
if err != nil {
jobControlMu.Unlock()
return err
}
pl := scJob.Payload()
Expand Down

0 comments on commit 8de7765

Please sign in to comment.