bugfix : dynamic sql without quesmark type check && encoding session & xmltype compare in case

This commit is contained in:
obdev
2023-05-24 05:11:48 +00:00
committed by ob-robot
parent 9313ad1d4b
commit bb69281e07
2 changed files with 6 additions and 5 deletions

View File

@ -131,10 +131,7 @@ int ObExprArgCase::calc_result_typeN(ObExprResType &type,
int64_t val_type_count = param_num / 2;
ObExprResType tmp_res_type;
const ObLengthSemantics default_length_semantics = (OB_NOT_NULL(type_ctx.get_session()) ? type_ctx.get_session()->get_actual_nls_length_semantics() : LS_BYTE);
if (lib::is_oracle_mode() && types_stack[0].is_xml_sql_type()) {
ret = OB_ERR_NO_ORDER_MAP_SQL;
LOG_WARN("cannot ORDER objects without MAP or ORDER method", K(ret));
} else if (OB_FAIL(aggregate_result_type_for_case(
if (OB_FAIL(aggregate_result_type_for_case(
tmp_res_type,
types_stack,
cond_type_count,
@ -171,6 +168,9 @@ int ObExprArgCase::calc_result_typeN(ObExprResType &type,
} else {
types_stack[i].set_calc_type(calc_type);
}
} else if (lib::is_oracle_mode() && types_stack[0].is_xml_sql_type() && types_stack[i].is_xml_sql_type()) {
ret = OB_ERR_NO_ORDER_MAP_SQL;
LOG_WARN("cannot ORDER objects without MAP or ORDER method", K(ret));
}
}
}

View File

@ -6393,7 +6393,8 @@ int ObRawExprUtils::check_composite_cast(ObRawExpr *&expr, ObSchemaChecker &sche
}
}
} else if (ObExtendType == obj_type
&& OB_INVALID_ID != udt_id) {
&& OB_INVALID_ID != udt_id
&& src->get_expr_type() != T_QUESTIONMARK) {
if (ObNullType == src->get_result_type().get_type()) {
// do nothing
} else if (src->get_result_type().is_user_defined_sql_type()) {