提交 c8df2af1 编写于 作者: G Ganlin Zhao

[TD-5623]<feature>: fix endian issue

上级 90311bb4
...@@ -2694,7 +2694,7 @@ static void decompressQueryColData(SSqlRes *pRes, SQueryInfo* pQueryInfo, char * ...@@ -2694,7 +2694,7 @@ static void decompressQueryColData(SSqlRes *pRes, SQueryInfo* pQueryInfo, char *
for(int32_t i = 0; i < numOfCols; ++i) { for(int32_t i = 0; i < numOfCols; ++i) {
SInternalField* pInfo = (SInternalField*)TARRAY_GET_ELEM(pQueryInfo->fieldsInfo.internalField, i); SInternalField* pInfo = (SInternalField*)TARRAY_GET_ELEM(pQueryInfo->fieldsInfo.internalField, i);
bufOffset = pInfo->field.bytes * pRes->numOfRows; bufOffset = pInfo->field.bytes * pRes->numOfRows;
int32_t flen = (*(tDataTypes[pInfo->field.type].decompFunc))(pData, compSizes[i], pRes->numOfRows, p, bufOffset, int32_t flen = (*(tDataTypes[pInfo->field.type].decompFunc))(pData, htonl(compSizes[i]), pRes->numOfRows, p, bufOffset,
compressed, NULL, 0); compressed, NULL, 0);
p += flen; p += flen;
decompLen +=flen; decompLen +=flen;
......
...@@ -4216,7 +4216,7 @@ static void doCopyQueryResultToMsg(SQInfo *pQInfo, int32_t numOfRows, char *data ...@@ -4216,7 +4216,7 @@ static void doCopyQueryResultToMsg(SQInfo *pQInfo, int32_t numOfRows, char *data
for (int32_t col = 0; col < numOfCols; ++col) { for (int32_t col = 0; col < numOfCols; ++col) {
SColumnInfoData* pColRes = taosArrayGet(pRes->pDataBlock, col); SColumnInfoData* pColRes = taosArrayGet(pRes->pDataBlock, col);
if (compressed) { if (compressed) {
compSizes[col] = compressQueryColData(pColRes, pRes->info.rows, data, compressed); compSizes[col] = htonl(compressQueryColData(pColRes, pRes->info.rows, data, compressed));
data += compSizes[col]; data += compSizes[col];
*compLen += compSizes[col]; *compLen += compSizes[col];
} else { } else {
...@@ -4228,7 +4228,7 @@ static void doCopyQueryResultToMsg(SQInfo *pQInfo, int32_t numOfRows, char *data ...@@ -4228,7 +4228,7 @@ static void doCopyQueryResultToMsg(SQInfo *pQInfo, int32_t numOfRows, char *data
for (int32_t col = 0; col < numOfCols; ++col) { for (int32_t col = 0; col < numOfCols; ++col) {
SColumnInfoData* pColRes = taosArrayGet(pRes->pDataBlock, col); SColumnInfoData* pColRes = taosArrayGet(pRes->pDataBlock, col);
if (compressed) { if (compressed) {
compSizes[col] = compressQueryColData(pColRes, numOfRows, data, compressed); compSizes[col] = htonl(compressQueryColData(pColRes, numOfRows, data, compressed));
data += compSizes[col]; data += compSizes[col];
*compLen += compSizes[col]; *compLen += compSizes[col];
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册