xml generated column index 4377 bugfix
This commit is contained in:
@ -657,7 +657,8 @@ int ObExprCast::adjust_udt_cast_type(const ObExprResType &src_type, ObExprResTyp
|
||||
} else if (dst_type.is_user_defined_sql_type()) {
|
||||
dst_type.set_subschema_id(ObXMLSqlType);
|
||||
}
|
||||
} else if (src_type.is_null()) {
|
||||
} else if (src_type.is_null() || src_type.is_character_type()) {
|
||||
// null or chararcter type can cast to xmltype (other udt types are not supported yet)
|
||||
if (dst_type.get_type() == ObUserDefinedSQLType) {
|
||||
dst_type.set_sql_udt(ObXMLSqlType);
|
||||
}
|
||||
|
||||
@ -241,6 +241,9 @@ int ObExprColumnConv::calc_result_typeN(ObExprResType &type,
|
||||
type.set_collation_type(types[1].get_collation_type());
|
||||
type.set_collation_level(common::CS_LEVEL_IMPLICIT);
|
||||
type.set_accuracy(types[2].get_accuracy());
|
||||
if (type.get_type() == ObUserDefinedSQLType) {
|
||||
type.set_subschema_id(types[2].get_accuracy().get_accuracy());
|
||||
}
|
||||
if (types[3].is_not_null_for_read()) {
|
||||
type.set_result_flag(NOT_NULL_FLAG | NOT_NULL_WRITE_FLAG);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user