diff --git a/expression/builtin_cast.go b/expression/builtin_cast.go index 25f4d42b0f784..1d356371c41f1 100644 --- a/expression/builtin_cast.go +++ b/expression/builtin_cast.go @@ -1883,12 +1883,9 @@ func WrapWithCastAsDecimal(ctx sessionctx.Context, expr Expression) Expression { if expr.GetType().EvalType() == types.ETInt { tp.Flen = mysql.MaxIntWidth } -<<<<<<< HEAD -======= if tp.Flen == types.UnspecifiedLength || tp.Flen > mysql.MaxDecimalWidth { tp.Flen = mysql.MaxDecimalWidth } ->>>>>>> a18e05d2f... expression: limit valid decimal length (#28466) types.SetBinChsClnFlag(tp) tp.Flag |= expr.GetType().Flag & mysql.UnsignedFlag return BuildCastFunction(ctx, expr, tp)