From 57039aa6067aab5b666188fc1d80cdbc57224be0 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 3 Dec 2020 10:40:38 +0800 Subject: [PATCH] [TD-2298] --- src/query/src/qExecutor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index d0874c36bc..391a93c36a 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -3631,6 +3631,9 @@ void scanOneTableDataBlocks(SQueryRuntimeEnv *pRuntimeEnv, TSKEY start) { // do nothing if no data blocks are found qualified during scan if (qstatus.lastKey != pTableQueryInfo->lastKey) { qstatus.curWindow.ekey = pTableQueryInfo->lastKey - step; + } else { // the lastkey does not increase, which means no data checked yet, and all result rows has been closed. + qDebug("QInfo:%p no results generated in this scan, abort", pQInfo); + return; } qstatus.lastKey = pTableQueryInfo->lastKey; -- GitLab