未验证 提交 3ca778d6 编写于 作者: S slguan 提交者: GitHub

Merge pull request #1089 from taosdata/beta/v1.6.5.3

add the number of blocks in the SMeterDataInfo
...@@ -5861,7 +5861,7 @@ static void clearAllMeterDataBlockInfo(SMeterDataInfo** pMeterDataInfo, int32_t ...@@ -5861,7 +5861,7 @@ static void clearAllMeterDataBlockInfo(SMeterDataInfo** pMeterDataInfo, int32_t
for(int32_t i = start; i < end; ++i) { for(int32_t i = start; i < end; ++i) {
tfree(pMeterDataInfo[i]->pBlock); tfree(pMeterDataInfo[i]->pBlock);
pMeterDataInfo[i]->numOfBlocks = 0; pMeterDataInfo[i]->numOfBlocks = 0;
pMeterDataInfo[i]->start = 0; pMeterDataInfo[i]->start = -1;
} }
} }
...@@ -5989,6 +5989,7 @@ int32_t getDataBlocksForMeters(SMeterQuerySupportObj *pSupporter, SQuery *pQuery ...@@ -5989,6 +5989,7 @@ int32_t getDataBlocksForMeters(SMeterQuerySupportObj *pSupporter, SQuery *pQuery
int32_t size = compInfo.numOfBlocks * sizeof(SCompBlock); int32_t size = compInfo.numOfBlocks * sizeof(SCompBlock);
size_t bufferSize = size + sizeof(TSCKSUM); size_t bufferSize = size + sizeof(TSCKSUM);
pMeterDataInfo[j]->numOfBlocks = compInfo.numOfBlocks;
pMeterDataInfo[j]->pBlock = calloc(1, bufferSize); pMeterDataInfo[j]->pBlock = calloc(1, bufferSize);
if (pMeterDataInfo[j]->pBlock == NULL) { if (pMeterDataInfo[j]->pBlock == NULL) {
clearAllMeterDataBlockInfo(pMeterDataInfo, 0, j); clearAllMeterDataBlockInfo(pMeterDataInfo, 0, j);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册