From a464053692a622e10c6023bb42b1c4a9bcc3466c Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 17 Nov 2022 00:46:06 +0800 Subject: [PATCH] fix(query): set correct size of array list. --- source/dnode/vnode/src/tsdb/tsdbRead.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index 1f200ea5d7..986cba8b17 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -4128,7 +4128,8 @@ int32_t tsdbRetrieveDatablockSMA(STsdbReader* pReader, SColumnDataAgg*** pBlockS taosArrayClear(pSup->pColAgg); taosArrayAddAll(pSup->pColAgg, pNewAggList); - for(int32_t k = 0; k < numOfCols; ++k) { + size_t num = taosArrayGetSize(pSup->pColAgg); + for(int32_t k = 0; k < num; ++k) { pSup->plist[k] = taosArrayGet(pSup->pColAgg, k); } -- GitLab