patch 4.0
This commit is contained in:
@ -21,20 +21,22 @@
|
||||
#include "sql/session/ob_sql_session_info.h"
|
||||
#include "sql/code_generator/ob_expr_generator_impl.h"
|
||||
|
||||
namespace oceanbase {
|
||||
namespace oceanbase
|
||||
{
|
||||
using namespace common;
|
||||
using namespace share::schema;
|
||||
namespace sql {
|
||||
namespace sql
|
||||
{
|
||||
|
||||
int ObCreateFuncExecutor::execute(ObExecContext& ctx, ObCreateFuncStmt& stmt)
|
||||
int ObCreateFuncExecutor::execute(ObExecContext &ctx, ObCreateFuncStmt &stmt)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObTaskExecutorCtx* task_exec_ctx = NULL;
|
||||
obrpc::ObCommonRpcProxy* common_rpc_proxy = NULL;
|
||||
const obrpc::ObCreateUserDefinedFunctionArg& create_udf_arg = stmt.get_create_func_arg();
|
||||
ObTaskExecutorCtx *task_exec_ctx = NULL;
|
||||
obrpc::ObCommonRpcProxy *common_rpc_proxy = NULL;
|
||||
const obrpc::ObCreateUserDefinedFunctionArg &create_udf_arg = stmt.get_create_func_arg();
|
||||
ObString first_stmt;
|
||||
if (OB_FAIL(stmt.get_first_stmt(first_stmt))) {
|
||||
LOG_WARN("fail to get first stmt", K(ret));
|
||||
LOG_WARN("fail to get first stmt" , K(ret));
|
||||
} else {
|
||||
const_cast<obrpc::ObCreateUserDefinedFunctionArg&>(create_udf_arg).ddl_stmt_str_ = first_stmt;
|
||||
}
|
||||
@ -44,24 +46,25 @@ int ObCreateFuncExecutor::execute(ObExecContext& ctx, ObCreateFuncStmt& stmt)
|
||||
LOG_WARN("get task executor context failed", K(ret));
|
||||
} else if (OB_FAIL(task_exec_ctx->get_common_rpc(common_rpc_proxy))) {
|
||||
LOG_WARN("get common rpc proxy failed", K(ret));
|
||||
} else if (OB_ISNULL(common_rpc_proxy)) {
|
||||
} else if (OB_ISNULL(common_rpc_proxy)){
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("common rpc proxy should not be null", K(ret));
|
||||
} else if (OB_FAIL(common_rpc_proxy->create_udf(create_udf_arg))) {
|
||||
LOG_WARN("rpc proxy create udf failed", K(ret), "dst", common_rpc_proxy->get_server());
|
||||
LOG_WARN("rpc proxy create udf failed", K(ret),
|
||||
"dst", common_rpc_proxy->get_server());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ObDropFuncExecutor::execute(ObExecContext& ctx, ObDropFuncStmt& stmt)
|
||||
int ObDropFuncExecutor::execute(ObExecContext &ctx, ObDropFuncStmt &stmt)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObTaskExecutorCtx* task_exec_ctx = NULL;
|
||||
obrpc::ObCommonRpcProxy* common_rpc_proxy = NULL;
|
||||
const obrpc::ObDropUserDefinedFunctionArg& drop_func_arg = stmt.get_drop_func_arg();
|
||||
ObTaskExecutorCtx *task_exec_ctx = NULL;
|
||||
obrpc::ObCommonRpcProxy *common_rpc_proxy = NULL;
|
||||
const obrpc::ObDropUserDefinedFunctionArg &drop_func_arg = stmt.get_drop_func_arg();
|
||||
ObString first_stmt;
|
||||
if (OB_FAIL(stmt.get_first_stmt(first_stmt))) {
|
||||
LOG_WARN("fail to get first stmt", K(ret));
|
||||
LOG_WARN("fail to get first stmt" , K(ret));
|
||||
} else {
|
||||
const_cast<obrpc::ObDropUserDefinedFunctionArg&>(drop_func_arg).ddl_stmt_str_ = first_stmt;
|
||||
}
|
||||
@ -71,13 +74,15 @@ int ObDropFuncExecutor::execute(ObExecContext& ctx, ObDropFuncStmt& stmt)
|
||||
LOG_WARN("get task executor context failed", K(ret));
|
||||
} else if (OB_FAIL(task_exec_ctx->get_common_rpc(common_rpc_proxy))) {
|
||||
LOG_WARN("get common rpc proxy failed", K(ret));
|
||||
} else if (OB_ISNULL(common_rpc_proxy)) {
|
||||
} else if (OB_ISNULL(common_rpc_proxy)){
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("common rpc proxy should not be null", K(ret));
|
||||
} else if (OB_FAIL(common_rpc_proxy->drop_udf(drop_func_arg))) {
|
||||
LOG_WARN("rpc proxy create udf failed", K(ret), "dst", common_rpc_proxy->get_server());
|
||||
LOG_WARN("rpc proxy create udf failed", K(ret),
|
||||
"dst", common_rpc_proxy->get_server());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
} // end namespace sql
|
||||
} // end namespace oceanbase
|
||||
} //end namespace sql
|
||||
} //end namespace oceanbase
|
||||
|
||||
|
||||
Reference in New Issue
Block a user