[CP] [to #53885845] fix package state sync with distrubte plan on remote server
This commit is contained in:
@ -3623,7 +3623,7 @@ int ObBasicSessionInfo::replace_user_variables(const ObSessionValMap &user_var_m
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ObBasicSessionInfo::replace_user_variable(const ObString &var, const ObSessionVariable &val)
|
int ObBasicSessionInfo::replace_user_variable(const ObString &var, const ObSessionVariable &val, bool need_track)
|
||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
if (var.empty()) {
|
if (var.empty()) {
|
||||||
@ -3632,7 +3632,7 @@ int ObBasicSessionInfo::replace_user_variable(const ObString &var, const ObSessi
|
|||||||
} else if (OB_FAIL(user_var_val_map_.set_refactored(var, val))) {
|
} else if (OB_FAIL(user_var_val_map_.set_refactored(var, val))) {
|
||||||
LOG_ERROR("fail to add variable", K(var), K(ret));
|
LOG_ERROR("fail to add variable", K(var), K(ret));
|
||||||
} else {
|
} else {
|
||||||
if (is_track_session_info()) {
|
if (need_track && is_track_session_info()) {
|
||||||
if (OB_FAIL(track_user_var(var))) {
|
if (OB_FAIL(track_user_var(var))) {
|
||||||
LOG_WARN("fail to track user var", K(var), K(ret));
|
LOG_WARN("fail to track user var", K(var), K(ret));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -983,7 +983,7 @@ public:
|
|||||||
///@{ user variables related:
|
///@{ user variables related:
|
||||||
sql::ObSessionValMap &get_user_var_val_map() {return user_var_val_map_;}
|
sql::ObSessionValMap &get_user_var_val_map() {return user_var_val_map_;}
|
||||||
const sql::ObSessionValMap &get_user_var_val_map() const {return user_var_val_map_;}
|
const sql::ObSessionValMap &get_user_var_val_map() const {return user_var_val_map_;}
|
||||||
int replace_user_variable(const common::ObString &var, const ObSessionVariable &val);
|
int replace_user_variable(const common::ObString &var, const ObSessionVariable &val, bool need_track = true);
|
||||||
int replace_user_variables(const ObSessionValMap &user_var_map);
|
int replace_user_variables(const ObSessionValMap &user_var_map);
|
||||||
int remove_user_variable(const common::ObString &var);
|
int remove_user_variable(const common::ObString &var);
|
||||||
int get_user_variable(const common::ObString &var, ObSessionVariable &val) const;
|
int get_user_variable(const common::ObString &var, ObSessionVariable &val) const;
|
||||||
|
|||||||
@ -2237,6 +2237,7 @@ int ObSQLSessionInfo::replace_user_variable(
|
|||||||
OZ (reset_all_package_state_by_dbms_session(false));
|
OZ (reset_all_package_state_by_dbms_session(false));
|
||||||
} else if (is_package_variable && OB_NOT_NULL(get_pl_engine())) {
|
} else if (is_package_variable && OB_NOT_NULL(get_pl_engine())) {
|
||||||
OZ (set_package_variable(ctx, name, value.value_, true));
|
OZ (set_package_variable(ctx, name, value.value_, true));
|
||||||
|
OZ (ObBasicSessionInfo::replace_user_variable(name, value, false));
|
||||||
} else {
|
} else {
|
||||||
OZ (ObBasicSessionInfo::replace_user_variable(name, value));
|
OZ (ObBasicSessionInfo::replace_user_variable(name, value));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user