Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
7ebbe060
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看板
提交
7ebbe060
编写于
6月 26, 2023
作者:
wmmhello
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:coverity scan error
上级
e1559d4e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
27 addition
and
24 deletion
+27
-24
source/client/src/clientSml.c
source/client/src/clientSml.c
+3
-0
source/client/src/clientStmt.c
source/client/src/clientStmt.c
+0
-2
source/client/src/clientTmq.c
source/client/src/clientTmq.c
+24
-22
未找到文件。
source/client/src/clientSml.c
浏览文件 @
7ebbe060
...
@@ -749,6 +749,9 @@ static int32_t smlSendMetaMsg(SSmlHandle *info, SName *pName, SArray *pColumns,
...
@@ -749,6 +749,9 @@ static int32_t smlSendMetaMsg(SSmlHandle *info, SName *pName, SArray *pColumns,
pReq
.
suid
=
pTableMeta
->
uid
;
pReq
.
suid
=
pTableMeta
->
uid
;
pReq
.
source
=
TD_REQ_FROM_TAOX
;
pReq
.
source
=
TD_REQ_FROM_TAOX
;
pSql
=
(
action
==
SCHEMA_ACTION_ADD_COLUMN
)
?
"sml_add_column"
:
"sml_modify_column_size"
;
pSql
=
(
action
==
SCHEMA_ACTION_ADD_COLUMN
)
?
"sml_add_column"
:
"sml_modify_column_size"
;
}
else
{
uError
(
"SML:0x%"
PRIx64
" invalid action:%d"
,
info
->
id
,
action
);
goto
end
;
}
}
code
=
buildRequest
(
info
->
taos
->
id
,
pSql
,
strlen
(
pSql
),
NULL
,
false
,
&
pRequest
,
0
);
code
=
buildRequest
(
info
->
taos
->
id
,
pSql
,
strlen
(
pSql
),
NULL
,
false
,
&
pRequest
,
0
);
...
...
source/client/src/clientStmt.c
浏览文件 @
7ebbe060
...
@@ -939,8 +939,6 @@ int stmtClose(TAOS_STMT* stmt) {
...
@@ -939,8 +939,6 @@ int stmtClose(TAOS_STMT* stmt) {
stmtCleanSQLInfo
(
pStmt
);
stmtCleanSQLInfo
(
pStmt
);
taosMemoryFree
(
stmt
);
taosMemoryFree
(
stmt
);
STMT_DLOG_E
(
"stmt freed"
);
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
...
...
source/client/src/clientTmq.c
浏览文件 @
7ebbe060
...
@@ -651,7 +651,7 @@ static void asyncCommitOffset(tmq_t* tmq, const TAOS_RES* pRes, int32_t type, tm
...
@@ -651,7 +651,7 @@ static void asyncCommitOffset(tmq_t* tmq, const TAOS_RES* pRes, int32_t type, tm
int32_t
j
=
0
;
int32_t
j
=
0
;
int32_t
numOfVgroups
=
taosArrayGetSize
(
pTopic
->
vgs
);
int32_t
numOfVgroups
=
taosArrayGetSize
(
pTopic
->
vgs
);
for
(
j
=
0
;
j
<
numOfVgroups
;
j
++
)
{
for
(
j
=
0
;
j
<
numOfVgroups
;
j
++
)
{
SMqClientVg
*
pVg
=
taosArrayGet
(
pTopic
->
vgs
,
j
);
SMqClientVg
*
pVg
=
(
SMqClientVg
*
)
taosArrayGet
(
pTopic
->
vgs
,
j
);
if
(
pVg
->
vgId
==
vgId
)
{
if
(
pVg
->
vgId
==
vgId
)
{
break
;
break
;
}
}
...
@@ -665,7 +665,7 @@ static void asyncCommitOffset(tmq_t* tmq, const TAOS_RES* pRes, int32_t type, tm
...
@@ -665,7 +665,7 @@ static void asyncCommitOffset(tmq_t* tmq, const TAOS_RES* pRes, int32_t type, tm
return
;
return
;
}
}
SMqClientVg
*
pVg
=
taosArrayGet
(
pTopic
->
vgs
,
j
);
SMqClientVg
*
pVg
=
(
SMqClientVg
*
)
taosArrayGet
(
pTopic
->
vgs
,
j
);
if
(
pVg
->
offsetInfo
.
currentOffset
.
type
>
0
&&
!
tOffsetEqual
(
&
pVg
->
offsetInfo
.
currentOffset
,
&
pVg
->
offsetInfo
.
committedOffset
))
{
if
(
pVg
->
offsetInfo
.
currentOffset
.
type
>
0
&&
!
tOffsetEqual
(
&
pVg
->
offsetInfo
.
currentOffset
,
&
pVg
->
offsetInfo
.
committedOffset
))
{
code
=
doSendCommitMsg
(
tmq
,
pVg
,
pTopic
->
topicName
,
pParamSet
,
j
,
numOfVgroups
,
type
);
code
=
doSendCommitMsg
(
tmq
,
pVg
,
pTopic
->
topicName
,
pParamSet
,
j
,
numOfVgroups
,
type
);
...
@@ -741,13 +741,15 @@ static void asyncCommitAllOffsets(tmq_t* tmq, tmq_commit_cb* pCommitFp, void* us
...
@@ -741,13 +741,15 @@ static void asyncCommitAllOffsets(tmq_t* tmq, tmq_commit_cb* pCommitFp, void* us
static
void
generateTimedTask
(
int64_t
refId
,
int32_t
type
)
{
static
void
generateTimedTask
(
int64_t
refId
,
int32_t
type
)
{
tmq_t
*
tmq
=
taosAcquireRef
(
tmqMgmt
.
rsetId
,
refId
);
tmq_t
*
tmq
=
taosAcquireRef
(
tmqMgmt
.
rsetId
,
refId
);
if
(
tmq
!=
NULL
)
{
if
(
tmq
==
NULL
)
return
;
int8_t
*
pTaskType
=
taosAllocateQitem
(
sizeof
(
int8_t
),
DEF_QITEM
,
0
);
*
pTaskType
=
type
;
int8_t
*
pTaskType
=
taosAllocateQitem
(
sizeof
(
int8_t
),
DEF_QITEM
,
0
);
taosWriteQitem
(
tmq
->
delayedTask
,
pTaskType
);
if
(
pTaskType
==
NULL
)
return
;
tsem_post
(
&
tmq
->
rspSem
);
taosReleaseRef
(
tmqMgmt
.
rsetId
,
refId
);
*
pTaskType
=
type
;
}
taosWriteQitem
(
tmq
->
delayedTask
,
pTaskType
);
tsem_post
(
&
tmq
->
rspSem
);
taosReleaseRef
(
tmqMgmt
.
rsetId
,
refId
);
}
}
void
tmqAssignAskEpTask
(
void
*
param
,
void
*
tmrId
)
{
void
tmqAssignAskEpTask
(
void
*
param
,
void
*
tmrId
)
{
...
@@ -762,19 +764,19 @@ void tmqAssignDelayedCommitTask(void* param, void* tmrId) {
...
@@ -762,19 +764,19 @@ void tmqAssignDelayedCommitTask(void* param, void* tmrId) {
taosMemoryFree
(
param
);
taosMemoryFree
(
param
);
}
}
void
tmqAssignDelayedReportTask
(
void
*
param
,
void
*
tmrId
)
{
//
void tmqAssignDelayedReportTask(void* param, void* tmrId) {
int64_t
refId
=
*
(
int64_t
*
)
param
;
//
int64_t refId = *(int64_t*)param;
tmq_t
*
tmq
=
taosAcquireRef
(
tmqMgmt
.
rsetId
,
refId
);
//
tmq_t* tmq = taosAcquireRef(tmqMgmt.rsetId, refId);
if
(
tmq
!=
NULL
)
{
//
if (tmq != NULL) {
int8_t
*
pTaskType
=
taosAllocateQitem
(
sizeof
(
int8_t
),
DEF_QITEM
,
0
);
//
int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t), DEF_QITEM, 0);
*
pTaskType
=
TMQ_DELAYED_TASK__REPORT
;
//
*pTaskType = TMQ_DELAYED_TASK__REPORT;
taosWriteQitem
(
tmq
->
delayedTask
,
pTaskType
);
//
taosWriteQitem(tmq->delayedTask, pTaskType);
tsem_post
(
&
tmq
->
rspSem
);
//
tsem_post(&tmq->rspSem);
}
//
}
//
taosReleaseRef
(
tmqMgmt
.
rsetId
,
refId
);
//
taosReleaseRef(tmqMgmt.rsetId, refId);
taosMemoryFree
(
param
);
//
taosMemoryFree(param);
}
//
}
int32_t
tmqHbCb
(
void
*
param
,
SDataBuf
*
pMsg
,
int32_t
code
)
{
int32_t
tmqHbCb
(
void
*
param
,
SDataBuf
*
pMsg
,
int32_t
code
)
{
if
(
pMsg
)
{
if
(
pMsg
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录