Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
天地威能
oceanbase
提交
f03ae017
O
oceanbase
项目概览
天地威能
/
oceanbase
与 Fork 源项目一致
Fork自
oceanbase / oceanbase
通知
1
Star
0
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,发现更多精彩内容 >>
提交
f03ae017
编写于
11月 15, 2022
作者:
S
seuwebber
提交者:
wangzelin.wzl
11月 15, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[to #46079623]fix core init trigger row use ObExecContext::allocator_
上级
3be23df8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
8 deletion
+8
-8
src/sql/engine/dml/ob_trigger_handler.cpp
src/sql/engine/dml/ob_trigger_handler.cpp
+5
-5
src/sql/engine/expr/ob_expr_to_outfile_row.cpp
src/sql/engine/expr/ob_expr_to_outfile_row.cpp
+3
-3
未找到文件。
src/sql/engine/dml/ob_trigger_handler.cpp
浏览文件 @
f03ae017
...
...
@@ -111,12 +111,12 @@ int TriggerHandle::init_trigger_params(
int64_t
param_store_size
=
sizeof
(
ParamStore
);
// TODO: 这个接口还可以进一步精细化,比如在没有when条件时,tg_when_point_params_相关逻辑都不需要执行的,
// 或者在insert/delete操作时,tg_init_point_params_也不需要执行的。
if
(
OB_ISNULL
(
when_point_params_buf
=
das_ctx
.
get_
das_alloc
().
alloc
(
param_store_size
))
||
OB_ISNULL
(
row_point_params_buf
=
das_ctx
.
get_
das_alloc
().
alloc
(
param_store_size
)))
{
if
(
OB_ISNULL
(
when_point_params_buf
=
das_ctx
.
get_
exec_ctx
().
get_allocator
().
alloc
(
param_store_size
))
||
OB_ISNULL
(
row_point_params_buf
=
das_ctx
.
get_
exec_ctx
().
get_allocator
().
alloc
(
param_store_size
)))
{
ret
=
OB_ALLOCATE_MEMORY_FAILED
;
LOG_WARN
(
"failed to allocate memory"
,
K
(
ret
));
}
else
{
ObIAllocator
&
allocator
=
das_ctx
.
get_
das_alloc
();
ObIAllocator
&
allocator
=
das_ctx
.
get_
exec_ctx
().
get_allocator
();
trig_rtdef
.
tg_when_point_params_
=
new
(
when_point_params_buf
)
ParamStore
(
ObWrapperAllocator
(
allocator
));
trig_rtdef
.
tg_row_point_params_
=
new
(
row_point_params_buf
)
ParamStore
(
ObWrapperAllocator
(
allocator
));
OZ
(
trig_rtdef
.
tg_when_point_params_
->
prepare_allocate
(
WHEN_POINT_PARAM_COUNT
));
...
...
@@ -129,8 +129,8 @@ int TriggerHandle::init_trigger_params(
int64_t
rowtype_col_count
=
trig_ctdef
.
trig_col_info_
.
get_rowtype_count
();
int64_t
init_size
=
pl
::
ObRecordType
::
get_init_size
(
rowtype_col_count
);
if
(
trig_ctdef
.
all_tm_points_
.
has_when_condition
()
||
trig_ctdef
.
all_tm_points_
.
has_row_point
())
{
OZ
(
init_trigger_row
(
das_ctx
.
get_
das_alloc
(),
rowtype_col_count
,
old_record
));
OZ
(
init_trigger_row
(
das_ctx
.
get_
das_alloc
(),
rowtype_col_count
,
new_record
));
OZ
(
init_trigger_row
(
das_ctx
.
get_
exec_ctx
().
get_allocator
(),
rowtype_col_count
,
old_record
));
OZ
(
init_trigger_row
(
das_ctx
.
get_
exec_ctx
().
get_allocator
(),
rowtype_col_count
,
new_record
));
}
LOG_DEBUG
(
"trigger init"
,
K
(
rowtype_col_count
),
K
(
ret
));
...
...
src/sql/engine/expr/ob_expr_to_outfile_row.cpp
浏览文件 @
f03ae017
...
...
@@ -286,9 +286,9 @@ int ObExprToOutfileRow::print_wchar_to_buf(char *buf, const int64_t buf_len, int
}
return
ret
;
}
int
ObExprToOutfileRow
::
copy_string_to_buf
(
char
*
buf
,
const
int64_t
buf_len
,
int64_t
&
pos
,
const
ObString
&
str
)
int
ObExprToOutfileRow
::
copy_string_to_buf
(
char
*
buf
,
const
int64_t
buf_len
,
int64_t
&
pos
,
const
ObString
&
str
)
{
return
databuff_memcpy
(
buf
,
buf_len
,
pos
,
str
.
length
(),
str
.
ptr
());
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录