[CP] regexp use const pattern uncorrectly in non-static engine

This commit is contained in:
wangt1xiuyi
2022-08-22 15:52:55 +08:00
committed by wangyunlai.wyl
parent 9e83856389
commit a43efe3742
3 changed files with 35 additions and 1 deletions

View File

@ -597,7 +597,9 @@ inline int ObExprGeneratorImpl::visit_regex_expr(ObOpRawExpr& expr, ObExprRegexp
} else {
// The value && pattern are const, it is calculated in pre_calculate
regexp_op->set_value_is_const(value_expr->has_flag(IS_CONST) || value_expr->has_flag(IS_CONST_EXPR));
regexp_op->set_pattern_is_const(pattern_expr->has_flag(IS_CONST) || pattern_expr->has_flag(IS_CONST_EXPR));
if (!pattern_expr->has_flag(CNT_EXEC_PARAM)) {
regexp_op->set_pattern_is_const(pattern_expr->has_flag(IS_CONST) || pattern_expr->has_flag(IS_CONST_EXPR));
}
}
}
return ret;