SQLite

Check-in [bddf39562d]
Login

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

Overview
Comment:Remove an unnecessary corruption test from the btree balancer. If corruption is present, it will be found harmlessly by later tests.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: bddf39562d08e259c43dd59b82afb62fe0eb2eef
User & Date: drh 2017-01-12 16:14:33.708
Context
2017-01-12
16:21
Fix harmless compiler warnings in the UPDATE code generator. (check-in: 385db26667 user: drh tags: trunk)
16:14
Remove an unnecessary corruption test from the btree balancer. If corruption is present, it will be found harmlessly by later tests. (check-in: bddf39562d user: drh tags: trunk)
15:11
Improved detection of cells that extend into the reserved space at the end of the page while adjusting overflow page pointers during autovacuum. (check-in: 8097712c9c user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/btree.c.
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
  ** usableSpace: Number of bytes of space available on each sibling.
  ** 
  */
  usableSpace = pBt->usableSize - 12 + leafCorrection;
  for(i=0; i<nOld; i++){
    MemPage *p = apOld[i];
    szNew[i] = usableSpace - p->nFree;
    if( szNew[i]<0 ){ rc = SQLITE_CORRUPT_BKPT; goto balance_cleanup; }
    for(j=0; j<p->nOverflow; j++){
      szNew[i] += 2 + p->xCellSize(p, p->apOvfl[j]);
    }
    cntNew[i] = cntOld[i];
  }
  k = nOld;
  for(i=0; i<k; i++){







<







7267
7268
7269
7270
7271
7272
7273

7274
7275
7276
7277
7278
7279
7280
  ** usableSpace: Number of bytes of space available on each sibling.
  ** 
  */
  usableSpace = pBt->usableSize - 12 + leafCorrection;
  for(i=0; i<nOld; i++){
    MemPage *p = apOld[i];
    szNew[i] = usableSpace - p->nFree;

    for(j=0; j<p->nOverflow; j++){
      szNew[i] += 2 + p->xCellSize(p, p->apOvfl[j]);
    }
    cntNew[i] = cntOld[i];
  }
  k = nOld;
  for(i=0; i<k; i++){