Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a05a0806
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a05a0806
编写于
6月 20, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-674] defect found in coverity scan
上级
855036fc
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
25 addition
and
8 deletion
+25
-8
src/client/inc/tsclient.h
src/client/inc/tsclient.h
+1
-0
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+5
-0
src/mnode/src/mnodeShow.c
src/mnode/src/mnodeShow.c
+7
-5
src/plugins/http/src/httpSql.c
src/plugins/http/src/httpSql.c
+4
-0
src/plugins/http/src/tgHandle.c
src/plugins/http/src/tgHandle.c
+7
-1
tests/script/general/parser/limit2.sim
tests/script/general/parser/limit2.sim
+0
-2
tests/tsim/src/simExe.c
tests/tsim/src/simExe.c
+1
-0
未找到文件。
src/client/inc/tsclient.h
浏览文件 @
a05a0806
...
...
@@ -405,6 +405,7 @@ void tscKillSTableQuery(SSqlObj *pSql);
void
tscInitResObjForLocalQuery
(
SSqlObj
*
pObj
,
int32_t
numOfRes
,
int32_t
rowLen
);
bool
tscIsUpdateQuery
(
SSqlObj
*
pSql
);
bool
tscHasReachLimitation
(
SQueryInfo
*
pQueryInfo
,
SSqlRes
*
pRes
);
bool
tscResultsetFetchCompleted
(
TAOS_RES
*
result
);
char
*
tscGetErrorMsgPayload
(
SSqlCmd
*
pCmd
);
...
...
src/client/src/tscUtil.c
浏览文件 @
a05a0806
...
...
@@ -1942,6 +1942,11 @@ bool tscHasReachLimitation(SQueryInfo* pQueryInfo, SSqlRes* pRes) {
return
(
pQueryInfo
->
clauseLimit
>
0
&&
pRes
->
numOfClauseTotal
>=
pQueryInfo
->
clauseLimit
);
}
bool
tscResultsetFetchCompleted
(
TAOS_RES
*
result
)
{
SSqlRes
*
pRes
=
result
;
return
pRes
->
completed
;
}
char
*
tscGetErrorMsgPayload
(
SSqlCmd
*
pCmd
)
{
return
pCmd
->
payload
;
}
/**
...
...
src/mnode/src/mnodeShow.c
浏览文件 @
a05a0806
...
...
@@ -65,7 +65,7 @@ int32_t mnodeInitShow() {
mnodeAddReadMsgHandle
(
TSDB_MSG_TYPE_CM_CONNECT
,
mnodeProcessConnectMsg
);
mnodeAddReadMsgHandle
(
TSDB_MSG_TYPE_CM_USE_DB
,
mnodeProcessUseMsg
);
tsMnodeShowCache
=
taosCacheInitWithCb
(
10
,
mnodeFreeShowObj
);
tsMnodeShowCache
=
taosCacheInitWithCb
(
5
,
mnodeFreeShowObj
);
return
0
;
}
...
...
@@ -139,7 +139,7 @@ static int32_t mnodeProcessShowMsg(SMnodeMsg *pMsg) {
pShowRsp
->
qhandle
=
htobe64
((
uint64_t
)
pShow
);
int32_t
code
=
(
*
tsMnodeShowMetaFp
[
pShowMsg
->
type
])(
&
pShowRsp
->
tableMeta
,
pShow
,
pMsg
->
rpcMsg
.
handle
);
mTrace
(
"%p, show type:%s index:%d, get meta finished,
r
ows:%d cols:%d result:%s"
,
pShow
,
mTrace
(
"%p, show type:%s index:%d, get meta finished,
numOfR
ows:%d cols:%d result:%s"
,
pShow
,
mnodeGetShowType
(
pShowMsg
->
type
),
pShow
->
index
,
pShow
->
numOfRows
,
pShow
->
numOfColumns
,
tstrerror
(
code
));
if
(
code
==
TSDB_CODE_SUCCESS
)
{
...
...
@@ -219,8 +219,10 @@ static int32_t mnodeProcessRetrieveMsg(SMnodeMsg *pMsg) {
if
(
rowsToRead
==
0
||
(
rowsRead
==
rowsToRead
&&
pShow
->
numOfRows
==
pShow
->
numOfReads
))
{
pRsp
->
completed
=
1
;
mTrace
(
"%p, retrieve completed"
,
pShow
);
mnodeReleaseShowObj
(
pShow
,
true
);
}
else
{
mTrace
(
"%p, retrieve not completed yet"
,
pShow
);
mnodeReleaseShowObj
(
pShow
,
false
);
}
...
...
@@ -379,10 +381,10 @@ static void *mnodePutShowObj(SShowObj *pShow, int32_t size) {
pShow
->
index
=
atomic_add_fetch_32
(
&
tsShowObjIndex
,
1
);
sprintf
(
key
,
"%d"
,
pShow
->
index
);
SShowObj
*
newQhandle
=
taosCachePut
(
tsMnodeShowCache
,
key
,
pShow
,
size
,
6
0
);
SShowObj
*
newQhandle
=
taosCachePut
(
tsMnodeShowCache
,
key
,
pShow
,
size
,
6
);
free
(
pShow
);
mTrace
(
"%p, show is put into cache
"
,
newQhandle
);
mTrace
(
"%p, show is put into cache
, index:%s"
,
newQhandle
,
key
);
return
newQhandle
;
}
...
...
src/plugins/http/src/httpSql.c
浏览文件 @
a05a0806
...
...
@@ -205,6 +205,10 @@ void httpProcessSingleSqlRetrieveCallBack(void *param, TAOS_RES *result, int num
}
}
if
(
tscResultsetFetchCompleted
(
result
))
{
isContinue
=
false
;
}
if
(
isContinue
)
{
// retrieve next batch of rows
httpTrace
(
"context:%p, fd:%d, ip:%s, user:%s, continue retrieve, numOfRows:%d"
,
pContext
,
pContext
->
fd
,
...
...
src/plugins/http/src/tgHandle.c
浏览文件 @
a05a0806
...
...
@@ -269,14 +269,20 @@ int tgReadSchema(char *fileName) {
httpPrint
(
"open telegraf schema file:%s success"
,
fileName
);
fseek
(
fp
,
0
,
SEEK_END
);
int32_t
contentSize
=
(
int32_t
)
ftell
(
fp
);
if
(
contentSize
<=
0
)
{
fclose
(
fp
);
return
0
;
}
rewind
(
fp
);
char
*
content
=
(
char
*
)
calloc
(
contentSize
+
1
,
1
);
int32_t
result
=
fread
(
content
,
1
,
contentSize
,
fp
);
if
(
result
!=
contentSize
)
{
httpError
(
"failed to read telegraf schema file:%s"
,
fileName
);
fclose
(
fp
);
free
(
content
);
return
-
1
;
return
0
;
}
content
[
contentSize
]
=
0
;
...
...
tests/script/general/parser/limit2.sim
浏览文件 @
a05a0806
...
...
@@ -69,8 +69,6 @@ print ====== tables created
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
return
sleep 5000
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
...
...
tests/tsim/src/simExe.c
浏览文件 @
a05a0806
...
...
@@ -652,6 +652,7 @@ bool simExecuteNativeSqlCommand(SScript *script, char *rest, bool isSlow) {
if
(
line
->
errorJump
==
SQL_JUMP_TRUE
)
{
script
->
linePos
=
line
->
jump
;
taos_free_result
(
pSql
);
return
true
;
}
taosMsleep
(
1000
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录