fix bug
This commit is contained in:
parent
5c61c3adf0
commit
308639a9e3
|
@ -2491,7 +2491,7 @@ static bool loadCachedLast(STsdbQueryHandle* pQueryHandle) {
|
||||||
int32_t numOfRows = 0;
|
int32_t numOfRows = 0;
|
||||||
assert(numOfTables > 0 && tgNumOfCols > 0);
|
assert(numOfTables > 0 && tgNumOfCols > 0);
|
||||||
|
|
||||||
while (pQueryHandle->activeIndex < numOfTables) {
|
while (++pQueryHandle->activeIndex < numOfTables) {
|
||||||
STableCheckInfo* pCheckInfo = taosArrayGet(pQueryHandle->pTableCheckInfo, pQueryHandle->activeIndex);
|
STableCheckInfo* pCheckInfo = taosArrayGet(pQueryHandle->pTableCheckInfo, pQueryHandle->activeIndex);
|
||||||
STable* pTable = pCheckInfo->pTableObj;
|
STable* pTable = pCheckInfo->pTableObj;
|
||||||
char* pData = NULL;
|
char* pData = NULL;
|
||||||
|
@ -2500,7 +2500,6 @@ static bool loadCachedLast(STsdbQueryHandle* pQueryHandle) {
|
||||||
|
|
||||||
if (pTable->lastCols == NULL || pTable->lastColNum <= 0) {
|
if (pTable->lastCols == NULL || pTable->lastColNum <= 0) {
|
||||||
tsdbWarn("no last cached for table, uid:%" PRIu64 ",tid:%d", pTable->tableId.uid, pTable->tableId.tid);
|
tsdbWarn("no last cached for table, uid:%" PRIu64 ",tid:%d", pTable->tableId.uid, pTable->tableId.tid);
|
||||||
pQueryHandle->activeIndex++;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2595,8 +2594,6 @@ static bool loadCachedLast(STsdbQueryHandle* pQueryHandle) {
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
|
||||||
pQueryHandle->activeIndex++;
|
|
||||||
|
|
||||||
if (numOfRows > 0) {
|
if (numOfRows > 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -2899,7 +2896,7 @@ int32_t checkForCachedLast(STsdbQueryHandle* pQueryHandle, STableGroupInfo *grou
|
||||||
if (pQueryHandle->cachelastrow) {
|
if (pQueryHandle->cachelastrow) {
|
||||||
pQueryHandle->window = TSWINDOW_INITIALIZER;
|
pQueryHandle->window = TSWINDOW_INITIALIZER;
|
||||||
pQueryHandle->checkFiles = false;
|
pQueryHandle->checkFiles = false;
|
||||||
pQueryHandle->activeIndex = 0; // start from -1
|
pQueryHandle->activeIndex = -1; // start from -1
|
||||||
}
|
}
|
||||||
|
|
||||||
tfree(pRow);
|
tfree(pRow);
|
||||||
|
|
Loading…
Reference in New Issue