提交 e54cab6c 编写于 作者: B br0 提交者: wangzelin.wzl

Fix varchar cast to set in non strict mode

上级 80194a93
......@@ -4151,7 +4151,7 @@ static int string_set(const ObExpectType& expect_type, ObObjCastParams& params,
LOG_WARN("unexpect val_cnt", K(in), K(out), K(expect_type), K(ret));
} else if (val_cnt >= 64) { // do nothing
} else if (val_cnt < 64 && value > ((1ULL << val_cnt) - 1)) {
value = value & ((1ULL << val_cnt) - 1);
value = 0;
ret = OB_ERR_DATA_TRUNCATED;
LOG_WARN("input value out of range", K(in), K(val_cnt), K(ret));
}
......
......@@ -4783,9 +4783,9 @@ int string_to_set(ObIAllocator& alloc, const ObString& orig_in_str, const ObColl
LOG_WARN("unexpect val_cnt", K(val_cnt), K(ret));
} else if (val_cnt >= 64) { // do nothing
} else if (val_cnt < 64 && value > ((1ULL << val_cnt) - 1)) {
value = value & ((1ULL << val_cnt) - 1);
value = 0;
ret = OB_ERR_DATA_TRUNCATED;
LOG_WARN("input value out of range", K(value), K(val_cnt), K(ret));
LOG_WARN("input value out of range", K(val_cnt), K(ret));
}
if (OB_FAIL(ret) && CM_IS_WARN_ON_FAIL(cast_mode)) {
warning = OB_ERR_DATA_TRUNCATED;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册