Fix 4016 caused by the pattern not calculated in the like expr
This commit is contained in:
@ -430,6 +430,7 @@ int ObExprLike::check_pattern_valid(const T &pattern,
|
||||
bool is_char_escape = false;
|
||||
bool pre_char_is_escape = false;
|
||||
while (OB_SUCC(ret) && buf_start < buf_end && is_valid) {
|
||||
LOG_INFO("hwx debug");
|
||||
char_len = static_cast<int32_t>(cs->cset->well_formed_len(cs, buf_start, buf_end, 1, &error));
|
||||
if (OB_UNLIKELY(0 != error)) {
|
||||
ret = OB_ERR_INVALID_CHARACTER_STRING;
|
||||
@ -1628,9 +1629,11 @@ int ObExprLike::eval_like_expr_vector_only_text_vectorized(VECTOR_EVAL_FUNC_ARG_
|
||||
int ret = OB_SUCCESS;
|
||||
ObExpr &pattern = *expr.args_[1];
|
||||
ObExpr &escape = *expr.args_[2];
|
||||
if (OB_FAIL(pattern.eval_vector(ctx, skip, bound))) {
|
||||
int64_t const_skip = 0;
|
||||
const ObBitVector *param_skip = to_bit_vector(&const_skip);
|
||||
if (OB_FAIL(pattern.eval_vector(ctx, *param_skip, bound))) {
|
||||
LOG_WARN("eval pattern failed", K(ret));
|
||||
} else if (OB_FAIL(escape.eval_vector(ctx, skip, bound))) {
|
||||
} else if (OB_FAIL(escape.eval_vector(ctx, *param_skip, bound))) {
|
||||
LOG_WARN("eval escape failed", K(ret));
|
||||
// the third arg escape must be varchar
|
||||
} else if (OB_FAIL(expr.args_[0]->eval_vector(ctx, skip, bound))) {
|
||||
|
||||
Reference in New Issue
Block a user