Merge pull request #4711 from taosdata/hotfix/TD-2553
TD-2553 fix group by column endian issue
This commit is contained in:
commit
42e257c747
|
@ -890,13 +890,13 @@ int tscBuildQueryMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
|
|||
for (int32_t j = 0; j < pGroupbyExpr->numOfGroupCols; ++j) {
|
||||
SColIndex* pCol = taosArrayGet(pGroupbyExpr->columnInfo, j);
|
||||
|
||||
*((int16_t *)pMsg) = pCol->colId;
|
||||
*((int16_t *)pMsg) = htons(pCol->colId);
|
||||
pMsg += sizeof(pCol->colId);
|
||||
|
||||
*((int16_t *)pMsg) += pCol->colIndex;
|
||||
*((int16_t *)pMsg) += htons(pCol->colIndex);
|
||||
pMsg += sizeof(pCol->colIndex);
|
||||
|
||||
*((int16_t *)pMsg) += pCol->flag;
|
||||
*((int16_t *)pMsg) += htons(pCol->flag);
|
||||
pMsg += sizeof(pCol->flag);
|
||||
|
||||
memcpy(pMsg, pCol->name, tListLen(pCol->name));
|
||||
|
|
|
@ -6225,13 +6225,13 @@ static int32_t convertQueryMsg(SQueryTableMsg *pQueryMsg, SArray **pTableIdList,
|
|||
}
|
||||
|
||||
for (int32_t i = 0; i < pQueryMsg->numOfGroupCols; ++i) {
|
||||
(*groupbyCols)[i].colId = *(int16_t *)pMsg;
|
||||
(*groupbyCols)[i].colId = htons(*(int16_t *)pMsg);
|
||||
pMsg += sizeof((*groupbyCols)[i].colId);
|
||||
|
||||
(*groupbyCols)[i].colIndex = *(int16_t *)pMsg;
|
||||
(*groupbyCols)[i].colIndex = htons(*(int16_t *)pMsg);
|
||||
pMsg += sizeof((*groupbyCols)[i].colIndex);
|
||||
|
||||
(*groupbyCols)[i].flag = *(int16_t *)pMsg;
|
||||
(*groupbyCols)[i].flag = htons(*(int16_t *)pMsg);
|
||||
pMsg += sizeof((*groupbyCols)[i].flag);
|
||||
|
||||
memcpy((*groupbyCols)[i].name, pMsg, tListLen(groupbyCols[i]->name));
|
||||
|
|
Loading…
Reference in New Issue