fix table schema use THIS_WORKER.get_allocator() leads dynamic leak

This commit is contained in:
18523270951@163.com
2023-07-13 07:48:00 +00:00
committed by ob-robot
parent d661d9bb89
commit 7002e5975a
2 changed files with 2 additions and 2 deletions

View File

@ -1184,7 +1184,7 @@ inline int ObInfoSchemaColumnsTable::init_mem_context()
if (OB_LIKELY(NULL == mem_context_)) { if (OB_LIKELY(NULL == mem_context_)) {
lib::ContextParam param; lib::ContextParam param;
param.set_properties(lib::USE_TL_PAGE_OPTIONAL) param.set_properties(lib::USE_TL_PAGE_OPTIONAL)
.set_mem_attr(tenant_id_, ObModIds::OB_SQL_EXECUTOR, ObCtxIds::DEFAULT_CTX_ID); .set_mem_attr(tenant_id_, "InfoColCtx", ObCtxIds::DEFAULT_CTX_ID);
if (OB_FAIL(CURRENT_CONTEXT->CREATE_CONTEXT(mem_context_, param))) { if (OB_FAIL(CURRENT_CONTEXT->CREATE_CONTEXT(mem_context_, param))) {
SQL_ENG_LOG(WARN, "create entity failed", K(ret)); SQL_ENG_LOG(WARN, "create entity failed", K(ret));
} else if (OB_ISNULL(mem_context_)) { } else if (OB_ISNULL(mem_context_)) {

View File

@ -4820,7 +4820,7 @@ int ObSQLUtils::async_recompile_view(const share::schema::ObTableSchema &old_vie
ObSQLSessionInfo &session_info) ObSQLSessionInfo &session_info)
{ {
int ret = OB_SUCCESS; int ret = OB_SUCCESS;
ObTableSchema new_view_schema; ObTableSchema new_view_schema(&alloc);
uint64_t data_version = 0; uint64_t data_version = 0;
if (OB_FAIL(new_view_schema.assign(old_view_schema))) { if (OB_FAIL(new_view_schema.assign(old_view_schema))) {
LOG_WARN("failed to assign table schema", K(ret)); LOG_WARN("failed to assign table schema", K(ret));