[CP] Fix: fix memory leak induced by foreign key casacde delete check duplicate rowkey

This commit is contained in:
obdev
2024-03-27 04:15:38 +00:00
committed by ob-robot
parent c169610149
commit 62eb9bd22b
10 changed files with 68 additions and 193 deletions

View File

@ -233,31 +233,6 @@ void ObExecContext::reset_op_env()
udf_ctx_mgr_->reset();
}
}
int ObExecContext::get_fk_root_ctx(ObExecContext* &fk_root_ctx)
{
int ret = OB_SUCCESS;
if (OB_ISNULL(this->get_parent_ctx())) {
fk_root_ctx = this;
} else if (!this->get_my_session()->is_foreign_key_cascade()) {
fk_root_ctx = this;
} else if (OB_FAIL(SMART_CALL(get_parent_ctx()->get_fk_root_ctx(fk_root_ctx)))) {
LOG_WARN("failed to get fk root ctx", K(ret));
}
return ret;
}
bool ObExecContext::is_fk_root_ctx()
{
bool ret = false;
if (OB_ISNULL(this->get_parent_ctx())) {
ret = true;
} else if (!this->get_my_session()->is_foreign_key_cascade()) {
ret = true;
}
return ret;
}
int ObExecContext::init_phy_op(const uint64_t phy_op_size)
{
int ret = OB_SUCCESS;