diff --git a/src/sql/engine/expr/ob_expr_regexp_context.h b/src/sql/engine/expr/ob_expr_regexp_context.h index 212531cede..b6ba77e835 100644 --- a/src/sql/engine/expr/ob_expr_regexp_context.h +++ b/src/sql/engine/expr/ob_expr_regexp_context.h @@ -106,7 +106,7 @@ public: static int check_need_utf8(ObRawExpr *expr, bool &is_nstring); static inline bool is_binary_string(const ObExprResType &type) { - return CS_TYPE_BINARY == type.get_collation_type() && ob_is_string_tc(type.get_type()); + return CS_TYPE_BINARY == type.get_collation_type() && (ObVarcharType == type.get_type() || ObHexStringType == type.get_type()); } static inline bool is_binary_compatible(const ObExprResType &type) {