to issue<51613550>:fix core when upate plsql_ccflag var
This commit is contained in:
@ -1083,7 +1083,8 @@ int ObPLContext::set_exec_env(ObPLFunction &routine)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
CK (OB_NOT_NULL(session_info_));
|
||||
OZ (exec_env_.load(*session_info_));
|
||||
CK (OB_NOT_NULL(my_exec_ctx_));
|
||||
OZ (exec_env_.load(*session_info_, &my_exec_ctx_->get_allocator()));
|
||||
if (OB_SUCC(ret) && exec_env_ != routine.get_exec_env()) {
|
||||
OZ (routine.get_exec_env().store(*session_info_));
|
||||
OX (need_reset_exec_env_ = true);
|
||||
|
||||
@ -6310,7 +6310,7 @@ int ObExecEnv::init(const ObString &exec_env)
|
||||
#undef SET_ENV_VALUE
|
||||
#undef GET_ENV_VALUE
|
||||
|
||||
int ObExecEnv::load(ObBasicSessionInfo &session)
|
||||
int ObExecEnv::load(ObBasicSessionInfo &session, ObIAllocator *alloc)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObObj val;
|
||||
@ -6339,8 +6339,12 @@ int ObExecEnv::load(ObBasicSessionInfo &session)
|
||||
}
|
||||
break;
|
||||
case PLSQL_CCFLAGS: {
|
||||
if (OB_NOT_NULL(alloc)) {
|
||||
OZ (ob_write_string(*alloc, val.get_varchar(), plsql_ccflags_));
|
||||
} else {
|
||||
plsql_ccflags_ = val.get_varchar();
|
||||
}
|
||||
}
|
||||
break;
|
||||
default: {
|
||||
ret = common::OB_ERR_UNEXPECTED;
|
||||
|
||||
@ -2412,7 +2412,7 @@ public:
|
||||
int64_t &pos);
|
||||
|
||||
int init(const ObString &exec_env);
|
||||
int load(ObBasicSessionInfo &session);
|
||||
int load(ObBasicSessionInfo &session, ObIAllocator *alloc = NULL);
|
||||
int store(ObBasicSessionInfo &session);
|
||||
|
||||
ObSQLMode get_sql_mode() { return sql_mode_; }
|
||||
|
||||
Reference in New Issue
Block a user