[CP] [to #52754652] fix serval pl/sql bugs

This commit is contained in:
obdev
2023-11-21 13:40:50 +00:00
committed by ob-robot
parent a8e610e8c1
commit c60de6707f
4 changed files with 43 additions and 38 deletions

View File

@ -50,8 +50,9 @@ int ObExprObjectConstruct::calc_result_typeN(ObExprResType &type,
for (int64_t i = 0; OB_SUCC(ret) && i < param_num; i++) {
if ((ObExtendType == elem_types_.at(i).get_type()
&& types[i].get_type() != ObExtendType
&& types[i].get_type() != ObNullType)
||(ObExtendType == types[i].get_type() && elem_types_.at(i).get_type() != ObExtendType)) {
&& types[i].get_type() != ObNullType
&& !types[i].is_xml_sql_type())
||((ObExtendType == types[i].get_type() || types[i].is_xml_sql_type()) && elem_types_.at(i).get_type() != ObExtendType)) {
ret = OB_ERR_CALL_WRONG_ARG;
LOG_WARN("PLS-00306: wrong number or types of arguments in call", K(ret), K(types[i]), K(elem_types_.at(i)), K(i));
} else {

View File

@ -1795,10 +1795,10 @@ int ObResolverUtils::resolve_sp_name(ObSQLSessionInfo &session_info,
(lib::is_oracle_mode() ? OB_MAX_PL_IDENT_LENGTH : OB_MAX_MYSQL_PL_IDENT_LENGTH))) {
ret = OB_ERR_TOO_LONG_IDENT;
LOG_WARN("identifier is too long", K(sp_name), K(ret));
} else if (!need_db_name && lib::is_oracle_mode()) {
// do nothing
} else if (NULL == (db_node = sp_name_node.children_[0])) {
if (session_info.get_database_name().empty()) {
if (!need_db_name && lib::is_oracle_mode()) {
// do nothing ...
} else if (session_info.get_database_name().empty()) {
ret = OB_ERR_NO_DB_SELECTED;
LOG_USER_ERROR(OB_ERR_NO_DB_SELECTED);
LOG_WARN("No Database Selected", K(ret));