Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
野花太放肆
oceanbase
提交
2b5d8922
O
oceanbase
项目概览
野花太放肆
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2b5d8922
编写于
2月 15, 2023
作者:
O
obdev
提交者:
ob-robot
2月 15, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[to #47336750] fix memory leak of package variable serialize
上级
adce321d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
4 deletion
+7
-4
src/pl/ob_pl_package_manager.cpp
src/pl/ob_pl_package_manager.cpp
+1
-1
src/pl/ob_pl_package_state.cpp
src/pl/ob_pl_package_state.cpp
+5
-2
src/pl/ob_pl_package_state.h
src/pl/ob_pl_package_state.h
+1
-1
未找到文件。
src/pl/ob_pl_package_manager.cpp
浏览文件 @
2b5d8922
...
...
@@ -758,7 +758,7 @@ int ObPLPackageManager::set_package_var_val(const ObPLResolveCtx &resolve_ctx,
ret
=
OB_ERR_NUMERIC_OR_VALUE_ERROR
;
LOG_WARN
(
"not null check violated"
,
K
(
var
->
is_not_null
()),
K
(
var_val
.
is_null
()),
K
(
ret
));
}
OZ
(
package_state
->
set_package_var_val
(
var_idx
,
new_var_val
));
OZ
(
package_state
->
set_package_var_val
(
var_idx
,
new_var_val
,
!
need_deserialize
));
if
(
!
need_deserialize
)
{
OZ
(
package_state
->
update_changed_vars
(
var_idx
));
}
...
...
src/pl/ob_pl_package_state.cpp
浏览文件 @
2b5d8922
...
...
@@ -183,7 +183,7 @@ void ObPLPackageState::reset(ObSQLSessionInfo *session_info)
cursor_allocator_
.
reset
();
}
int
ObPLPackageState
::
set_package_var_val
(
const
int64_t
var_idx
,
const
ObObj
&
value
)
int
ObPLPackageState
::
set_package_var_val
(
const
int64_t
var_idx
,
const
ObObj
&
value
,
bool
deep_copy_complex
)
{
int
ret
=
OB_SUCCESS
;
if
(
var_idx
<
0
||
var_idx
>=
vars_
.
count
())
{
...
...
@@ -199,7 +199,10 @@ int ObPLPackageState::set_package_var_val(const int64_t var_idx, const ObObj &va
LOG_WARN
(
"failed to alloc memory for pacakge var"
,
K
(
ret
),
K
(
buf
));
}
OZ
(
vars_
.
at
(
var_idx
).
deep_copy
(
value
,
buf
,
value
.
get_deep_copy_size
(),
pos
));
}
else
if
(
value
.
is_pl_extend
())
{
}
else
if
(
value
.
is_pl_extend
()
&&
value
.
get_meta
().
get_extend_type
()
!=
PL_CURSOR_TYPE
&&
value
.
get_meta
().
get_extend_type
()
!=
PL_REF_CURSOR_TYPE
&&
deep_copy_complex
)
{
ObObj
copy
;
OZ
(
ObUserDefinedType
::
deep_copy_obj
(
inner_allocator_
,
value
,
copy
));
OX
(
vars_
.
at
(
var_idx
)
=
copy
);
...
...
src/pl/ob_pl_package_state.h
浏览文件 @
2b5d8922
...
...
@@ -134,7 +134,7 @@ public:
common
::
ObIAllocator
&
get_pkg_allocator
()
{
return
inner_allocator_
;
}
common
::
ObIAllocator
&
get_pkg_cursor_allocator
()
{
return
cursor_allocator_
;
}
int
add_package_var_val
(
const
common
::
ObObj
&
value
,
ObPLType
type
);
int
set_package_var_val
(
int64_t
var_idx
,
const
common
::
ObObj
&
value
);
int
set_package_var_val
(
int64_t
var_idx
,
const
common
::
ObObj
&
value
,
bool
deep_copy_complex
=
true
);
int
get_package_var_val
(
int64_t
var_idx
,
common
::
ObObj
&
value
);
int
update_changed_vars
(
int64_t
var_idx
);
inline
bool
is_package_info_changed
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录