Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
69eec11b
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看板
提交
69eec11b
编写于
1月 07, 2022
作者:
S
shenglian zhou
提交者:
shenglian zhou
1月 11, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
(query,insert,other):tlv start point
上级
97cd5890
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
22 deletion
+13
-22
src/client/src/tscServer.c
src/client/src/tscServer.c
+10
-19
src/query/src/queryMain.c
src/query/src/queryMain.c
+3
-3
未找到文件。
src/client/src/tscServer.c
浏览文件 @
69eec11b
...
...
@@ -2782,17 +2782,14 @@ int tscProcessRetrieveRspFromNode(SSqlObj *pSql) {
tscSetResRawPtr
(
pRes
,
pQueryInfo
,
pRes
->
dataConverted
);
}
int32_t
subDataLen
=
0
;
if
(
pSql
->
pSubscription
!=
NULL
)
{
int32_t
numOfCols
=
pQueryInfo
->
fieldsInfo
.
numOfOutput
;
TAOS_FIELD
*
pField
=
tscFieldInfoGetField
(
&
pQueryInfo
->
fieldsInfo
,
numOfCols
-
1
);
int16_t
offset
=
tscFieldInfoGetOffset
(
pQueryInfo
,
numOfCols
-
1
);
char
*
p
=
pRes
->
data
+
(
pField
->
bytes
+
offset
)
*
pRes
->
numOfRows
;
int32_t
numOfCols
=
pQueryInfo
->
fieldsInfo
.
numOfOutput
;
TAOS_FIELD
*
pField
=
tscFieldInfoGetField
(
&
pQueryInfo
->
fieldsInfo
,
numOfCols
-
1
);
int16_t
offset
=
tscFieldInfoGetOffset
(
pQueryInfo
,
numOfCols
-
1
);
char
*
p
=
pRes
->
data
+
(
pField
->
bytes
+
offset
)
*
pRes
->
numOfRows
;
int32_t
numOfTables
=
htonl
(
*
(
int32_t
*
)
p
);
p
+=
sizeof
(
int32_t
);
int32_t
numOfTables
=
htonl
(
*
(
int32_t
*
)
p
);
p
+=
sizeof
(
int32_t
);
if
(
pSql
->
pSubscription
!=
NULL
)
{
for
(
int
i
=
0
;
i
<
numOfTables
;
i
++
)
{
int64_t
uid
=
htobe64
(
*
(
int64_t
*
)
p
);
p
+=
sizeof
(
int64_t
);
...
...
@@ -2801,22 +2798,16 @@ int tscProcessRetrieveRspFromNode(SSqlObj *pSql) {
p
+=
sizeof
(
TSKEY
);
tscUpdateSubscriptionProgress
(
pSql
->
pSubscription
,
uid
,
key
);
}
subDataLen
=
sizeof
(
int32_t
)
+
numOfTables
*
sizeof
(
STableIdInfo
);
}
else
{
p
+=
numOfTables
*
sizeof
(
STableIdInfo
);
}
pRes
->
row
=
0
;
tscDebug
(
"0x%"
PRIx64
" numOfRows:%d, offset:%"
PRId64
", complete:%d, qId:0x%"
PRIx64
,
pSql
->
self
,
pRes
->
numOfRows
,
pRes
->
offset
,
pRes
->
completed
,
pRes
->
qId
);
int32_t
numOfCols
=
pQueryInfo
->
fieldsInfo
.
numOfOutput
;
TAOS_FIELD
*
pField
=
tscFieldInfoGetField
(
&
pQueryInfo
->
fieldsInfo
,
numOfCols
-
1
);
int16_t
offset
=
tscFieldInfoGetOffset
(
pQueryInfo
,
numOfCols
-
1
);
int32_t
rowBytes
=
offset
+
pField
->
bytes
;
int32_t
origSize
=
rowBytes
*
pRes
->
numOfRows
+
subDataLen
;
int32_t
compSize
=
htonl
(
pRetrieve
->
compLen
)
+
numOfCols
*
sizeof
(
int32_t
)
+
subDataLen
;
int32_t
dataLen
=
(
pRetrieve
->
compressed
)
?
compSize
:
origSize
;
if
(
pRetrieve
->
extend
==
1
)
{
STLV
*
tlv
=
(
STLV
*
)(
p
Retrieve
->
data
+
dataLen
);
STLV
*
tlv
=
(
STLV
*
)(
p
);
while
(
tlv
->
type
!=
TLV_TYPE_END_MARK
)
{
switch
(
ntohs
(
tlv
->
type
))
{
case
TLV_TYPE_META_VERSION
:
...
...
src/query/src/queryMain.c
浏览文件 @
69eec11b
...
...
@@ -391,6 +391,7 @@ int32_t qDumpRetrieveResult(qinfo_t qinfo, SRetrieveTableRsp **pRsp, int32_t *co
size
+=
sizeof
(
STableIdInfo
)
*
taosHashGetSize
(
pRuntimeEnv
->
pTableRetrieveTsMap
);
*
contLen
=
(
int32_t
)(
size
+
sizeof
(
SRetrieveTableRsp
));
int32_t
contLenBeforeTLV
=
*
contLen
;
*
contLen
+=
(
sizeof
(
STLV
)
+
sizeof
(
int32_t
)
+
sizeof
(
int32_t
));
//tlv meta version
*
contLen
+=
sizeof
(
STLV
);
// tlv end mark
// current solution only avoid crash, but cannot return error code to client
...
...
@@ -424,10 +425,9 @@ int32_t qDumpRetrieveResult(qinfo_t qinfo, SRetrieveTableRsp **pRsp, int32_t *co
int32_t
numOfCols
=
pQueryAttr
->
pExpr2
?
pQueryAttr
->
numOfExpr2
:
pQueryAttr
->
numOfOutput
;
int32_t
origSize
=
pQueryAttr
->
resultRowSize
*
s
;
int32_t
compSize
=
compLen
+
numOfCols
*
sizeof
(
int32_t
);
int32_t
dataLen
=
origSize
;
if
((
*
pRsp
)
->
compressed
&&
compLen
!=
0
)
{
dataLen
=
compSize
;
*
contLen
=
*
contLen
-
origSize
+
compSize
;
contLenBeforeTLV
=
contLenBeforeTLV
-
origSize
+
compSize
;
*
pRsp
=
(
SRetrieveTableRsp
*
)
rpcReallocCont
(
*
pRsp
,
*
contLen
);
qDebug
(
"QInfo:0x%"
PRIx64
" compress col data, uncompressed size:%d, compressed size:%d, ratio:%.2f"
,
pQInfo
->
qId
,
origSize
,
compSize
,
(
float
)
origSize
/
(
float
)
compSize
);
...
...
@@ -448,7 +448,7 @@ int32_t qDumpRetrieveResult(qinfo_t qinfo, SRetrieveTableRsp **pRsp, int32_t *co
}
(
*
pRsp
)
->
extend
=
1
;
STLV
*
tlv
=
(
STLV
*
)((
*
pRsp
)
->
data
+
dataLen
);
STLV
*
tlv
=
(
STLV
*
)((
char
*
)(
*
pRsp
)
+
contLenBeforeTLV
);
tlv
->
type
=
htons
(
TLV_TYPE_META_VERSION
);
tlv
->
len
=
htonl
(
sizeof
(
int32_t
)
+
sizeof
(
int32_t
));
int32_t
sVersion
=
htonl
(
pQueryAttr
->
tableGroupInfo
.
sVersion
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录