From ce15900b6ef80301f1b502134acea4859064dacb Mon Sep 17 00:00:00 2001 From: hjxilinx Date: Sat, 29 Feb 2020 17:56:43 +0800 Subject: [PATCH] fix taosd crashed when handling the inmemory data query. #1283 --- src/system/detail/src/vnodeQueryImpl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/system/detail/src/vnodeQueryImpl.c b/src/system/detail/src/vnodeQueryImpl.c index e1ab5215ab..dc0d3febce 100644 --- a/src/system/detail/src/vnodeQueryImpl.c +++ b/src/system/detail/src/vnodeQueryImpl.c @@ -1148,10 +1148,11 @@ SCacheBlock *getCacheDataBlock(SMeterObj *pMeterObj, SQueryRuntimeEnv *pRuntimeE SCacheBlock *pNewBlock = &pRuntimeEnv->cacheBlock; - // the commit data points will be ignored int32_t offset = 0; int32_t numOfPoints = pNewBlock->numOfPoints; - if (pQuery->firstSlot == pQuery->commitSlot) { + + // the commit data points will be ignored + if (slot == pQuery->commitSlot) { assert(pQuery->commitPoint >= 0 && pQuery->commitPoint <= pNewBlock->numOfPoints); offset = pQuery->commitPoint; -- GitLab