fix stmt rollback failed cause 4038 returned to client

This commit is contained in:
chinaxing
2024-02-08 17:35:07 +00:00
committed by ob-robot
parent 90b7fe53bb
commit d6ac8823cd
2 changed files with 8 additions and 6 deletions

View File

@ -833,7 +833,7 @@ OB_INLINE int ObResultSet::do_close_plan(int errcode, ObExecContext &ctx)
return ret;
}
int ObResultSet::close(int &client_ret)
int ObResultSet::do_close(int *client_ret)
{
int ret = OB_SUCCESS;
LinkExecCtxGuard link_guard(my_session_, get_exec_context());
@ -948,8 +948,9 @@ int ObResultSet::close(int &client_ret)
}
// notify close fail to listener
int err = OB_SUCCESS != do_close_plan_ret ? do_close_plan_ret : ret;
if (OB_SUCCESS != err && err != errcode_ && close_fail_cb_.is_valid()) {
close_fail_cb_(err, client_ret);
if (client_ret != NULL
&& 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.