bugfix : xml can not apply in NLSSORT & GREATEST with xmltype param & ban updatexml in PL
This commit is contained in:
@ -94,6 +94,9 @@ int ObExprLeastGreatest::calc_result_typeN_oracle(ObExprResType &type,
|
||||
type.set_type(ObVarcharType);
|
||||
type.set_calc_type(ObVarcharType);
|
||||
}
|
||||
} else if (ObUserDefinedSQLTC == first_type_class) {
|
||||
ret = OB_ERR_NO_ORDER_MAP_SQL;
|
||||
LOG_WARN("cannot ORDER objects without MAP or ORDER method", K(ret));
|
||||
} else {
|
||||
/**
|
||||
* 除去number类型,经过测试,结果的scale和第一个参数的scale一样,所以
|
||||
@ -154,6 +157,10 @@ int ObExprLeastGreatest::calc_result_typeN_oracle(ObExprResType &type,
|
||||
item_length = OB_MAX_TIMESTAMP_TZ_LENGTH;
|
||||
break;
|
||||
}
|
||||
case ObUserDefinedSQLTC: {
|
||||
item_length = types[i].get_length();
|
||||
break;
|
||||
}
|
||||
default:{
|
||||
// all types in oracle mode have been handled
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
|
||||
@ -43,6 +43,10 @@ int ObExprUpdateXml::calc_result_typeN(ObExprResType &type,
|
||||
if (param_num < 3) {
|
||||
ret = OB_ERR_PARAM_SIZE;
|
||||
LOG_WARN("invalid param number", K(ret), K(param_num));
|
||||
} else if (!is_called_in_sql()) {
|
||||
ret = OB_ERR_SP_LILABEL_MISMATCH;
|
||||
LOG_WARN("expr call in pl semantics disallowed", K(ret), K(N_UPDATEXML));
|
||||
LOG_USER_ERROR(OB_ERR_SP_LILABEL_MISMATCH, static_cast<int>(strlen(N_UPDATEXML)), N_UPDATEXML);
|
||||
} else if (types[0].is_ext() && types[0].get_udt_id() == T_OBJ_XML) {
|
||||
types[0].get_calc_meta().set_sql_udt(ObXMLSqlType);
|
||||
} else if (!ob_is_xml_sql_type(types[0].get_type(), types[0].get_subschema_id())) {
|
||||
|
||||
Reference in New Issue
Block a user