Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c3959563
T
TDengine
项目概览
taosdata
/
TDengine
12 个月 前同步成功
通知
1180
Star
22014
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,发现更多精彩内容 >>
提交
c3959563
编写于
3月 30, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-14392] fix show bug.
上级
416952dd
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
28 addition
and
8 deletion
+28
-8
source/dnode/mnode/impl/src/mndShow.c
source/dnode/mnode/impl/src/mndShow.c
+3
-1
source/dnode/mnode/impl/src/mndStb.c
source/dnode/mnode/impl/src/mndStb.c
+0
-1
source/libs/executor/inc/executil.h
source/libs/executor/inc/executil.h
+2
-0
source/libs/executor/src/executil.c
source/libs/executor/src/executil.c
+10
-0
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+13
-6
未找到文件。
source/dnode/mnode/impl/src/mndShow.c
浏览文件 @
c3959563
...
...
@@ -310,6 +310,8 @@ static int32_t mndProcessRetrieveSysTableReq(SNodeMsg *pReq) {
mError
(
"failed to process show-retrieve req:%p since %s"
,
pShow
,
terrstr
());
return
-
1
;
}
pShow
->
numOfReads
=
0
;
}
ShowRetrieveFp
retrieveFp
=
pMgmt
->
retrieveFps
[
pShow
->
type
];
...
...
@@ -374,7 +376,7 @@ static int32_t mndProcessRetrieveSysTableReq(SNodeMsg *pReq) {
pReq
->
pRsp
=
pRsp
;
pReq
->
rspLen
=
size
;
if
(
rowsRead
==
0
||
rowsToRead
==
0
||
(
rowsRead
==
rowsToRead
&&
pShow
->
numOfRows
==
pShow
->
numOfReads
))
{
if
(
rowsRead
==
0
||
rowsToRead
==
0
||
(
rowsRead
<
rowsToRead
))
{
pRsp
->
completed
=
1
;
mDebug
(
"show:0x%"
PRIx64
", retrieve completed"
,
pShow
->
id
);
mndReleaseShowObj
((
SShowObj
*
)
pShow
,
true
);
...
...
source/dnode/mnode/impl/src/mndStb.c
浏览文件 @
c3959563
...
...
@@ -1608,7 +1608,6 @@ static int32_t mndRetrieveStb(SNodeMsg *pReq, SShowObj *pShow, char *data, int32
SStbObj
*
pStb
=
NULL
;
int32_t
cols
=
0
;
char
*
pWrite
;
char
prefix
[
TSDB_DB_FNAME_LEN
]
=
{
0
};
SDbObj
*
pDb
=
NULL
;
if
(
strlen
(
pShow
->
db
)
>
0
)
{
...
...
source/libs/executor/inc/executil.h
浏览文件 @
c3959563
...
...
@@ -156,6 +156,8 @@ SArray* interResFromBinary(const char* data, int32_t len);
void
freeInterResult
(
void
*
param
);
void
initGroupResInfo
(
SGroupResInfo
*
pGroupResInfo
,
SResultRowInfo
*
pResultInfo
);
void
initMultiResInfoFromArrayList
(
SGroupResInfo
*
pGroupResInfo
,
SArray
*
pArrayList
);
void
cleanupGroupResInfo
(
SGroupResInfo
*
pGroupResInfo
);
bool
hasRemainDataInCurrentGroup
(
SGroupResInfo
*
pGroupResInfo
);
bool
hasRemainData
(
SGroupResInfo
*
pGroupResInfo
);
...
...
source/libs/executor/src/executil.c
浏览文件 @
c3959563
...
...
@@ -222,6 +222,16 @@ void initGroupResInfo(SGroupResInfo* pGroupResInfo, SResultRowInfo* pResultInfo)
assert
(
pGroupResInfo
->
index
<=
getNumOfTotalRes
(
pGroupResInfo
));
}
void
initMultiResInfoFromArrayList
(
SGroupResInfo
*
pGroupResInfo
,
SArray
*
pArrayList
)
{
if
(
pGroupResInfo
->
pRows
!=
NULL
)
{
taosArrayDestroy
(
pGroupResInfo
->
pRows
);
}
pGroupResInfo
->
pRows
=
pArrayList
->
pData
;
pGroupResInfo
->
index
=
0
;
ASSERT
(
pGroupResInfo
->
index
<=
getNumOfTotalRes
(
pGroupResInfo
));
}
bool
hasRemainDataInCurrentGroup
(
SGroupResInfo
*
pGroupResInfo
)
{
if
(
pGroupResInfo
->
pRows
==
NULL
)
{
return
false
;
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
c3959563
...
...
@@ -5665,9 +5665,9 @@ static int32_t loadSysTableContentCb(void* param, const SDataBuf* pMsg, int32_t
SRetrieveMetaTableRsp
*
pRsp
=
pScanResInfo
->
pRsp
;
pRsp
->
numOfRows
=
htonl
(
pRsp
->
numOfRows
);
pRsp
->
useconds
=
htobe64
(
pRsp
->
useconds
);
pRsp
->
handle
=
htobe64
(
pRsp
->
handle
);
pRsp
->
compLen
=
htonl
(
pRsp
->
compLen
);
pRsp
->
useconds
=
htobe64
(
pRsp
->
useconds
);
pRsp
->
handle
=
htobe64
(
pRsp
->
handle
);
pRsp
->
compLen
=
htonl
(
pRsp
->
compLen
);
}
else
{
operator
->
pTaskInfo
->
code
=
code
;
}
...
...
@@ -5824,6 +5824,10 @@ static SSDataBlock* doSysTableScan(SOperatorInfo* pOperator, bool* newgroup) {
// pInfo->totalBytes;
return
(
pInfo
->
pRes
->
info
.
rows
==
0
)
?
NULL
:
pInfo
->
pRes
;
}
else
{
// load the meta from mnode of the given epset
if
(
pOperator
->
status
==
OP_EXEC_DONE
)
{
return
NULL
;
}
int64_t
startTs
=
taosGetTimestampUs
();
pInfo
->
req
.
type
=
pInfo
->
type
;
...
...
@@ -5863,6 +5867,10 @@ static SSDataBlock* doSysTableScan(SOperatorInfo* pOperator, bool* newgroup) {
SRetrieveMetaTableRsp
*
pRsp
=
pInfo
->
pRsp
;
pInfo
->
req
.
showId
=
pRsp
->
handle
;
if
(
pRsp
->
numOfRows
==
0
||
pRsp
->
completed
)
{
pOperator
->
status
=
OP_EXEC_DONE
;
}
if
(
pRsp
->
numOfRows
==
0
)
{
// qDebug("%s vgId:%d, taskID:0x%"PRIx64" %d of total completed, rowsOfSource:%"PRIu64", totalRows:%"PRIu64"
// try next",
...
...
@@ -6993,6 +7001,7 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo *pOperator, bool* newgroup
finalizeUpdatedResult
(
pInfo
->
binfo
.
pCtx
,
pOperator
->
numOfOutput
,
pInfo
->
aggSup
.
pResultBuf
,
pUpdated
,
pInfo
->
binfo
.
rowCellInfoOffset
);
initMultiResInfoFromArrayList
(
&
pInfo
->
groupResInfo
,
pUpdated
);
blockDataEnsureCapacity
(
pInfo
->
binfo
.
pRes
,
pInfo
->
binfo
.
capacity
);
toSDatablock
(
&
pInfo
->
groupResInfo
,
pInfo
->
aggSup
.
pResultBuf
,
pInfo
->
binfo
.
pRes
,
pInfo
->
binfo
.
capacity
,
pInfo
->
binfo
.
rowCellInfoOffset
);
...
...
@@ -8793,9 +8802,7 @@ SOperatorInfo* createOperatorTree(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo
SSDataBlock
*
pResBlock
=
createOutputBuf_rv1
(
pScanPhyNode
->
node
.
pOutputDataBlockDesc
);
SArray
*
colList
=
extractScanColumnId
(
pScanPhyNode
->
pScanCols
);
SOperatorInfo
*
pOperator
=
createStreamScanOperatorInfo
(
pHandle
->
reader
,
pResBlock
,
colList
,
tableIdList
,
pTaskInfo
);
SOperatorInfo
*
pOperator
=
createStreamScanOperatorInfo
(
pHandle
->
reader
,
pResBlock
,
colList
,
tableIdList
,
pTaskInfo
);
taosArrayDestroy
(
tableIdList
);
return
pOperator
;
}
else
if
(
QUERY_NODE_PHYSICAL_PLAN_SYSTABLE_SCAN
==
nodeType
(
pPhyNode
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录