瀏覽代碼

HPCC-10784 Keyed limits on stepped indexreads can be miscalculated

Fix other issues spotted in code review (which might review in spurious LIMITs
being reported in ,LOCAL files).

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 11 年之前
父節點
當前提交
89acc2785b
共有 1 個文件被更改,包括 5 次插入7 次删除
  1. 5 7
      system/jhtree/jhtree.cpp

+ 5 - 7
system/jhtree/jhtree.cpp

@@ -2791,13 +2791,11 @@ public:
             unsigned key = mergeheap[i];
             keyBuffer = buffers[key];
             keyCursor = cursors[key];
-            ret += CKeyLevelManager::checkCount(max);
-            if (max)
-            {
-                if (ret > max)
-                    return ret;
-                max -= ret;
-            }
+            unsigned __int64 thisKeyCount = CKeyLevelManager::checkCount(max);
+            ret += thisKeyCount;
+            if (thisKeyCount > max)
+                return ret;
+            max -= thisKeyCount;
         }
         return ret;
     }