Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
b5fd1cec
O
oceanbase
项目概览
Metz
/
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看板
提交
b5fd1cec
编写于
8月 29, 2021
作者:
B
bf0
提交者:
wangzelin.wzl
8月 29, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix load data case failed
上级
7be8c365
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
18 addition
and
22 deletion
+18
-22
src/observer/ob_inner_sql_connection.cpp
src/observer/ob_inner_sql_connection.cpp
+1
-1
src/sql/engine/cmd/ob_load_data_impl.cpp
src/sql/engine/cmd/ob_load_data_impl.cpp
+17
-21
未找到文件。
src/observer/ob_inner_sql_connection.cpp
浏览文件 @
b5fd1cec
...
@@ -424,7 +424,7 @@ int ObInnerSQLConnection::process_retry(
...
@@ -424,7 +424,7 @@ int ObInnerSQLConnection::process_retry(
is_get_location_timeout_error
(
last_ret
)
||
is_try_lock_row_err
(
last_ret
)
||
is_get_location_timeout_error
(
last_ret
)
||
is_try_lock_row_err
(
last_ret
)
||
is_has_no_readable_replica_err
(
last_ret
)
||
is_select_dup_follow_replic_err
(
last_ret
)
||
is_has_no_readable_replica_err
(
last_ret
)
||
is_select_dup_follow_replic_err
(
last_ret
)
||
is_trans_stmt_need_retry_error
(
last_ret
)
||
is_transaction_set_violation_err
(
last_ret
)
||
is_trans_stmt_need_retry_error
(
last_ret
)
||
is_transaction_set_violation_err
(
last_ret
)
||
is_snapshot_discarded_err
(
last_ret
)
||
OB_AUTOINC_SERVICE_BUSY
==
last_ret
))
{
is_snapshot_discarded_err
(
last_ret
)))
{
need_retry
=
true
;
need_retry
=
true
;
const
uint64_t
*
trace_id
=
ObCurTraceId
::
get
();
const
uint64_t
*
trace_id
=
ObCurTraceId
::
get
();
bool
sql_trigger_by_user_req
=
(
NULL
!=
trace_id
&&
0
!=
trace_id
[
0
]
&&
0
!=
trace_id
[
1
]);
bool
sql_trigger_by_user_req
=
(
NULL
!=
trace_id
&&
0
!=
trace_id
[
0
]
&&
0
!=
trace_id
[
1
]);
...
...
src/sql/engine/cmd/ob_load_data_impl.cpp
浏览文件 @
b5fd1cec
...
@@ -1264,20 +1264,19 @@ int ObCSVParser::next_line(bool& yield_line)
...
@@ -1264,20 +1264,19 @@ int ObCSVParser::next_line(bool& yield_line)
bool
yield
=
false
;
bool
yield
=
false
;
int
with_back_slash
=
0
;
int
with_back_slash
=
0
;
for
(;
!
yield
&&
cur_pos_
!=
buf_end_pos_
;
++
cur_pos_
,
++
cur_field_end_pos_
)
{
for
(;
!
yield
&&
cur_pos_
<
buf_end_pos_
;
++
cur_pos_
,
++
cur_field_end_pos_
)
{
bool
line_term_matched
=
false
;
bool
line_term_matched
=
false
;
if
(
*
cur_pos_
==
formats_
.
enclose_char_
&&
!
in_enclose_flag_
&&
cur_pos_
==
cur_field_begin_pos_
)
{
if
(
*
cur_pos_
==
formats_
.
enclose_char_
&&
!
in_enclose_flag_
&&
cur_pos_
==
cur_field_begin_pos_
)
{
in_enclose_flag_
=
true
;
in_enclose_flag_
=
true
;
last_end_enclosed_
=
NULL
;
last_end_enclosed_
=
NULL
;
}
else
if
(
(
*
cur_pos_
==
formats_
.
escape_char_
&&
formats_
.
escape_char_
!=
formats_
.
enclose_char_
)
||
}
else
if
(
cur_pos_
+
1
<
buf_end_pos_
&&
(
in_enclose_flag_
&&
formats_
.
enclose_char_
==
*
cur_pos_
&&
cur_pos_
<
buf_end_pos_
&&
(
(
*
cur_pos_
==
formats_
.
escape_char_
&&
formats_
.
escape_char_
!=
formats_
.
enclose_char_
)
||
formats_
.
enclose_char_
==
*
(
cur_pos_
+
1
)))
{
(
in_enclose_flag_
&&
formats_
.
enclose_char_
==
*
cur_pos_
&&
if
(
cur_pos_
<
buf_end_pos_
)
{
formats_
.
enclose_char_
==
*
(
cur_pos_
+
1
)))
)
{
cur_pos_
++
;
cur_pos_
++
;
if
(
!
is_fast_parse_
)
{
if
(
!
is_fast_parse_
)
{
*
cur_field_end_pos_
=
escaped_char
(
*
cur_pos_
,
&
with_back_slash
);
*
cur_field_end_pos_
=
escaped_char
(
*
cur_pos_
,
&
with_back_slash
);
}
}
}
}
else
{
}
else
{
if
(
cur_field_end_pos_
!=
cur_pos_
&&
!
is_fast_parse_
)
{
if
(
cur_field_end_pos_
!=
cur_pos_
&&
!
is_fast_parse_
)
{
*
cur_field_end_pos_
=
*
cur_pos_
;
*
cur_field_end_pos_
=
*
cur_pos_
;
...
@@ -1369,13 +1368,11 @@ int ObCSVParser::fast_parse_lines(
...
@@ -1369,13 +1368,11 @@ int ObCSVParser::fast_parse_lines(
if
(
OB_UNLIKELY
(
!
buffer
.
is_valid
()))
{
if
(
OB_UNLIKELY
(
!
buffer
.
is_valid
()))
{
ret
=
OB_INVALID_ARGUMENT
;
ret
=
OB_INVALID_ARGUMENT
;
}
else
if
(
formats
.
is_simple_format_
)
{
}
else
if
(
formats
.
is_simple_format_
)
{
char
*
cur_pos
=
buffer
.
begin_ptr
();
char
*
cur_pos
=
buffer
.
begin_ptr
();
bool
in_escaped
=
false
;
for
(
char
*
p
=
buffer
.
begin_ptr
();
p
<
buffer
.
current_ptr
();
++
p
)
{
for
(
char
*
p
=
buffer
.
begin_ptr
();
p
!=
buffer
.
current_ptr
();
++
p
)
{
char
cur_char
=
*
p
;
char
cur_char
=
*
p
;
if
(
!
in_escaped
)
{
if
(
formats
.
escape_char_
==
cur_char
&&
p
+
1
<
buffer
.
current_ptr
())
{
if
(
formats
.
enclose_char_
==
cur_char
)
{
p
++
;
in_escaped
=
true
;
}
else
if
(
formats
.
line_term_char_
==
cur_char
)
{
}
else
if
(
formats
.
line_term_char_
==
cur_char
)
{
cur_lines
++
;
cur_lines
++
;
cur_pos
=
p
+
1
;
cur_pos
=
p
+
1
;
...
@@ -1384,7 +1381,6 @@ int ObCSVParser::fast_parse_lines(
...
@@ -1384,7 +1381,6 @@ int ObCSVParser::fast_parse_lines(
}
}
}
}
}
}
}
if
(
is_last_buf
&&
buffer
.
current_ptr
()
>
cur_pos
)
{
if
(
is_last_buf
&&
buffer
.
current_ptr
()
>
cur_pos
)
{
cur_lines
++
;
cur_lines
++
;
cur_pos
=
buffer
.
current_ptr
();
cur_pos
=
buffer
.
current_ptr
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录