Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
61a70012
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看板
提交
61a70012
编写于
2月 22, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(query): fix coverity issues.
上级
0c914564
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
32 addition
and
16 deletion
+32
-16
examples/c/tmq.c
examples/c/tmq.c
+28
-9
source/dnode/vnode/src/tsdb/tsdbFile.c
source/dnode/vnode/src/tsdb/tsdbFile.c
+2
-2
source/libs/executor/src/executil.c
source/libs/executor/src/executil.c
+0
-2
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+0
-1
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+2
-2
未找到文件。
examples/c/tmq.c
浏览文件 @
61a70012
...
@@ -189,27 +189,46 @@ void tmq_commit_cb_print(tmq_t* tmq, int32_t code, void* param) {
...
@@ -189,27 +189,46 @@ void tmq_commit_cb_print(tmq_t* tmq, int32_t code, void* param) {
tmq_t
*
build_consumer
()
{
tmq_t
*
build_consumer
()
{
tmq_conf_res_t
code
;
tmq_conf_res_t
code
;
tmq_t
*
tmq
=
NULL
;
tmq_conf_t
*
conf
=
tmq_conf_new
();
tmq_conf_t
*
conf
=
tmq_conf_new
();
code
=
tmq_conf_set
(
conf
,
"enable.auto.commit"
,
"true"
);
code
=
tmq_conf_set
(
conf
,
"enable.auto.commit"
,
"true"
);
if
(
TMQ_CONF_OK
!=
code
)
return
NULL
;
if
(
TMQ_CONF_OK
!=
code
)
{
goto
_end
;
}
code
=
tmq_conf_set
(
conf
,
"auto.commit.interval.ms"
,
"1000"
);
code
=
tmq_conf_set
(
conf
,
"auto.commit.interval.ms"
,
"1000"
);
if
(
TMQ_CONF_OK
!=
code
)
return
NULL
;
if
(
TMQ_CONF_OK
!=
code
)
{
goto
_end
;
}
code
=
tmq_conf_set
(
conf
,
"group.id"
,
"cgrpName"
);
code
=
tmq_conf_set
(
conf
,
"group.id"
,
"cgrpName"
);
if
(
TMQ_CONF_OK
!=
code
)
return
NULL
;
if
(
TMQ_CONF_OK
!=
code
)
{
goto
_end
;
}
code
=
tmq_conf_set
(
conf
,
"client.id"
,
"user defined name"
);
code
=
tmq_conf_set
(
conf
,
"client.id"
,
"user defined name"
);
if
(
TMQ_CONF_OK
!=
code
)
return
NULL
;
if
(
TMQ_CONF_OK
!=
code
)
{
goto
_end
;
}
code
=
tmq_conf_set
(
conf
,
"td.connect.user"
,
"root"
);
code
=
tmq_conf_set
(
conf
,
"td.connect.user"
,
"root"
);
if
(
TMQ_CONF_OK
!=
code
)
return
NULL
;
if
(
TMQ_CONF_OK
!=
code
)
{
goto
_end
;
}
code
=
tmq_conf_set
(
conf
,
"td.connect.pass"
,
"taosdata"
);
code
=
tmq_conf_set
(
conf
,
"td.connect.pass"
,
"taosdata"
);
if
(
TMQ_CONF_OK
!=
code
)
return
NULL
;
if
(
TMQ_CONF_OK
!=
code
)
{
goto
_end
;
}
code
=
tmq_conf_set
(
conf
,
"auto.offset.reset"
,
"earliest"
);
code
=
tmq_conf_set
(
conf
,
"auto.offset.reset"
,
"earliest"
);
if
(
TMQ_CONF_OK
!=
code
)
return
NULL
;
if
(
TMQ_CONF_OK
!=
code
)
{
goto
_end
;
}
code
=
tmq_conf_set
(
conf
,
"experimental.snapshot.enable"
,
"false"
);
code
=
tmq_conf_set
(
conf
,
"experimental.snapshot.enable"
,
"false"
);
if
(
TMQ_CONF_OK
!=
code
)
return
NULL
;
if
(
TMQ_CONF_OK
!=
code
)
{
goto
_end
;
}
tmq_conf_set_auto_commit_cb
(
conf
,
tmq_commit_cb_print
,
NULL
);
tmq_conf_set_auto_commit_cb
(
conf
,
tmq_commit_cb_print
,
NULL
);
tmq
=
tmq_consumer_new
(
conf
,
NULL
,
0
);
tmq_t
*
tmq
=
tmq_consumer_new
(
conf
,
NULL
,
0
);
_end:
tmq_conf_destroy
(
conf
);
tmq_conf_destroy
(
conf
);
return
tmq
;
return
tmq
;
}
}
...
...
source/dnode/vnode/src/tsdb/tsdbFile.c
浏览文件 @
61a70012
...
@@ -148,7 +148,7 @@ bool tsdbDelFileIsSame(SDelFile *pDelFile1, SDelFile *pDelFile2) { return pDelFi
...
@@ -148,7 +148,7 @@ bool tsdbDelFileIsSame(SDelFile *pDelFile1, SDelFile *pDelFile2) { return pDelFi
int32_t
tsdbDFileRollback
(
STsdb
*
pTsdb
,
SDFileSet
*
pSet
,
EDataFileT
ftype
)
{
int32_t
tsdbDFileRollback
(
STsdb
*
pTsdb
,
SDFileSet
*
pSet
,
EDataFileT
ftype
)
{
int32_t
code
=
0
;
int32_t
code
=
0
;
int64_t
size
;
int64_t
size
=
0
;
int64_t
n
;
int64_t
n
;
TdFilePtr
pFD
;
TdFilePtr
pFD
;
char
fname
[
TSDB_FILENAME_LEN
];
char
fname
[
TSDB_FILENAME_LEN
];
...
@@ -167,7 +167,7 @@ int32_t tsdbDFileRollback(STsdb *pTsdb, SDFileSet *pSet, EDataFileT ftype) {
...
@@ -167,7 +167,7 @@ int32_t tsdbDFileRollback(STsdb *pTsdb, SDFileSet *pSet, EDataFileT ftype) {
tPutSmaFile
(
hdr
,
pSet
->
pSmaF
);
tPutSmaFile
(
hdr
,
pSet
->
pSmaF
);
break
;
break
;
default:
default:
ASSERT
(
0
);
goto
_err
;
// make the coverity scan happy
}
}
taosCalcChecksumAppend
(
0
,
hdr
,
TSDB_FHDR_SIZE
);
taosCalcChecksumAppend
(
0
,
hdr
,
TSDB_FHDR_SIZE
);
...
...
source/libs/executor/src/executil.c
浏览文件 @
61a70012
...
@@ -1148,7 +1148,6 @@ int32_t getGroupIdFromTagsVal(void* pMeta, uint64_t uid, SNodeList* pGroupNode,
...
@@ -1148,7 +1148,6 @@ int32_t getGroupIdFromTagsVal(void* pMeta, uint64_t uid, SNodeList* pGroupNode,
if
(
TSDB_CODE_SUCCESS
==
code
)
{
if
(
TSDB_CODE_SUCCESS
==
code
)
{
REPLACE_NODE
(
pNew
);
REPLACE_NODE
(
pNew
);
}
else
{
}
else
{
taosMemoryFree
(
keyBuf
);
nodesDestroyList
(
groupNew
);
nodesDestroyList
(
groupNew
);
metaReaderClear
(
&
mr
);
metaReaderClear
(
&
mr
);
return
code
;
return
code
;
...
@@ -1166,7 +1165,6 @@ int32_t getGroupIdFromTagsVal(void* pMeta, uint64_t uid, SNodeList* pGroupNode,
...
@@ -1166,7 +1165,6 @@ int32_t getGroupIdFromTagsVal(void* pMeta, uint64_t uid, SNodeList* pGroupNode,
if
(
pValue
->
node
.
resType
.
type
==
TSDB_DATA_TYPE_JSON
)
{
if
(
pValue
->
node
.
resType
.
type
==
TSDB_DATA_TYPE_JSON
)
{
if
(
tTagIsJson
(
data
))
{
if
(
tTagIsJson
(
data
))
{
terrno
=
TSDB_CODE_QRY_JSON_IN_GROUP_ERROR
;
terrno
=
TSDB_CODE_QRY_JSON_IN_GROUP_ERROR
;
taosMemoryFree
(
keyBuf
);
nodesDestroyList
(
groupNew
);
nodesDestroyList
(
groupNew
);
metaReaderClear
(
&
mr
);
metaReaderClear
(
&
mr
);
return
terrno
;
return
terrno
;
...
...
source/libs/executor/src/executor.c
浏览文件 @
61a70012
...
@@ -353,7 +353,6 @@ int32_t qUpdateQualifiedTableId(qTaskInfo_t tinfo, const SArray* tableIdList, bo
...
@@ -353,7 +353,6 @@ int32_t qUpdateQualifiedTableId(qTaskInfo_t tinfo, const SArray* tableIdList, bo
return
code
;
return
code
;
}
}
// todo refactor STableList
bool
assignUid
=
false
;
bool
assignUid
=
false
;
size_t
bufLen
=
(
pScanInfo
->
pGroupTags
!=
NULL
)
?
getTableTagsBufLen
(
pScanInfo
->
pGroupTags
)
:
0
;
size_t
bufLen
=
(
pScanInfo
->
pGroupTags
!=
NULL
)
?
getTableTagsBufLen
(
pScanInfo
->
pGroupTags
)
:
0
;
char
*
keyBuf
=
NULL
;
char
*
keyBuf
=
NULL
;
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
61a70012
...
@@ -3019,8 +3019,8 @@ int32_t tblCountScanGetInputs(SNodeList* groupTags, SName* tableName, STableCoun
...
@@ -3019,8 +3019,8 @@ int32_t tblCountScanGetInputs(SNodeList* groupTags, SName* tableName, STableCoun
}
}
}
}
}
else
{
}
else
{
strncpy
(
supp
->
dbNameFilter
,
tNameGetDbNameP
(
tableName
),
TSDB_DB_NAME_LEN
);
t
strncpy
(
supp
->
dbNameFilter
,
tNameGetDbNameP
(
tableName
),
TSDB_DB_NAME_LEN
);
strncpy
(
supp
->
stbNameFilter
,
tNameGetTableName
(
tableName
),
TSDB_TABLE_NAME_LEN
);
t
strncpy
(
supp
->
stbNameFilter
,
tNameGetTableName
(
tableName
),
TSDB_TABLE_NAME_LEN
);
}
}
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录