Lines Matching defs:balance
53863 #define NB (NN*2+1) /* Total pages involved in the balance */
53868 ** This version of balance() handles the common special case where
53873 ** Instead of trying to balance the 3 right-most leaf pages, just add
54093 ** balancing routine to fix this problem (see the balance() routine).
54165 /* Find the sibling pages to balance. Also locate the cells in pParent
54381 ** to adjust the packing of siblings to get a better balance.
54384 ** be so out of balance as to be illegal. For example, the right-most
54587 ** b-tree structure by one. This is described as the "balance-shallower"
54802 static int balance(BtCursor *pCur){
54820 ** next iteration of the do-loop will balance the child page.
54851 ** happens, the next interation of the do-loop will balance pParent
54870 ** will balance the parent page to correct this.
55037 /* If no error has occured and pPage has an overflow cell, call balance()
55038 ** to redistribute the cells within the tree. Since balance() may move
55043 ** back to the root page as balance() used to invalidate the contents
55060 rc = balance(pCur);
55062 /* Must make sure nOverflow is reset to zero even if the balance()
55164 ** call to balance() repairs the tree, and the if(...) condition is
55172 ** on the leaf node first. If the balance proceeds far enough up the
55175 ** walk the cursor up the tree to the internal node and balance it as
55177 rc = balance(pCur);
55182 rc = balance(pCur);