提交 9802ffae 编写于 作者: L LINxiansheng 提交者: LINGuanRen

fix two bugs from github issues #715 #716

上级 9e79e15b
[submodule "logmessage"]
path = deps/logmessage
url = git@github.com:oceanbase/oblogmsg.git
url = https://github.com/oceanbase/oblogmsg.git
branch = master
\ No newline at end of file
......@@ -1603,10 +1603,10 @@ static int float_number(
if (OB_UNLIKELY(ObFloatTC != in.get_type_class() || ObNumberTC != ob_obj_type_class(expect_type))) {
ret = OB_ERR_UNEXPECTED;
LOG_ERROR("invalid input type", K(ret), K(in), K(expect_type));
} else if (isnan(value)) {
} else if (std::isnan(value)) {
ret = OB_INVALID_NUMERIC;
LOG_WARN("float_number failed ", K(ret), K(value));
} else if (isinf(value)) {
} else if (std::isinf(value)) {
ret = OB_NUMERIC_OVERFLOW;
LOG_WARN("float_number failed", K(ret), K(value));
} else if (ObUNumberType == expect_type && CAST_FAIL(numeric_negative_check(value))) {
......@@ -1908,10 +1908,10 @@ static int double_number(
if (OB_UNLIKELY(ObDoubleTC != in.get_type_class() || ObNumberTC != ob_obj_type_class(expect_type))) {
ret = OB_ERR_UNEXPECTED;
LOG_ERROR("invalid input type", K(ret), K(in), K(expect_type));
} else if (isnan(value) && lib::is_oracle_mode()) {
} else if (std::isnan(value) && lib::is_oracle_mode()) {
ret = OB_INVALID_NUMERIC;
LOG_WARN("float_number failed ", K(ret), K(value));
} else if (isinf(value) && lib::is_oracle_mode()) {
} else if (std::isinf(value) && lib::is_oracle_mode()) {
ret = OB_NUMERIC_OVERFLOW;
LOG_WARN("float_number failed", K(ret), K(value));
} else if (ObUNumberType == expect_type && CAST_FAIL(numeric_negative_check(value))) {
......
......@@ -21,6 +21,7 @@
#include "lib/charset/ob_charset.h"
#include "share/ob_errno.h"
namespace oceanbase {
namespace common {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册