Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
野花太放肆
oceanbase
提交
579345ca
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,发现更多精彩内容 >>
提交
579345ca
编写于
3月 22, 2023
作者:
O
obdev
提交者:
ob-robot
3月 22, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[BUGFIX] fix lob bugs
上级
3af5758e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
36 addition
and
6 deletion
+36
-6
src/observer/mysql/ob_query_driver.cpp
src/observer/mysql/ob_query_driver.cpp
+16
-1
src/share/ob_lob_access_utils.cpp
src/share/ob_lob_access_utils.cpp
+1
-1
src/sql/engine/expr/ob_expr_output_pack.cpp
src/sql/engine/expr/ob_expr_output_pack.cpp
+17
-3
src/storage/lob/ob_lob_manager.cpp
src/storage/lob/ob_lob_manager.cpp
+2
-1
未找到文件。
src/observer/mysql/ob_query_driver.cpp
浏览文件 @
579345ca
...
...
@@ -528,7 +528,20 @@ int ObQueryDriver::process_lob_locator_results(ObObj& value,
ObLobLocatorV2
loc
(
value
.
get_string
(),
value
.
has_lob_header
());
if
(
loc
.
is_lob_locator_v1
())
{
// do nothing, lob locator version 1
}
else
if
(
loc
.
is_valid
())
{
// lob locator v2
if
(
!
loc
.
has_extern
())
{
if
(
!
loc
.
has_lob_header
())
{
ObString
data
=
value
.
get_string
();
ObTextStringResult
new_tmp_lob
(
value
.
get_type
(),
true
,
allocator
);
if
(
OB_FAIL
(
new_tmp_lob
.
init
(
data
.
length
())))
{
LOG_WARN
(
"fail to init text string result"
,
K
(
ret
),
K
(
new_tmp_lob
),
K
(
data
.
length
()));
}
else
if
(
OB_FAIL
(
new_tmp_lob
.
append
(
data
)))
{
LOG_WARN
(
"fail to append data"
,
K
(
ret
),
K
(
new_tmp_lob
),
K
(
data
.
length
()));
}
else
{
ObString
res
;
new_tmp_lob
.
get_result_buffer
(
res
);
value
.
set_lob_value
(
value
.
get_type
(),
res
.
ptr
(),
res
.
length
());
value
.
set_has_lob_header
();
// must has lob header
}
}
else
if
(
!
loc
.
has_extern
())
{
// currently all temp lobs have extern field in oracle mode
// or the lob locator header cannot compatable with clients for 4.0
ret
=
OB_INVALID_ARGUMENT
;
...
...
@@ -704,6 +717,8 @@ int ObQueryDriver::convert_text_value_charset(ObObj& value,
// do nothing
}
else
if
(
OB_FAIL
(
lob
.
get_inrow_data
(
inrow_data
)))
{
LOG_WARN
(
"fail to get inrow data"
,
K
(
ret
),
K
(
lob
));
}
else
if
(
inrow_data
.
length
()
==
0
)
{
// do nothing
}
else
{
int64_t
lob_data_byte_len
=
inrow_data
.
length
();
int64_t
offset_len
=
reinterpret_cast
<
uint64_t
>
(
inrow_data
.
ptr
())
-
reinterpret_cast
<
uint64_t
>
(
lob
.
ptr_
);
...
...
src/share/ob_lob_access_utils.cpp
浏览文件 @
579345ca
...
...
@@ -1019,7 +1019,7 @@ int ObTextStringResult::calc_buffer_len(int64_t res_len)
res_len
+=
sizeof
(
ObLobCommon
);
buff_len_
=
ObLobLocatorV2
::
calc_locator_full_len
(
extern_flags
,
0
,
static_cast
<
uint32_t
>
(
res_len
),
false
);
}
else
{
ret
=
OB_
SIZE_OVERFLOW
;
ret
=
OB_
NOT_SUPPORTED
;
LOG_WARN
(
"Lob: out row temp lob not implemented, not support length bigger than 512M"
,
K
(
ret
),
K
(
this
),
K
(
pos_
),
K
(
buff_len_
),
K
(
res_len
));
}
...
...
src/sql/engine/expr/ob_expr_output_pack.cpp
浏览文件 @
579345ca
...
...
@@ -340,6 +340,8 @@ int ObExprOutputPack::convert_text_value_charset(common::ObObj& value,
// do nothing
}
else
if
(
OB_FAIL
(
lob
.
get_inrow_data
(
inrow_data
)))
{
LOG_WARN
(
"fail to get inrow data"
,
K
(
ret
),
K
(
lob
));
}
else
if
(
inrow_data
.
length
()
==
0
)
{
// do nothing
}
else
{
int64_t
lob_data_byte_len
=
inrow_data
.
length
();
int64_t
offset_len
=
reinterpret_cast
<
uint64_t
>
(
inrow_data
.
ptr
())
-
reinterpret_cast
<
uint64_t
>
(
lob
.
ptr_
);
...
...
@@ -494,12 +496,24 @@ int ObExprOutputPack::process_lob_locator_results(common::ObObj& value,
ObLobLocatorV2
loc
(
value
.
get_string
(),
value
.
has_lob_header
());
if
(
loc
.
is_lob_locator_v1
())
{
// do nothing, lob locator version 1
}
else
if
(
loc
.
is_valid
())
{
// lob locator v2
if
(
!
loc
.
has_extern
())
{
// if has header but without extern header
if
(
!
loc
.
has_lob_header
())
{
// consider 4.0 will return no lob header obj
ObString
data
=
value
.
get_string
();
ObTextStringResult
new_tmp_lob
(
value
.
get_type
(),
true
,
&
alloc
);
if
(
OB_FAIL
(
new_tmp_lob
.
init
(
data
.
length
())))
{
LOG_WARN
(
"fail to init text string result"
,
K
(
ret
),
K
(
new_tmp_lob
),
K
(
data
.
length
()));
}
else
if
(
OB_FAIL
(
new_tmp_lob
.
append
(
data
)))
{
LOG_WARN
(
"fail to append data"
,
K
(
ret
),
K
(
new_tmp_lob
),
K
(
data
.
length
()));
}
else
{
ObString
res
;
new_tmp_lob
.
get_result_buffer
(
res
);
value
.
set_lob_value
(
value
.
get_type
(),
res
.
ptr
(),
res
.
length
());
value
.
set_has_lob_header
();
// must has lob header
}
}
else
if
(
!
loc
.
has_extern
())
{
// if has header but without extern header
// mock loc v2 with extern ? currently all temp lobs have extern field in oracle mode
// should not come here
OB_ASSERT
(
0
);
}
if
(
!
is_support_outrow_locator_v2
&&
!
loc
.
has_inrow_data
())
{
}
else
if
(
!
is_support_outrow_locator_v2
&&
!
loc
.
has_inrow_data
())
{
if
(
OB_FAIL
(
ObTextStringIter
::
append_outrow_lob_fulldata
(
value
,
&
my_session
,
alloc
)))
{
LOG_WARN
(
"Lob: convert lob to outrow failed"
,
K
(
value
),
K
(
GET_MIN_CLUSTER_VERSION
()));
}
...
...
src/storage/lob/ob_lob_manager.cpp
浏览文件 @
579345ca
...
...
@@ -420,7 +420,8 @@ int ObLobManager::is_remote(ObLobAccessParam& param, bool& is_remote, common::Ob
}
else
{
is_remote
=
(
dst_addr
!=
self_addr
);
if
(
param
.
from_rpc_
==
true
&&
is_remote
)
{
LOG_WARN
(
"call from rpc, but remote again"
,
K
(
dst_addr
),
K
(
self_addr
));
ret
=
OB_NOT_MASTER
;
LOG_WARN
(
"call from rpc, but remote again"
,
K
(
ret
),
K
(
dst_addr
),
K
(
self_addr
));
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录