fix cast string to number overflow bug

This commit is contained in:
st0
2021-08-20 19:04:12 +08:00
committed by wangzelin.wzl
parent fd70eda21f
commit 7dc47e8efa
2 changed files with 2 additions and 2 deletions

View File

@ -3681,7 +3681,7 @@ static int string_number(
ret = value.from_sci_opt(str.ptr(), str.length(), params, &res_precision, &res_scale);
// select cast('1e500' as decimal); -> max_val
// select cast('-1e500' as decimal); -> min_val
if (CM_IS_SET_MIN_IF_OVERFLOW(cast_mode) && ret == OB_NUMERIC_OVERFLOW) {
if (ret == OB_NUMERIC_OVERFLOW) {
int64_t i = 0;
while (i < str.length() && isspace(str[i])) {
++i;