Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
clmforever
oceanbase
提交
8aa5f184
O
oceanbase
项目概览
clmforever
/
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,发现更多精彩内容 >>
提交
8aa5f184
编写于
11月 14, 2022
作者:
Y
yishenglanlingzui
提交者:
wangzelin.wzl
11月 14, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bug replace into core in copy_datum_memory
上级
27eb478a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
17 deletion
+16
-17
src/sql/engine/dml/ob_table_replace_op.cpp
src/sql/engine/dml/ob_table_replace_op.cpp
+7
-8
src/sql/engine/expr/ob_expr_to_outfile_row.cpp
src/sql/engine/expr/ob_expr_to_outfile_row.cpp
+9
-9
未找到文件。
src/sql/engine/dml/ob_table_replace_op.cpp
浏览文件 @
8aa5f184
...
...
@@ -401,8 +401,7 @@ int ObTableReplaceOp::get_next_conflict_rowkey(DASTaskIter &task_iter)
ret
=
OB_INVALID_ARGUMENT
;
LOG_WARN
(
"stored row is null"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
stored_row
->
to_expr_skip_const
(
conflict_checker_
.
checker_ctdef_
.
data_table_rowkey_expr_
,
conflict_checker_
.
eval_ctx_
)))
{
conflict_checker_
.
checker_ctdef_
.
data_table_rowkey_expr_
,
conflict_checker_
.
eval_ctx_
)))
{
if
(
OB_ITER_END
!=
ret
)
{
LOG_WARN
(
"get next row from result iterator failed"
,
K
(
ret
));
}
...
...
@@ -518,7 +517,7 @@ int ObTableReplaceOp::replace_conflict_row_cache()
bool
same_row
=
false
;
CK
(
OB_NOT_NULL
(
delete_row
));
// dup checker依赖table column exprs
OZ
(
delete_row
->
to_expr
(
get_primary_table_old_row
(),
eval_ctx_
));
OZ
(
delete_row
->
to_expr
_skip_const
(
get_primary_table_old_row
(),
eval_ctx_
));
// 外键的检查已经下方到dml_service逻辑中了
OZ
(
ObDMLService
::
process_delete_row
(
del_ctdef
,
del_rtdef
,
skip_delete
,
*
this
));
...
...
@@ -531,7 +530,7 @@ int ObTableReplaceOp::replace_conflict_row_cache()
}
}
OZ
(
replace_row
->
to_expr
(
get_primary_table_new_row
(),
eval_ctx_
));
OZ
(
replace_row
->
to_expr
_skip_const
(
get_primary_table_new_row
(),
eval_ctx_
));
OZ
(
ObDMLService
::
process_insert_row
(
ins_ctdef
,
ins_rtdef
,
*
this
,
is_skipped
));
// TODO(yikang): fix trigger related for heap table
if
(
OB_SUCC
(
ret
)
&&
ins_ctdef
.
is_primary_index_
&&
OB_FAIL
(
TriggerHandle
::
do_handle_after_row
(
*
this
,
...
...
@@ -576,8 +575,8 @@ int ObTableReplaceOp::do_delete(ObConflictRowMap *primary_map)
LOG_DEBUG
(
"get one constraint_value from primary hash map"
,
K
(
constraint_value
));
if
(
NULL
!=
constraint_value
.
baseline_datum_row_
)
{
//baseline row is not empty, delete it
if
(
OB_FAIL
(
constraint_value
.
baseline_datum_row_
->
to_expr
(
get_primary_table_old_row
(),
eval_ctx_
)))
{
if
(
OB_FAIL
(
constraint_value
.
baseline_datum_row_
->
to_expr
_skip_const
(
get_primary_table_old_row
(),
eval_ctx_
)))
{
LOG_WARN
(
"stored row to expr faild"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
delete_row_to_das
(
false
)))
{
LOG_WARN
(
"shuffle delete row failed"
,
K
(
ret
),
K
(
constraint_value
));
...
...
@@ -600,8 +599,8 @@ int ObTableReplaceOp::do_insert(ObConflictRowMap *primary_map)
ObConflictValue
&
constraint_value
=
start_row_iter
->
second
;
if
(
OB_SUCC
(
ret
)
&&
NULL
!=
constraint_value
.
current_datum_row_
)
{
//current row is not empty, insert new row
if
(
OB_FAIL
(
constraint_value
.
current_datum_row_
->
to_expr
(
get_primary_table_new_row
(),
eval_ctx_
)))
{
if
(
OB_FAIL
(
constraint_value
.
current_datum_row_
->
to_expr
_skip_const
(
get_primary_table_new_row
(),
eval_ctx_
)))
{
LOG_WARN
(
"stored row to expr faild"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
insert_row_to_das
(
false
)))
{
LOG_WARN
(
"shuffle insert row failed"
,
K
(
ret
),
K
(
constraint_value
));
...
...
src/sql/engine/expr/ob_expr_to_outfile_row.cpp
浏览文件 @
8aa5f184
...
...
@@ -64,14 +64,14 @@ int ObExprToOutfileRow::calc_result_typeN(ObExprResType &type,
types
[
PARAM_LINE
].
set_calc_type
(
ObVarcharType
);
types
[
PARAM_LINE
].
set_calc_collation_type
(
types
[
PARAM_LINE
].
get_collation_type
());
// closed_cht
types
[
PARAM_ENCLOSED
].
set_calc_type
(
ObVarcharType
);
types
[
PARAM_ENCLOSED
].
set_calc_collation_type
(
types
[
PARAM_ENCLOSED
].
get_collation_type
());
// is_optional
types
[
PARAM_ENCLOSED
].
set_calc_type
(
ObVarcharType
);
types
[
PARAM_ENCLOSED
].
set_calc_collation_type
(
types
[
PARAM_ENCLOSED
].
get_collation_type
());
// is_optional
types
[
PARAM_OPTIONAL
].
set_calc_type
(
ObTinyIntType
);
// escaped_cht
types
[
PARAM_ESCAPED
].
set_calc_type
(
ObVarcharType
);
types
[
PARAM_ESCAPED
].
set_calc_collation_type
(
types
[
PARAM_ESCAPED
].
get_collation_type
());
}
types
[
PARAM_ESCAPED
].
set_calc_type
(
ObVarcharType
);
types
[
PARAM_ESCAPED
].
set_calc_collation_type
(
types
[
PARAM_ESCAPED
].
get_collation_type
());
}
return
ret
;
}
...
...
@@ -181,9 +181,9 @@ int ObExprToOutfileRow::to_outfile_str(const ObExpr &expr, ObEvalCtx &ctx, ObDat
ObObj
obj
;
OZ
(
v
.
to_obj
(
obj
,
obj_meta
,
expr
.
args_
[
i
]
->
obj_datum_map_
));
OZ
(
print_field
(
buf
,
buf_len
,
pos
,
obj
,
*
out_info
));
// print field terminator
if
(
OB_SUCC
(
ret
)
&&
i
!=
expr
.
arg_cnt_
-
1
)
{
OZ
(
out_info
->
field_
.
print_plain_str_literal
(
buf
,
buf_len
,
pos
,
out_info
->
print_params_
));
// print field terminator
if
(
OB_SUCC
(
ret
)
&&
i
!=
expr
.
arg_cnt_
-
1
)
{
OZ
(
out_info
->
field_
.
print_plain_str_literal
(
buf
,
buf_len
,
pos
,
out_info
->
print_params_
));
}
}
OZ
(
out_info
->
line_
.
print_plain_str_literal
(
buf
,
buf_len
,
pos
,
out_info
->
print_params_
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录