/ Check-in [c5dc80e6]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove a condition from balance_nonroot() that is always true. (CVS 6806)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c5dc80e6bdd18a5ada728c8d5c9403ac233f1c9a
User & Date: danielk1977 2009-06-23 16:40:18
Context
2009-06-23
20:28
Enhance autoincrement so that it works with triggers that also do autoincrement inserts, even multiple inserts into the same table. Ticket #3928 (CVS 6807) check-in: 1330993d user: drh tags: trunk
16:40
Remove a condition from balance_nonroot() that is always true. (CVS 6806) check-in: c5dc80e6 user: danielk1977 tags: trunk
15:43
Call balance_shallower() from balance_nonroot() instead of from balance(). This simplifies coverage testing a bit. (CVS 6805) check-in: da9893e2 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

     5      5   ** a legal notice, here is a blessing:
     6      6   **
     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12         -** $Id: btree.c,v 1.640 2009/06/23 15:43:40 danielk1977 Exp $
           12  +** $Id: btree.c,v 1.641 2009/06/23 16:40:18 danielk1977 Exp $
    13     13   **
    14     14   ** This file implements a external (disk-based) database using BTrees.
    15     15   ** See the header comment on "btreeInt.h" for additional information.
    16     16   ** Including a description of file format and an overview of operation.
    17     17   */
    18     18   #include "btreeInt.h"
    19     19   
................................................................................
  5857   5857       assert( pNew->nOverflow==0 );
  5858   5858   
  5859   5859       j = cntNew[i];
  5860   5860   
  5861   5861       /* If the sibling page assembled above was not the right-most sibling,
  5862   5862       ** insert a divider cell into the parent page.
  5863   5863       */
  5864         -    if( i<nNew-1 && j<nCell ){
         5864  +    assert( i<nNew-1 || j==nCell );
         5865  +    if( j<nCell ){
  5865   5866         u8 *pCell;
  5866   5867         u8 *pTemp;
  5867   5868         int sz;
  5868   5869   
  5869   5870         assert( j<nMaxCells );
  5870   5871         pCell = apCell[j];
  5871   5872         sz = szCell[j] + leafCorrection;