Skip to content

Commit

Permalink
sync_diff_inspector: fix a index of range panic (#446)
Browse files Browse the repository at this point in the history
  • Loading branch information
glorv authored Jun 18, 2021
1 parent 09e10c7 commit e476ce1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/diff/chunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func splitRangeByRandom(db *sql.DB, chunk *ChunkRange, count int, schema string,
break
}
newChunk.update(column.Name.O, "", randomValues[j][i], false, true)
} else if i == len(randomValues[0]) {
} else if i == len(randomValues[j]) {
newChunk.update(column.Name.O, randomValues[j][i-1], "", true, false)
} else {
newChunk.update(column.Name.O, randomValues[j][i-1], randomValues[j][i], true, true)
Expand Down

0 comments on commit e476ce1

Please sign in to comment.