Home | History | Annotate | Download | only in dist

Lines Matching defs:balance

17838 #define SQLITE_BalancedMerge  0x00200000 /* Balance multi-way merges */
77537 #define NB 3 /* (NN*2+1): Total pages involved in the balance */
77995 ** This version of balance() handles the common special case where
78000 ** Instead of trying to balance the 3 right-most leaf pages, just add
78236 ** balancing routine to fix this problem (see the balance() routine).
78307 /* Find the sibling pages to balance. Also locate the cells in pParent
78459 ** cells into a parent on a prior balance, and divider cells are always
78464 ** This must be done in advance. Once the balance starts, the cell
78616 ** get a better balance.
78619 ** be so out of balance as to be illegal. For example, the right-most
78663 TRACE(("BALANCE: old: %u(nc=%u) %u(nc=%u) %u(nc=%u)\n",
78747 TRACE(("BALANCE: new: %u(%u nc=%u) %u(%u nc=%u) %u(%u nc=%u) "
78774 ** cells stored on sibling pages following the balance operation. Pointer
78962 ** b-tree structure by one. This is described as the "balance-shallower"
78995 TRACE(("BALANCE: finished: old=%u new=%u cells=%u\n",
79080 TRACE(("BALANCE: copy root %u into %u\n", pRoot->pgno, pChild->pgno));
79131 static int balance(BtCursor *pCur){
79155 ** next iteration of the do-loop will balance the child page.
79195 ** happens, the next iteration of the do-loop will balance pParent
79215 ** will balance the parent page to correct this.
79658 /* If no error has occurred and pPage has an overflow cell, call balance()
79659 ** to redistribute the cells within the tree. Since balance() may move
79664 ** back to the root page as balance() used to invalidate the contents
79681 rc = balance(pCur);
79683 /* Must make sure nOverflow is reset to zero even if the balance()
79983 /* Balance the tree. If the entry deleted was located on a leaf page,
79985 ** call to balance() repairs the tree, and the if(...) condition is
79993 ** on the leaf node first. If the balance proceeds far enough up the
79996 ** walk the cursor up the tree to the internal node and balance it as
80002 ** then balance() will always be a no-op. No need to invoke it. */
80005 rc = balance(pCur);
80014 rc = balance(pCur);