Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Metz
oceanbase
提交
bf5d7312
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看板
提交
bf5d7312
编写于
4月 01, 2022
作者:
X
xy0
提交者:
LINGuanRen
4月 01, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
whitescan safety hole: mainly uninitialized variables
上级
b9fc7921
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
14 addition
and
13 deletion
+14
-13
deps/oblib/src/lib/json_type/ob_json_base.cpp
deps/oblib/src/lib/json_type/ob_json_base.cpp
+5
-5
deps/oblib/src/lib/json_type/ob_json_bin.cpp
deps/oblib/src/lib/json_type/ob_json_bin.cpp
+1
-1
deps/oblib/src/lib/number/ob_number_v2.cpp
deps/oblib/src/lib/number/ob_number_v2.cpp
+1
-1
src/sql/engine/expr/ob_expr_inet.cpp
src/sql/engine/expr/ob_expr_inet.cpp
+3
-2
src/sql/engine/expr/ob_expr_json_contains_path.cpp
src/sql/engine/expr/ob_expr_json_contains_path.cpp
+2
-2
src/sql/engine/expr/ob_expr_json_value.cpp
src/sql/engine/expr/ob_expr_json_value.cpp
+1
-1
src/storage/blocksstable/ob_macro_block_writer.cpp
src/storage/blocksstable/ob_macro_block_writer.cpp
+1
-1
未找到文件。
deps/oblib/src/lib/json_type/ob_json_base.cpp
浏览文件 @
bf5d7312
...
...
@@ -1938,7 +1938,7 @@ int ObIJsonBase::to_number(ObIAllocator *allocator, number::ObNumber &number) co
int
ObIJsonBase
::
to_datetime
(
int64_t
&
value
)
const
{
INIT_SUCC
(
ret
);
int64_t
datetime
;
int64_t
datetime
=
0
;
switch
(
json_type
())
{
case
ObJsonNodeType
::
J_DATETIME
:
...
...
@@ -1987,7 +1987,7 @@ int ObIJsonBase::to_datetime(int64_t &value) const
int
ObIJsonBase
::
to_date
(
int32_t
&
value
)
const
{
INIT_SUCC
(
ret
);
int32_t
date
;
int32_t
date
=
0
;
switch
(
json_type
())
{
case
ObJsonNodeType
::
J_DATETIME
:
...
...
@@ -2034,7 +2034,7 @@ int ObIJsonBase::to_date(int32_t &value) const
int
ObIJsonBase
::
to_time
(
int64_t
&
value
)
const
{
INIT_SUCC
(
ret
);
int64_t
time
;
int64_t
time
=
0
;
switch
(
json_type
())
{
case
ObJsonNodeType
::
J_TIME
:
{
...
...
@@ -2079,7 +2079,7 @@ int ObIJsonBase::to_time(int64_t &value) const
int
ObIJsonBase
::
to_bit
(
uint64_t
&
value
)
const
{
INIT_SUCC
(
ret
);
uint64_t
bit
;
uint64_t
bit
=
0
;
const
ObJsonNodeType
j_type
=
json_type
();
ObDTMode
dt_mode
=
0
;
...
...
@@ -2839,7 +2839,7 @@ int ObJsonBaseUtil::string_to_bit(ObString &str, uint64_t &value)
{
INIT_SUCC
(
ret
);
uint64_t
bit
;
uint64_t
bit
=
0
;
int32_t
bit_len
=
0
;
if
(
OB_FAIL
(
ObJsonBaseUtil
::
get_bit_len
(
str
,
bit_len
)))
{
...
...
deps/oblib/src/lib/json_type/ob_json_bin.cpp
浏览文件 @
bf5d7312
...
...
@@ -3305,7 +3305,7 @@ int ObJsonBin::remove_v0(size_t index)
ObJsonNodeType
node_type
=
this
->
json_type
();
ObJBVerType
ver_type
=
this
->
get_vertype
();
// 1. move into element index, get used bytes
uint64_t
used_bytes
;
uint64_t
used_bytes
=
0
;
if
(
OB_FAIL
(
this
->
element
(
index
)))
{
LOG_WARN
(
"failed to get element "
,
K
(
index
),
K
(
ret
));
}
else
{
...
...
deps/oblib/src/lib/number/ob_number_v2.cpp
浏览文件 @
bf5d7312
...
...
@@ -5067,7 +5067,7 @@ int ObNumber::mul_v3(const ObNumber& other, ObNumber& value, ObIAllocator& alloc
int
offset
=
0
;
bool
check_sum_len
=
true
;
uint32_t
tmp_res_digits
[
OB_CALC_BUFFER_SIZE
];
uint32_t
tmp_res_digits
[
OB_CALC_BUFFER_SIZE
]
=
{
0
}
;
uint32_t
*
res_digits
=
NULL
;
if
(
strict_mode
)
{
res_digits
=
tmp_res_digits
;
...
...
src/sql/engine/expr/ob_expr_inet.cpp
浏览文件 @
bf5d7312
...
...
@@ -24,7 +24,7 @@ int ObExprInetCommon::str_to_ipv4(int len, const char *str, bool& is_ip_format_i
{
is_ip_format_invalid
=
false
;
int
ret
=
OB_SUCCESS
;
//Shortest IPv4 address
:"x.x.x.x",
length:7
//Shortest IPv4 address
:"x.x.x.x",
length:7
if
(
7
>
len
||
INET_ADDRSTRLEN
-
1
<
len
)
{
is_ip_format_invalid
=
true
;
LOG_WARN
(
"ip format invalid, too short or too long"
,
K
(
len
));
...
...
@@ -33,6 +33,7 @@ int ObExprInetCommon::str_to_ipv4(int len, const char *str, bool& is_ip_format_i
LOG_WARN
(
"ip_str or ipv4addr is null"
,
K
(
ret
),
K
(
str
),
K
(
ipv4addr
));
}
else
{
unsigned
char
byte_addr
[
4
];
memset
(
byte_addr
,
0
,
sizeof
(
byte_addr
));
int
dotcnt
=
0
,
numcnt
=
0
;
int
byte
=
0
;
char
c
;
...
...
@@ -89,7 +90,7 @@ int ObExprInetCommon::str_to_ipv6(int len, const char *str, bool& is_ip_format_i
int
ret
=
OB_SUCCESS
;
is_ip_format_invalid
=
false
;
//Ipv6 length of mysql support: 2~39
//Shortest IPv6 address
:"::",
length:2
//Shortest IPv6 address
:"::",
length:2
if
(
2
>
len
||
INET6_ADDRSTRLEN
-
1
<
len
)
{
is_ip_format_invalid
=
true
;
LOG_WARN
(
"ip format invalid, too short or too long"
,
K
(
len
));
...
...
src/sql/engine/expr/ob_expr_json_contains_path.cpp
浏览文件 @
bf5d7312
...
...
@@ -83,7 +83,7 @@ int ObExprJsonContainsPath::eval_json_contains_path(const ObExpr &expr,
LOG_WARN
(
"get_json_doc failed"
,
K
(
ret
));
}
else
{
// get one_or_all flag
bool
one_flag
;
bool
one_flag
=
false
;
ObDatum
*
json_datum
=
NULL
;
ObExpr
*
json_arg
=
expr
.
args_
[
1
];
ObObjType
val_type
=
json_arg
->
datum_meta_
.
type_
;
...
...
@@ -175,7 +175,7 @@ int ObExprJsonContainsPath::calc_resultN(common::ObObj &result,
LOG_WARN
(
"get_json_doc failed"
,
K
(
ret
));
}
else
{
// get one_or_all flag
bool
one_flag
;
bool
one_flag
=
false
;
ObObjType
val_type
=
params
[
1
].
get_type
();
if
(
val_type
==
ObNullType
||
params
[
1
].
is_null
())
{
is_null_result
=
true
;
...
...
src/sql/engine/expr/ob_expr_json_value.cpp
浏览文件 @
bf5d7312
...
...
@@ -954,7 +954,7 @@ int ObExprJsonValue::cast_to_year(ObIJsonBase *j_base, uint8_t &val)
int
ObExprJsonValue
::
cast_to_float
(
ObIJsonBase
*
j_base
,
ObObjType
dst_type
,
float
&
val
)
{
INIT_SUCC
(
ret
);
double
tmp_val
;
double
tmp_val
=
0
;
if
(
OB_ISNULL
(
j_base
))
{
ret
=
OB_ERR_NULL_VALUE
;
...
...
src/storage/blocksstable/ob_macro_block_writer.cpp
浏览文件 @
bf5d7312
...
...
@@ -659,7 +659,7 @@ int ObMacroBlockWriter::save_root_micro_block()
}
if
(
OB_SUCC
(
ret
))
{
ObStoreRow
row
;
IndexMicroBlockDesc
*
task_top_block_descs
;
IndexMicroBlockDesc
*
task_top_block_descs
=
NULL
;
if
(
OB_FAIL
(
micro_reader
.
init
(
block_data
,
&
index_column_map_
)))
{
STORAGE_LOG
(
WARN
,
"failed to init micro block reader"
,
K
(
ret
));
}
else
if
(
OB_FAIL
(
sstable_index_writer_
->
get_index_block_desc
(
task_top_block_descs
)))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录