Lines Matching defs:balance

71818 #define NB 3             /* (NN*2+1): Total pages involved in the balance */
72259 ** This version of balance() handles the common special case where
72264 ** Instead of trying to balance the 3 right-most leaf pages, just add
72500 ** balancing routine to fix this problem (see the balance() routine).
72574 /* Find the sibling pages to balance. Also locate the cells in pParent
72726 ** cells into a parent on a prior balance, and divider cells are always
72731 ** This must be done in advance. Once the balance starts, the cell
72883 ** get a better balance.
72886 ** be so out of balance as to be illegal. For example, the right-most
73040 ** cells stored on sibling pages following the balance operation. Pointer
73219 ** b-tree structure by one. This is described as the "balance-shallower"
73388 static int balance(BtCursor *pCur){
73409 ** next iteration of the do-loop will balance the child page.
73444 ** happens, the next iteration of the do-loop will balance pParent
73464 ** will balance the parent page to correct this.
73866 /* If no error has occurred and pPage has an overflow cell, call balance()
73867 ** to redistribute the cells within the tree. Since balance() may move
73872 ** back to the root page as balance() used to invalidate the contents
73890 rc = balance(pCur);
73892 /* Must make sure nOverflow is reset to zero even if the balance()
74169 ** call to balance() repairs the tree, and the if(...) condition is
74177 ** on the leaf node first. If the balance proceeds far enough up the
74180 ** walk the cursor up the tree to the internal node and balance it as
74182 rc = balance(pCur);
74190 rc = balance(pCur);