SQLite4
Check-in [10d25d2516]
Not logged in

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

Overview
SHA1 Hash:10d25d251684c3a3386ffd3b7b3cb476ab3ec9dd
Date: 2013-11-27 18:44:52
User: dan
Comment:Fix a bug in sqlite4BtCsrFirst().
Tags And Properties
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/bt_main.c

836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
      /* Otherwise, set pgno to the left or rightmost child of the page
      ** just loaded, depending on whether the cursor is seeking to the
      ** start or end of the tree.  */
      if( bLast==0 ){
        pCell = btCellFind(aData, pgsz, 0);
        pCell += sqlite4BtVarintGet32(pCell, &nByte);
        pCell += nByte;
        sqlite4BtVarintGet32(pCell, (int *)&pgno);
      }else{
        pgno = btGetU32(&aData[1]);
      }
    }
  }
  if( pCsr->aiCell[pCsr->nPg-1] ) pCsr->aiCell[pCsr->nPg-1]--;
  return rc;







|







836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
      /* Otherwise, set pgno to the left or rightmost child of the page
      ** just loaded, depending on whether the cursor is seeking to the
      ** start or end of the tree.  */
      if( bLast==0 ){
        pCell = btCellFind(aData, pgsz, 0);
        pCell += sqlite4BtVarintGet32(pCell, &nByte);
        pCell += nByte;
        pgno = btGetU32(pCell);
      }else{
        pgno = btGetU32(&aData[1]);
      }
    }
  }
  if( pCsr->aiCell[pCsr->nPg-1] ) pCsr->aiCell[pCsr->nPg-1]--;
  return rc;