Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1466505e
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
1466505e
编写于
5月 05, 2021
作者:
sangshuduo
提交者:
GitHub
5月 05, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-3197]<fix>: taosdemo and taosdump coverity scan issues. (#6004)
Co-authored-by:
N
Shuduo Sang
<
sdsang@taosdata.com
>
上级
4c6f4a14
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
8 addition
and
10 deletion
+8
-10
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+7
-9
src/kit/taosdump/taosdump.c
src/kit/taosdump/taosdump.c
+1
-1
未找到文件。
src/kit/taosdemo/taosdemo.c
浏览文件 @
1466505e
...
@@ -725,7 +725,7 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
...
@@ -725,7 +725,7 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
errorPrint
(
"%s"
,
"
\n\t
-c need a valid path following!
\n
"
);
errorPrint
(
"%s"
,
"
\n\t
-c need a valid path following!
\n
"
);
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
tstrncpy
(
configDir
,
argv
[
++
i
],
MAX_FILE_
NAME_LEN
);
tstrncpy
(
configDir
,
argv
[
++
i
],
TSDB_FILE
NAME_LEN
);
}
else
if
(
strcmp
(
argv
[
i
],
"-h"
)
==
0
)
{
}
else
if
(
strcmp
(
argv
[
i
],
"-h"
)
==
0
)
{
if
(
argc
==
i
+
1
)
{
if
(
argc
==
i
+
1
)
{
...
@@ -967,9 +967,9 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
...
@@ -967,9 +967,9 @@ static void parse_args(int argc, char *argv[], SArguments *arguments) {
}
}
}
else
if
(
strcmp
(
argv
[
i
],
"-D"
)
==
0
)
{
}
else
if
(
strcmp
(
argv
[
i
],
"-D"
)
==
0
)
{
arguments
->
method_of_delete
=
atoi
(
argv
[
++
i
]);
arguments
->
method_of_delete
=
atoi
(
argv
[
++
i
]);
if
(
arguments
->
method_of_delete
<
0
if
(
arguments
->
method_of_delete
>
3
)
{
||
arguments
->
method_of_delete
>
3
)
{
errorPrint
(
"%s"
,
"
\n\t
-D need a valud (0~3) number following!
\n
"
);
arguments
->
method_of_delete
=
0
;
exit
(
EXIT_FAILURE
)
;
}
}
}
else
if
((
strcmp
(
argv
[
i
],
"--version"
)
==
0
)
||
}
else
if
((
strcmp
(
argv
[
i
],
"--version"
)
==
0
)
||
(
strcmp
(
argv
[
i
],
"-V"
)
==
0
)){
(
strcmp
(
argv
[
i
],
"-V"
)
==
0
)){
...
@@ -1372,7 +1372,7 @@ static int printfInsertMeta() {
...
@@ -1372,7 +1372,7 @@ static int printfInsertMeta() {
printf
(
" childTblLimit:
\033
[33m%"
PRId64
"
\033
[0m
\n
"
,
printf
(
" childTblLimit:
\033
[33m%"
PRId64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblLimit
);
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblLimit
);
}
}
if
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblOffset
>
=
0
)
{
if
(
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblOffset
>
0
)
{
printf
(
" childTblOffset:
\033
[33m%"
PRIu64
"
\033
[0m
\n
"
,
printf
(
" childTblOffset:
\033
[33m%"
PRIu64
"
\033
[0m
\n
"
,
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblOffset
);
g_Dbs
.
db
[
i
].
superTbls
[
j
].
childTblOffset
);
}
}
...
@@ -4706,8 +4706,7 @@ static void getTableName(char *pTblName, threadInfo* pThreadInfo, uint64_t table
...
@@ -4706,8 +4706,7 @@ static void getTableName(char *pTblName, threadInfo* pThreadInfo, uint64_t table
{
{
SSuperTable
*
superTblInfo
=
pThreadInfo
->
superTblInfo
;
SSuperTable
*
superTblInfo
=
pThreadInfo
->
superTblInfo
;
if
(
superTblInfo
)
{
if
(
superTblInfo
)
{
if
((
superTblInfo
->
childTblOffset
>=
0
)
if
(
superTblInfo
->
childTblLimit
>
0
)
{
&&
(
superTblInfo
->
childTblLimit
>
0
))
{
snprintf
(
pTblName
,
TSDB_TABLE_NAME_LEN
,
"%s"
,
snprintf
(
pTblName
,
TSDB_TABLE_NAME_LEN
,
"%s"
,
superTblInfo
->
childTblName
+
superTblInfo
->
childTblName
+
(
tableSeq
-
superTblInfo
->
childTblOffset
)
*
TSDB_TABLE_NAME_LEN
);
(
tableSeq
-
superTblInfo
->
childTblOffset
)
*
TSDB_TABLE_NAME_LEN
);
...
@@ -5611,8 +5610,7 @@ static void startMultiThreadInsertData(int threads, char* db_name,
...
@@ -5611,8 +5610,7 @@ static void startMultiThreadInsertData(int threads, char* db_name,
printf
(
"WARNING: offset and limit will not be used since the child tables not exists!
\n
"
);
printf
(
"WARNING: offset and limit will not be used since the child tables not exists!
\n
"
);
}
}
if
((
superTblInfo
->
childTblExists
==
TBL_ALREADY_EXISTS
)
if
(
superTblInfo
->
childTblExists
==
TBL_ALREADY_EXISTS
)
{
&&
(
superTblInfo
->
childTblOffset
>=
0
))
{
if
((
superTblInfo
->
childTblLimit
<
0
)
if
((
superTblInfo
->
childTblLimit
<
0
)
||
((
superTblInfo
->
childTblOffset
+
superTblInfo
->
childTblLimit
)
||
((
superTblInfo
->
childTblOffset
+
superTblInfo
->
childTblLimit
)
>
(
superTblInfo
->
childTblCount
)))
{
>
(
superTblInfo
->
childTblCount
)))
{
...
...
src/kit/taosdump/taosdump.c
浏览文件 @
1466505e
...
@@ -525,7 +525,7 @@ int main(int argc, char *argv[]) {
...
@@ -525,7 +525,7 @@ int main(int argc, char *argv[]) {
/* Parse our arguments; every option seen by parse_opt will be
/* Parse our arguments; every option seen by parse_opt will be
reflected in arguments. */
reflected in arguments. */
if
(
argc
>
1
)
if
(
argc
>
2
)
parse_args
(
argc
,
argv
,
&
g_args
);
parse_args
(
argc
,
argv
,
&
g_args
);
argp_parse
(
&
argp
,
argc
,
argv
,
0
,
0
,
&
g_args
);
argp_parse
(
&
argp
,
argc
,
argv
,
0
,
0
,
&
g_args
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录