fix some charset bugs

This commit is contained in:
SevenJ-swj
2023-06-02 11:17:36 +00:00
committed by ob-robot
parent 4bc62745d8
commit 8bd4f54ea1
13 changed files with 98 additions and 80 deletions

View File

@ -229,10 +229,6 @@ int ObExprLike::calc_with_non_instr_mode(T &result,
} else if (text_val.length() <= 0 && pattern_val.length() <= 0) {
// empty string
result.set_int(1);
} else if (OB_UNLIKELY(CS_TYPE_UTF8MB4_BIN != coll_type && escape_wc == static_cast<int32_t>('%'))) {
// when cs_type is not utf8mb4_bin and escape = %, there is a bug of wildcmp
ret = OB_NOT_SUPPORTED;
LOG_USER_ERROR(OB_NOT_SUPPORTED, "escape %");
} else {
bool b = ObCharset::wildcmp(coll_type, text_val, pattern_val, escape_wc,
static_cast<int32_t>('_'), static_cast<int32_t>('%'));