Skip to content

Commit

Permalink
Simplify buffer allocation
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Dec 22, 2024
1 parent 6264397 commit 3a172c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/mysql/binlog/binlog_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func ParseBinaryJSONDiff(data []byte) (sqltypes.Value, error) {
// Reasonable estimate of the space we'll need to build the SQL
// expression in order to try and avoid reallocations w/o
// overallocating too much.
diff.Grow(int(float32(len(data)) * 1.25))
diff.Grow(len(data) + 80)
pos := 0
outer := false
innerStr := ""
Expand Down

0 comments on commit 3a172c0

Please sign in to comment.