[xml bugfix] Compatible error codes related to xml type
This commit is contained in:
@ -323,8 +323,13 @@ int ObExprFuncPartHash::eval_oracle_part_hash(
|
||||
} else if (d->is_null()) {
|
||||
// do nothing
|
||||
} else if (!is_oracle_supported_type(arg.datum_meta_.type_)) {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
LOG_WARN("wrong type", K(ret), K(arg.datum_meta_));
|
||||
if (ob_is_user_defined_sql_type(arg.datum_meta_.type_)) {
|
||||
ret = OB_ERR_INVALID_XML_DATATYPE;
|
||||
LOG_USER_ERROR(OB_ERR_INVALID_XML_DATATYPE, "-", "ANYDATA");
|
||||
} else {
|
||||
ret = OB_INVALID_ARGUMENT;
|
||||
LOG_WARN("wrong type", K(ret), K(arg.datum_meta_));
|
||||
}
|
||||
} else {
|
||||
if (ObCharType == arg.datum_meta_.type_
|
||||
|| ObNCharType == arg.datum_meta_.type_) {
|
||||
|
||||
@ -804,7 +804,12 @@ int ObExprOperator::aggregate_charsets(
|
||||
ObObjMeta coll;
|
||||
for (int i = 0; OB_SUCC(ret) && i < param_num; ++i) {
|
||||
coll.reset();
|
||||
coll.set_collation_type(types[i].get_collation_type());
|
||||
// issue:49962420 The xml type calls get_collation_type() to return the result of binary, here is set to utf8
|
||||
if (type.is_string_type() && types[i].is_xml_sql_type()) {
|
||||
coll.set_collation_type(ObCollationType::CS_TYPE_UTF8MB4_BIN);
|
||||
} else {
|
||||
coll.set_collation_type(types[i].get_collation_type());
|
||||
}
|
||||
coll.set_collation_level(types[i].get_collation_level());
|
||||
ret = coll_types.push_back(coll);
|
||||
} // end for
|
||||
|
||||
Reference in New Issue
Block a user