/ Check-in [7f2f71cc]
Login

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

Overview
Comment:The R-tree module should not assume that its shadow tables are consistent. If a problem is found in a shadow table, return SQLITE_CORRUPT.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:7f2f71cc9e3c39093f09231f448576cff6afb5fe
User & Date: drh 2010-08-24 01:49:48
References
2010-08-24
12:05
Pull the incremental_vacuum bug fix ([255f1eefa373153942c67b18b]) and the R-tree segfault bug fix ([7f2f71cc9e3c39093f09231f44]) into the 3.6.23 branch. Increase the version number to 3.6.23.3. check-in: bcbdecd8 user: drh tags: branch-3.6.23
02:10
Cherrypick the R-tree invalid shadow-table big fix of [7f2f71cc9e3c39093f09231f44] into the apple-osx 3.6.23 branch. check-in: 68103d91 user: drh tags: apple-osx-3623
Context
2010-08-24
13:11
Add tests to e_expr.test. check-in: 5c1c694e user: dan tags: trunk
01:51
Merge in the R-tree fix from the trunk. check-in: 02ee0bd5 user: drh tags: apple-osx
01:49
The R-tree module should not assume that its shadow tables are consistent. If a problem is found in a shadow table, return SQLITE_CORRUPT. check-in: 7f2f71cc user: drh tags: trunk
00:40
Version 3.7.2 check-in: 42537b60 user: drh tags: trunk, release, version-3.7.2
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ext/rtree/rtree.c.

434
435
436
437
438
439
440
441
442



443
444
445
446
447
448
449
  *ppNode = pNode;
  rc = sqlite3_reset(pRtree->pReadNode);

  if( rc==SQLITE_OK && iNode==1 ){
    pRtree->iDepth = readInt16(pNode->zData);
  }

  assert( (rc==SQLITE_OK && pNode) || (pNode==0 && rc!=SQLITE_OK) );
  nodeHashInsert(pRtree, pNode);




  return rc;
}

/*
** Overwrite cell iCell of node pNode with the contents of pCell.
*/







|
|
>
>
>







434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
  *ppNode = pNode;
  rc = sqlite3_reset(pRtree->pReadNode);

  if( rc==SQLITE_OK && iNode==1 ){
    pRtree->iDepth = readInt16(pNode->zData);
  }

  if( pNode!=0 ){
    nodeHashInsert(pRtree, pNode);
  }else if( rc==SQLITE_OK ){
    rc = SQLITE_CORRUPT;
  }

  return rc;
}

/*
** Overwrite cell iCell of node pNode with the contents of pCell.
*/