[CP] [to #52362326] Save the current execution state to DAS ctx

This commit is contained in:
obdev 2023-09-25 09:14:07 +00:00 committed by ob-robot
parent 1126fa4e50
commit 119e6cbf24
2 changed files with 9 additions and 0 deletions

View File

@ -423,6 +423,9 @@ OB_INLINE int ObResultSet::inner_get_next_row(const common::ObNewRow *&row)
_OB_LOG(ERROR, "phy_plan not init");
ret = OB_NOT_INIT;
}
//Save the current execution state to determine whether to refresh location
//and perform other necessary cleanup operations when the statement exits.
DAS_CTX(get_exec_context()).get_location_router().save_cur_exec_status(ret);
return ret;
}
@ -938,6 +941,9 @@ int ObResultSet::close(int &client_ret)
if (OB_SUCCESS != err && err != errcode_ && close_fail_cb_.is_valid()) {
close_fail_cb_(err, client_ret);
}
//Save the current execution state to determine whether to refresh location
//and perform other necessary cleanup operations when the statement exits.
DAS_CTX(get_exec_context()).get_location_router().save_cur_exec_status(ret);
//NG_TRACE_EXT(result_set_close, OB_ID(ret), ret, OB_ID(arg1), prev_ret,
//OB_ID(arg2), ins_ret, OB_ID(arg3), errcode_, OB_ID(async), async);
return ret; // 后面所有的操作都通过callback来完成

View File

@ -558,6 +558,9 @@ inline void ObResultSet::set_message(const char *message)
inline void ObResultSet::set_errcode(int code)
{
errcode_ = code;
//Save the current execution state to determine whether to refresh location
//and perform other necessary cleanup operations when the statement exits.
DAS_CTX(get_exec_context()).get_location_router().save_cur_exec_status(code);
}
inline int ObResultSet::add_field_column(const common::ObField &field)