/ Check-in [2e5d42ae]
Login

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

Overview
Comment:Avoid calling fillInCell() to create an internal node intkey cell from balance_nonroot(). A single putVarint() does the same thing more quickly. (CVS 6734)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2e5d42aeb40c3c6eea373a9ae3fbdf4e8087cd58
User & Date: danielk1977 2009-06-09 11:34:11
Context
2009-06-09
13:42
Enable cell overflow checking in sqlite3BtreeInitPage() using the compile-time option SQLITE_ENABLE_OVERSIZE_CELL_CHECK. Change the tests so that they recognize different error messages depending on the setting of this macro. (CVS 6735) check-in: 56bff6eb user: drh tags: trunk
11:34
Avoid calling fillInCell() to create an internal node intkey cell from balance_nonroot(). A single putVarint() does the same thing more quickly. (CVS 6734) check-in: 2e5d42ae user: danielk1977 tags: trunk
10:37
Only do the cell overread checks in sqlite3BtreeInitPage if SQLITE_OVERREAD_CHECK is defined at compile-time. (CVS 6733) check-in: 49f544eb user: drh 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.622 2009/06/09 10:37:04 drh Exp $
           12  +** $Id: btree.c,v 1.623 2009/06/09 11:34:11 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   
................................................................................
  5730   5730           ** cell consists of the integer key for the right-most cell of 
  5731   5731           ** the sibling-page assembled above only.
  5732   5732           */
  5733   5733           CellInfo info;
  5734   5734           j--;
  5735   5735           sqlite3BtreeParseCellPtr(pNew, apCell[j], &info);
  5736   5736           pCell = pTemp;
  5737         -        rc = fillInCell(pParent, pCell, 0, info.nKey, 0, 0, 0, &sz);
  5738         -        if( rc!=SQLITE_OK ){
  5739         -          goto balance_cleanup;
  5740         -        }
         5737  +	sz = 4 + putVarint(&pCell[4], info.nKey);
  5741   5738           pTemp = 0;
  5742   5739         }else{
  5743   5740           pCell -= 4;
  5744   5741           /* Obscure case for non-leaf-data trees: If the cell at pCell was
  5745   5742           ** previously stored on a leaf node, and its reported size was 4
  5746   5743           ** bytes, then it may actually be smaller than this 
  5747   5744           ** (see sqlite3BtreeParseCellPtr(), 4 bytes is the minimum size of