[CP] [xml bugfix] Disable conversion from xml to anytype and fix some problems with xml parsing

This commit is contained in:
Carrot-77
2023-11-16 10:40:25 +00:00
committed by ob-robot
parent 57ee69aca8
commit 86eb89f5f8
2 changed files with 7 additions and 2 deletions

View File

@ -7422,6 +7422,13 @@ int ObSPIService::convert_obj(ObPLExecCtx *ctx,
|| ob_is_xml_sql_type(result_type.get_type(), result_type.get_subschema_id())))) {
ret = OB_ERR_INVALID_TYPE_FOR_OP;
LOG_WARN("xml type can not convert other type in pl", K(ret));
} else if (result_type.is_ext()
&& (result_type.get_accuracy().get_accuracy() == 300004 ||
result_type.get_accuracy().get_accuracy() == 300005)
&& obj.is_xml_sql_type()) {
// Disable sql_udt to anytype conversion
ret = OB_ERR_INVALID_XML_DATATYPE;
LOG_WARN("sql udt type can not convert extend any type", K(ret));
} else if (OB_FAIL(ObExprColumnConv::convert_with_null_check(tmp_obj, obj, result_type, is_strict, cast_ctx, type_info))) {
LOG_WARN("fail to convert with null check", K(ret));
}

View File

@ -576,8 +576,6 @@ int ObRawExprInfoExtractor::visit(ObSysFunRawExpr &expr)
|| T_FUN_SYS_IS_JSON == expr.get_expr_type()
|| (T_FUN_SYS_JSON_MERGE_PATCH == expr.get_expr_type() && lib::is_oracle_mode())
|| T_FUN_SYS_JSON_OBJECT == expr.get_expr_type()
|| T_FUN_SYS_XML_ELEMENT == expr.get_expr_type()
|| T_FUN_SYS_XMLPARSE == expr.get_expr_type()
|| IS_LABEL_SE_POLICY_FUNC(expr.get_expr_type()))
&& OB_FAIL(expr.clear_flag(IS_CONST_EXPR))) {
LOG_WARN("failed to clear flag", K(ret));