if (rightPos < endPos) { int rightLoc = p_ushortGetLE(page, start + rightPos); int compare = compareKeys(this, childLoc, this, rightLoc); if (compare < 0) { childPos = rightPos; int compare = compareKeys(this, loc, this, childLoc); if (compare < 0) { p_shortPutLE(page, start + pos, childLoc);
private static int compareSortTrees(Tree leftTree, Tree rightTree) throws IOException { Node left = leftTree.mRoot; Node right = rightTree.mRoot; int compare = Node.compareKeys (left, p_ushortGetLE(left.mPage, left.searchVecStart()), right, p_ushortGetLE(right.mPage, right.searchVecStart())); if (compare == 0) { // Use node order (encoded in garbage field) for eliminating duplicates. // Signal that the first entry from the node with the lower key must be // deleted. Use bit 0 to signal this. int leftOrder = left.garbage(); int rightOrder = right.garbage(); if (leftOrder < rightOrder) { left.garbage(leftOrder | 1); compare = -1; } else { right.garbage(rightOrder | 1); compare = 1; } } return compare; }
int result = compareKeys(this, lastKeyLoc, this, keyLoc); if (result >= 0) { return verifyFailed(level, observer, "Key order: " + result);
int result = compareKeys(this, lastKeyLoc, this, keyLoc); if (result >= 0) { return verifyFailed(level, observer, "Key order: " + result);
int result = compareKeys(this, lastKeyLoc, this, keyLoc); if (result >= 0) { return verifyFailed(level, observer, "Key order: " + result);