issue<48107888>:fix memory leak of inner store routine with out argument

This commit is contained in:
obdev
2023-04-19 07:11:50 +00:00
committed by ob-robot
parent 05d068d8ee
commit 0d6dc4e2ca
5 changed files with 44 additions and 0 deletions

View File

@ -4806,6 +4806,23 @@ int ObSPIService::spi_copy_datum(ObPLExecCtx *ctx,
return ret;
}
int ObSPIService::spi_destruct_obj(ObPLExecCtx *ctx,
ObObj *obj)
{
int ret = OB_SUCCESS;
CK (OB_NOT_NULL(ctx));
CK (OB_NOT_NULL(ctx->exec_ctx_));
CK (OB_NOT_NULL(obj));
if (OB_SUCC(ret) &&
obj->is_pl_extend() &&
obj->get_meta().get_extend_type() != pl::PL_REF_CURSOR_TYPE) {
OZ (ObUserDefinedType::destruct_obj(*obj, ctx->exec_ctx_->get_my_session()));
}
SET_SPI_STATUS;
return ret;
}
int ObSPIService::spi_interface_impl(pl::ObPLExecCtx* ctx, int64_t func_addr)
{
int ret = OB_SUCCESS;

View File

@ -549,6 +549,9 @@ public:
ObDataType *dest_type,
uint64_t package_id = OB_INVALID_ID);
static int spi_destruct_obj(pl::ObPLExecCtx *ctx,
ObObj *obj);
static int spi_build_record_type(common::ObIAllocator &allocator,
ObSQLSessionInfo &session,
share::schema::ObSchemaGetterGuard &schema_guard,