Skip to content

Commit

Permalink
[CBRD-25562] SP의 연관되지 않은 컬럼에 대해 지원하지 않는 인수 에러 발생 수정 (#5462)
Browse files Browse the repository at this point in the history
  • Loading branch information
hgryoo authored Sep 3, 2024
1 parent 89fe130 commit b8059c7
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions src/method/method_invoke_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,24 +262,6 @@ namespace cubmethod
}
case METHOD_TYPE_JAVA_SP:
{
/* check arg_base's type is supported */
for (const DB_VALUE &value : arg_base)
{
if (is_supported_dbtype (value) == false)
{
error = ER_SP_EXECUTE_ERROR;
std::string err_msg = "unsupported argument type - ";

string_buffer sb;
db_value_printer printer (sb);
printer.describe_type (&value);

err_msg += std::string (sb.get_buffer(), sb.len ());
set_error_msg (err_msg);
return error;
}
}

/* optimize arguments only for java sp not to send redundant values */
DB_VALUE null_val;
db_make_null (&null_val);
Expand All @@ -291,6 +273,18 @@ namespace cubmethod
optimized_arg_base[i] = (!is_used) ? std::ref (null_val) : optimized_arg_base[i];
}

/* check unsupported types */
for (const DB_VALUE &value : optimized_arg_base)
{
if (is_supported_dbtype (value) == false)
{
er_set (ER_ERROR_SEVERITY, ARG_FILE_LINE, ER_SP_NOT_SUPPORTED_ARG_TYPE, 1,
pr_type_name ((DB_TYPE) value.domain.general_info.type));
set_error_msg (er_msg ());
return er_errid ();
}
}

// send to Java SP Server
cubmethod::header header (SP_CODE_PREPARE_ARGS, m_id);
cubmethod::prepare_args arg (elem, optimized_arg_base);
Expand Down

0 comments on commit b8059c7

Please sign in to comment.