Skip to content

Commit

Permalink
Merge pull request #88887 from cockroachdb/blathers/backport-release-…
Browse files Browse the repository at this point in the history
…22.1-88593
  • Loading branch information
ajwerner authored Sep 28, 2022
2 parents 97351a5 + 2b9bc66 commit c3a59b6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/sql/row/expr_walker.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,15 @@ type importRand struct {
}

func (r *importRand) reseed(pos importRandPosition) {
adjPos := (pos / reseedRandEveryN) * reseedRandEveryN
rnd := rand.New(rand.NewSource(int64(adjPos)))
adjPos := int64((pos / reseedRandEveryN) * reseedRandEveryN)
if r.Rand == nil {
r.Rand = rand.New(rand.NewSource(adjPos))
} else {
r.Rand.Seed(adjPos)
}
for i := int(pos % reseedRandEveryN); i > 0; i-- {
_ = rnd.Float64()
_ = r.Rand.Float64()
}

r.Rand = rnd
r.pos = pos
}

Expand Down

0 comments on commit c3a59b6

Please sign in to comment.