[CP] [xml bugfix] Disable conversion from xml to anytype and fix some problems with xml parsing
This commit is contained in:
		| @ -7422,6 +7422,13 @@ int ObSPIService::convert_obj(ObPLExecCtx *ctx, | |||||||
|                     || ob_is_xml_sql_type(result_type.get_type(), result_type.get_subschema_id())))) { |                     || ob_is_xml_sql_type(result_type.get_type(), result_type.get_subschema_id())))) { | ||||||
|           ret = OB_ERR_INVALID_TYPE_FOR_OP; |           ret = OB_ERR_INVALID_TYPE_FOR_OP; | ||||||
|           LOG_WARN("xml type can not convert other type in pl", K(ret)); |           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))) { |         } 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)); |           LOG_WARN("fail to convert with null check", K(ret)); | ||||||
|         } |         } | ||||||
|  | |||||||
| @ -576,8 +576,6 @@ int ObRawExprInfoExtractor::visit(ObSysFunRawExpr &expr) | |||||||
|            || T_FUN_SYS_IS_JSON == expr.get_expr_type() |            || 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_MERGE_PATCH == expr.get_expr_type() && lib::is_oracle_mode()) | ||||||
|            || T_FUN_SYS_JSON_OBJECT == expr.get_expr_type() |            || 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())) |            || IS_LABEL_SE_POLICY_FUNC(expr.get_expr_type())) | ||||||
|         && OB_FAIL(expr.clear_flag(IS_CONST_EXPR))) { |         && OB_FAIL(expr.clear_flag(IS_CONST_EXPR))) { | ||||||
|       LOG_WARN("failed to clear flag", K(ret)); |       LOG_WARN("failed to clear flag", K(ret)); | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Carrot-77
					Carrot-77