Lines Matching refs:balance
42978 #define NB (NN*2+1) /* Total pages involved in the balance */
42983 ** This version of balance() handles the common special case where
42988 ** Instead of trying to balance the 3 right-most leaf pages, just add
43207 ** balancing routine to fix this problem (see the balance() routine).
43279 /* Find the sibling pages to balance. Also locate the cells in pParent
43476 ** to adjust the packing of siblings to get a better balance.
43479 ** be so out of balance as to be illegal. For example, the right-most
43684 ** b-tree structure by one. This is described as the "balance-shallower"
43899 static int balance(BtCursor *pCur){
43917 ** next iteration of the do-loop will balance the child page.
43948 ** happens, the next interation of the do-loop will balance pParent
43967 ** will balance the parent page to correct this.
44134 /* If no error has occured and pPage has an overflow cell, call balance()
44135 ** to redistribute the cells within the tree. Since balance() may move
44140 ** back to the root page as balance() used to invalidate the contents
44157 rc = balance(pCur);
44159 /* Must make sure nOverflow is reset to zero even if the balance()
44261 ** call to balance() repairs the tree, and the if(...) condition is
44269 ** on the leaf node first. If the balance proceeds far enough up the
44272 ** walk the cursor up the tree to the internal node and balance it as
44274 rc = balance(pCur);
44279 rc = balance(pCur);