Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d1c51a41
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看板
未验证
提交
d1c51a41
编写于
7月 07, 2023
作者:
D
dapan1121
提交者:
GitHub
7月 07, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #21992 from taosdata/fix/TD-24959
fix: fix coverity scan issues
上级
0865b1a8
a99fac03
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
13 addition
and
15 deletion
+13
-15
source/client/src/clientHb.c
source/client/src/clientHb.c
+1
-5
source/client/src/clientRawBlockWrite.c
source/client/src/clientRawBlockWrite.c
+4
-0
source/libs/catalog/src/catalog.c
source/libs/catalog/src/catalog.c
+1
-4
source/libs/catalog/src/ctgCache.c
source/libs/catalog/src/ctgCache.c
+1
-3
source/libs/catalog/src/ctgUtil.c
source/libs/catalog/src/ctgUtil.c
+0
-1
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+4
-1
source/libs/scheduler/src/schJob.c
source/libs/scheduler/src/schJob.c
+1
-0
source/libs/scheduler/src/schRemote.c
source/libs/scheduler/src/schRemote.c
+1
-0
source/libs/scheduler/src/schTask.c
source/libs/scheduler/src/schTask.c
+0
-1
未找到文件。
source/client/src/clientHb.c
浏览文件 @
d1c51a41
...
...
@@ -137,7 +137,6 @@ static int32_t hbGenerateVgInfoFromRsp(SDBVgInfo **pInfo, SUseDbRsp *rsp) {
vgInfo
->
hashSuffix
=
rsp
->
hashSuffix
;
vgInfo
->
vgHash
=
taosHashInit
(
rsp
->
vgNum
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_INT
),
true
,
HASH_ENTRY_LOCK
);
if
(
NULL
==
vgInfo
->
vgHash
)
{
taosMemoryFree
(
vgInfo
);
tscError
(
"hash init[%d] failed"
,
rsp
->
vgNum
);
code
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
_return
;
...
...
@@ -147,8 +146,6 @@ static int32_t hbGenerateVgInfoFromRsp(SDBVgInfo **pInfo, SUseDbRsp *rsp) {
SVgroupInfo
*
pInfo
=
taosArrayGet
(
rsp
->
pVgroupInfos
,
j
);
if
(
taosHashPut
(
vgInfo
->
vgHash
,
&
pInfo
->
vgId
,
sizeof
(
int32_t
),
pInfo
,
sizeof
(
SVgroupInfo
))
!=
0
)
{
tscError
(
"hash push failed, errno:%d"
,
errno
);
taosHashCleanup
(
vgInfo
->
vgHash
);
taosMemoryFree
(
vgInfo
);
code
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
_return
;
}
...
...
@@ -486,7 +483,6 @@ int32_t hbBuildQueryDesc(SQueryHbReqBasic *hbBasic, STscObj *pObj) {
if
(
code
)
{
taosArrayDestroy
(
desc
.
subDesc
);
desc
.
subDesc
=
NULL
;
desc
.
subPlanNum
=
0
;
}
desc
.
subPlanNum
=
taosArrayGetSize
(
desc
.
subDesc
);
}
else
{
...
...
@@ -592,7 +588,7 @@ static int32_t hbGetUserAuthInfo(SClientHbKey *connKey, SHbParam *param, SClient
code
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
_return
;
}
strncpy
(
user
->
user
,
pTscObj
->
user
,
TSDB_USER_LEN
);
t
strncpy
(
user
->
user
,
pTscObj
->
user
,
TSDB_USER_LEN
);
user
->
version
=
htonl
(
-
1
);
// force get userAuthInfo
kv
.
valueLen
=
sizeof
(
SUserAuthVersion
);
kv
.
value
=
user
;
...
...
source/client/src/clientRawBlockWrite.c
浏览文件 @
d1c51a41
...
...
@@ -1286,6 +1286,10 @@ static int32_t taosAlterTable(TAOS* taos, void* meta, int32_t metaLen) {
taosArrayPush
(
pArray
,
&
pVgData
);
pQuery
=
(
SQuery
*
)
nodesMakeNode
(
QUERY_NODE_QUERY
);
if
(
NULL
==
pQuery
)
{
code
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
end
;
}
pQuery
->
execMode
=
QUERY_EXEC_MODE_SCHEDULE
;
pQuery
->
msgType
=
TDMT_VND_ALTER_TABLE
;
pQuery
->
stableQuery
=
false
;
...
...
source/libs/catalog/src/catalog.c
浏览文件 @
d1c51a41
...
...
@@ -341,13 +341,10 @@ int32_t ctgChkAuth(SCatalog* pCtg, SRequestConnInfo* pConn, SUserAuthInfo *pReq,
SCtgAuthReq
req
=
{
0
};
req
.
pRawReq
=
pReq
;
req
.
pConn
=
pConn
;
req
.
onlyCache
=
exists
?
true
:
false
;
req
.
onlyCache
=
false
;
CTG_ERR_RET
(
ctgGetUserDbAuthFromMnode
(
pCtg
,
pConn
,
pReq
->
user
,
&
req
.
authInfo
,
NULL
));
CTG_ERR_JRET
(
ctgChkSetAuthRes
(
pCtg
,
&
req
,
&
rsp
));
if
(
rsp
.
metaNotExists
&&
exists
)
{
*
exists
=
false
;
}
_return:
...
...
source/libs/catalog/src/ctgCache.c
浏览文件 @
d1c51a41
...
...
@@ -1721,9 +1721,7 @@ int32_t ctgWriteTbMetaToCache(SCatalog *pCtg, SCtgDBCache *dbCache, char *dbFNam
ctgDebug
(
"stb 0x%"
PRIx64
" updated to cache, dbFName:%s, tbName:%s, tbType:%d"
,
meta
->
suid
,
dbFName
,
tbName
,
meta
->
tableType
);
if
(
pCache
)
{
CTG_ERR_RET
(
ctgUpdateRentStbVersion
(
pCtg
,
dbFName
,
tbName
,
dbId
,
meta
->
suid
,
pCache
));
}
CTG_ERR_RET
(
ctgUpdateRentStbVersion
(
pCtg
,
dbFName
,
tbName
,
dbId
,
meta
->
suid
,
pCache
));
return
TSDB_CODE_SUCCESS
;
}
...
...
source/libs/catalog/src/ctgUtil.c
浏览文件 @
d1c51a41
...
...
@@ -926,7 +926,6 @@ int32_t ctgGenerateVgList(SCatalog* pCtg, SHashObj* vgHash, SArray** pList) {
}
pIter
=
taosHashIterate
(
vgHash
,
pIter
);
vgInfo
=
NULL
;
}
*
pList
=
vgList
;
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
d1c51a41
...
...
@@ -6044,6 +6044,9 @@ static int32_t checkCollectTopicTags(STranslateContext* pCxt, SCreateTopicStmt*
// for (int32_t i = 0; i < pMeta->tableInfo.numOfColumns; ++i) {
SSchema
*
column
=
&
pMeta
->
schema
[
0
];
SColumnNode
*
col
=
(
SColumnNode
*
)
nodesMakeNode
(
QUERY_NODE_COLUMN
);
if
(
NULL
==
col
)
{
return
TSDB_CODE_OUT_OF_MEMORY
;
}
strcpy
(
col
->
colName
,
column
->
name
);
strcpy
(
col
->
node
.
aliasName
,
col
->
colName
);
strcpy
(
col
->
node
.
userAlias
,
col
->
colName
);
...
...
@@ -6154,7 +6157,7 @@ static int32_t translateAlterLocal(STranslateContext* pCxt, SAlterLocalStmt* pSt
char
*
p
=
strchr
(
pStmt
->
config
,
' '
);
if
(
NULL
!=
p
)
{
*
p
=
0
;
strcpy
(
pStmt
->
value
,
p
+
1
);
tstrncpy
(
pStmt
->
value
,
p
+
1
,
sizeof
(
pStmt
->
value
)
);
}
return
TSDB_CODE_SUCCESS
;
}
...
...
source/libs/scheduler/src/schJob.c
浏览文件 @
d1c51a41
...
...
@@ -135,6 +135,7 @@ int32_t schUpdateJobStatus(SSchJob *pJob, int8_t newStatus) {
break
;
case
JOB_TASK_STATUS_DROP
:
SCH_ERR_JRET
(
TSDB_CODE_QRY_JOB_FREED
);
break
;
default:
SCH_JOB_ELOG
(
"invalid job status:%s"
,
jobTaskStatusStr
(
oriStatus
));
...
...
source/libs/scheduler/src/schRemote.c
浏览文件 @
d1c51a41
...
...
@@ -392,6 +392,7 @@ int32_t schProcessResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SD
// NEVER REACH HERE
SCH_TASK_ELOG
(
"invalid status to handle drop task rsp, refId:0x%"
PRIx64
,
pJob
->
refId
);
SCH_ERR_JRET
(
TSDB_CODE_SCH_INTERNAL_ERROR
);
break
;
}
case
TDMT_SCH_LINK_BROKEN
:
SCH_TASK_ELOG
(
"link broken received, error:%x - %s"
,
rspCode
,
tstrerror
(
rspCode
));
...
...
source/libs/scheduler/src/schTask.c
浏览文件 @
d1c51a41
...
...
@@ -961,7 +961,6 @@ int32_t schHandleExplainRes(SArray *pExplainRes) {
localRsp
->
rsp
.
numOfPlans
=
0
;
localRsp
->
rsp
.
subplanInfo
=
NULL
;
pTask
=
NULL
;
pJob
=
NULL
;
}
_return:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录