Fix varchar cast to set in non strict mode

This commit is contained in:
br0
2021-10-19 20:00:48 +08:00
committed by wangzelin.wzl
parent 80194a9335
commit e54cab6c45
2 changed files with 3 additions and 3 deletions

View File

@ -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));
}