diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 07c6e12606c89f93bc7ccdacc4de76d34edbc861..828225b18083f024ed97d3bd7932f411a5e11813 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -4216,9 +4216,10 @@ static void doCopyQueryResultToMsg(SQInfo *pQInfo, int32_t numOfRows, char *data for (int32_t col = 0; col < numOfCols; ++col) { SColumnInfoData* pColRes = taosArrayGet(pRes->pDataBlock, col); if (compressed) { - compSizes[col] = htonl(compressQueryColData(pColRes, pRes->info.rows, data, compressed)); + compSizes[col] = compressQueryColData(pColRes, pRes->info.rows, data, compressed); data += compSizes[col]; *compLen += compSizes[col]; + compSizes[col] = htonl(compSizes[col]); } else { memmove(data, pColRes->pData, pColRes->info.bytes * pRes->info.rows); data += pColRes->info.bytes * pRes->info.rows; @@ -4231,6 +4232,7 @@ static void doCopyQueryResultToMsg(SQInfo *pQInfo, int32_t numOfRows, char *data compSizes[col] = htonl(compressQueryColData(pColRes, numOfRows, data, compressed)); data += compSizes[col]; *compLen += compSizes[col]; + compSizes[col] = htonl(compSizes[col]); } else { memmove(data, pColRes->pData, pColRes->info.bytes * numOfRows); data += pColRes->info.bytes * numOfRows;