fix some bugs
This commit is contained in:
@ -220,7 +220,16 @@ int ObExprRegexpReplace::eval_regexp_replace(
|
||||
ObEvalCtx::TempAllocGuard alloc_guard(ctx);
|
||||
ObIAllocator &tmp_alloc = alloc_guard.get_allocator();
|
||||
if (OB_FAIL(expr.eval_param_value(ctx, text, pattern, to, position, occurrence, match_type))) {
|
||||
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 (lib::is_oracle_mode() && pattern->is_null()) {
|
||||
if (text->is_null()) {
|
||||
expr_datum.set_null();
|
||||
|
||||
Reference in New Issue
Block a user