Skip to content

Commit

Permalink
allow zero value of max-multi-update-row-size
Browse files Browse the repository at this point in the history
  • Loading branch information
amyangfei committed Feb 8, 2023
1 parent e11760b commit 7ca30c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/sink/mysql/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,10 @@ func getMaxMultiUpdateRowSize(values url.Values, maxMultiUpdateRowSize *int) err
if err != nil {
return cerror.WrapError(cerror.ErrMySQLInvalidConfig, err)
}
if c <= 0 {
if c < 0 {
return cerror.WrapError(cerror.ErrMySQLInvalidConfig,
fmt.Errorf("invalid max-multi-update-row-size %d, which must be greater than 0", c))
fmt.Errorf("invalid max-multi-update-row-size %d, "+
"which must be greater than or equal to 0", c))
}
if c > maxMaxMultiUpdateRowSize {
log.Warn("max-multi-update-row-size too large",
Expand Down

0 comments on commit 7ca30c8

Please sign in to comment.