From 3f2ff37ba3e8984cb5caad9ad9d6265ae480845f Mon Sep 17 00:00:00 2001 From: dapan1121 <89396746@qq.com> Date: Tue, 5 Jan 2021 16:44:51 +0800 Subject: [PATCH] fix bug --- src/query/src/qExecutor.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index be4d849fb9..b64ce52966 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -758,7 +758,12 @@ static void doUpdateResultRowIndex(SResultRowInfo*pResultRowInfo, TSKEY lastKey, } } - pResultRowInfo->curIndex = i + 1; // current not closed result object + if (i == pResultRowInfo->size - 1) { + pResultRowInfo->curIndex = i; + } else { + pResultRowInfo->curIndex = i + 1; // current not closed result object + } + pResultRowInfo->prevSKey = pResultRowInfo->pResult[pResultRowInfo->curIndex]->win.skey; } } @@ -7715,4 +7720,4 @@ void** qReleaseQInfo(void* pMgmt, void* pQInfo, bool freeHandle) { taosCacheRelease(pQueryMgmt->qinfoPool, pQInfo, freeHandle); return 0; -} \ No newline at end of file +} -- GitLab