提交 05d69e77 编写于 作者: G Ganlin Zhao

[TD-5623]<feature>: removed compressed from SSqlRes

上级 5e631fc8
......@@ -303,7 +303,6 @@ typedef struct {
int16_t numOfCols;
int16_t precision;
bool completed;
bool compressed;
int32_t code;
int32_t numOfGroups;
SResRec * pGroupRec;
......
......@@ -2702,6 +2702,7 @@ static void decompressQueryColData(SSqlRes *pRes, SQueryInfo* pQueryInfo, char *
decompLen +=flen;
pData += htonl(compSizes[i]);
}
/* Resize rsp as decompressed data will occupy more space */
pRes->rspLen = pRes->rspLen - (compLen + numOfCols * sizeof(int32_t)) + decompLen;
char *new_rsp = (char *)realloc(pRes->pRsp, pRes->rspLen);
......@@ -2738,7 +2739,6 @@ int tscProcessRetrieveRspFromNode(SSqlObj *pSql) {
pRes->offset = htobe64(pRetrieve->offset);
pRes->useconds = htobe64(pRetrieve->useconds);
pRes->completed = (pRetrieve->completed == 1);
pRes->compressed = (pRetrieve->compressed == 1);
pRes->data = pRetrieve->data;
SQueryInfo* pQueryInfo = tscGetQueryInfo(pCmd);
......@@ -2747,9 +2747,9 @@ int tscProcessRetrieveRspFromNode(SSqlObj *pSql) {
}
//Decompress col data if compressed from server
if (pRes->compressed) {
if (pRetrieve->compressed) {
int32_t compLen = htonl(pRetrieve->compLen);
decompressQueryColData(pRes, pQueryInfo, &pRes->data, pRes->compressed, compLen);
decompressQueryColData(pRes, pQueryInfo, &pRes->data, pRetrieve->compressed, compLen);
}
STableMetaInfo *pTableMetaInfo = tscGetMetaInfo(pQueryInfo, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册