提交 308639a9 编写于 作者: D dapan1121

fix bug

上级 5c61c3ad
...@@ -2491,7 +2491,7 @@ static bool loadCachedLast(STsdbQueryHandle* pQueryHandle) { ...@@ -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) { ...@@ -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) { ...@@ -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 ...@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册