fix some bugs

This commit is contained in:
wangt1xiuyi
2023-08-17 17:06:37 +08:00
committed by ob-robot
parent 6ec8de9305
commit 09f80e6a68
14 changed files with 318 additions and 9 deletions

View File

@ -183,7 +183,16 @@ int ObExprRegexpInstr::eval_regexp_instr(
ObDatum *subexpr= NULL;
if (OB_FAIL(expr.eval_param_value(
ctx, text, pattern, position, occurrence, return_opt, match_type, subexpr))) {
LOG_WARN("evaluate parameters failed", K(ret));
if (lib::is_mysql_mode() && ret == OB_ERR_INCORRECT_STRING_VALUE) {//compatible mysql
ret = OB_SUCCESS;
expr_datum.set_null();
const char *charset_name = ObCharset::charset_name(expr.args_[0]->datum_meta_.cs_type_);
int64_t charset_name_len = strlen(charset_name);
const char *tmp_char = NULL;
LOG_USER_WARN(OB_ERR_INVALID_CHARACTER_STRING, static_cast<int>(charset_name_len), charset_name, 0, tmp_char);
} else {
LOG_WARN("evaluate parameters failed", K(ret));
}
} else if (OB_UNLIKELY(expr.arg_cnt_ < 2 ||
(expr.args_[0]->datum_meta_.cs_type_ != CS_TYPE_UTF8MB4_GENERAL_CI &&
expr.args_[0]->datum_meta_.cs_type_ != CS_TYPE_UTF8MB4_BIN &&