From e2299ef22e3dd5bb7dab3689e84aad6af5dba2ff Mon Sep 17 00:00:00 2001 From: haojun Liao Date: Tue, 7 Jan 2020 12:26:11 +0800 Subject: [PATCH] add the number of blocks in the SMeterDataInfo fix bug that failed to add the number of blocks in the records (SMeterDataInfo) for each table --- src/system/detail/src/vnodeQueryImpl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/system/detail/src/vnodeQueryImpl.c b/src/system/detail/src/vnodeQueryImpl.c index 793903d2db..8f2d94a1cf 100644 --- a/src/system/detail/src/vnodeQueryImpl.c +++ b/src/system/detail/src/vnodeQueryImpl.c @@ -5861,7 +5861,7 @@ static void clearAllMeterDataBlockInfo(SMeterDataInfo** pMeterDataInfo, int32_t for(int32_t i = start; i < end; ++i) { tfree(pMeterDataInfo[i]->pBlock); pMeterDataInfo[i]->numOfBlocks = 0; - pMeterDataInfo[i]->start = 0; + pMeterDataInfo[i]->start = -1; } } @@ -5989,6 +5989,7 @@ int32_t getDataBlocksForMeters(SMeterQuerySupportObj *pSupporter, SQuery *pQuery int32_t size = compInfo.numOfBlocks * sizeof(SCompBlock); size_t bufferSize = size + sizeof(TSCKSUM); + pMeterDataInfo[j]->numOfBlocks = compInfo.numOfBlocks; pMeterDataInfo[j]->pBlock = calloc(1, bufferSize); if (pMeterDataInfo[j]->pBlock == NULL) { clearAllMeterDataBlockInfo(pMeterDataInfo, 0, j);