[TD-2298]

This commit is contained in:
Haojun Liao 2020-12-03 10:32:55 +08:00
parent 597dd6341c
commit d59b8f18da
1 changed files with 2 additions and 1 deletions

View File

@ -3978,13 +3978,14 @@ void scanOneTableDataBlocks(SQueryRuntimeEnv *pRuntimeEnv, TSKEY start) {
qstatus.status = pQuery->status; qstatus.status = pQuery->status;
// do nothing if no data blocks are found qualified during scan // do nothing if no data blocks are found qualified during scan
qstatus.lastKey = pTableQueryInfo->lastKey;
if (qstatus.lastKey != pTableQueryInfo->lastKey) { if (qstatus.lastKey != pTableQueryInfo->lastKey) {
qstatus.curWindow.ekey = pTableQueryInfo->lastKey - step; qstatus.curWindow.ekey = pTableQueryInfo->lastKey - step;
} else { // the lastkey does not increase, which means no data checked yet } else { // the lastkey does not increase, which means no data checked yet
qDebug("QInfo:%p no results generated in this scan, abort", pQInfo); qDebug("QInfo:%p no results generated in this scan, abort", pQInfo);
return; return;
} }
qstatus.lastKey = pTableQueryInfo->lastKey;
} }
if (!needScanDataBlocksAgain(pRuntimeEnv)) { if (!needScanDataBlocksAgain(pRuntimeEnv)) {