[TD-5623]<feature>: fix endian issue
This commit is contained in:
parent
90311bb494
commit
c8df2af190
|
@ -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
|
||||||
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
|
||||||
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 {
|
||||||
|
|
Loading…
Reference in New Issue