Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
Signed-off-by: guo-shaoge <shaoge1994@163.com>
  • Loading branch information
guo-shaoge committed May 27, 2024
1 parent 9d0507d commit 0531b23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/expression/builtin_compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ func RefineComparedConstant(ctx BuildContext, targetFieldType types.FieldType, c
targetFieldType = *types.NewFieldType(mysql.TypeLonglong)
}
var intDatum types.Datum
// Enable AllowNegativeToUnsigned to make sure return 0 when underflow happens.
// Disable AllowNegativeToUnsigned to make sure return 0 when underflow happens.
oriTypeCtx := evalCtx.TypeCtx()
newTypeCtx := oriTypeCtx.WithFlags(oriTypeCtx.Flags().WithAllowNegativeToUnsigned(false))
intDatum, err = dt.ConvertTo(newTypeCtx, &targetFieldType)
Expand Down

0 comments on commit 0531b23

Please sign in to comment.