/ Check-in [68360cd2]
Login

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

Overview
Comment:Fix an assert() that might be false for a corrupt database.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 68360cd2211b7ab25dd4ca55a2e82e31f51f2976
User & Date: drh 2016-01-01 03:37:44
Context
2016-01-01
16:26
Avoid misaligned memory allocations on Sparc in sqlite3VdbeMakeReady(). This fixes a problem introduced by check-in [a9e819082b]. check-in: a304e346 user: drh tags: trunk
14:14
Merge recent trunk enhancements. check-in: 6bea792c user: drh tags: begin-concurrent
13:31
Merge all recent trunk enhancements. check-in: 5b700f31 user: drh tags: apple-osx
13:25
Merge the latest enhancements from trunk. check-in: c0be246a user: drh tags: sessions
03:37
Fix an assert() that might be false for a corrupt database. check-in: 68360cd2 user: drh tags: trunk
00:15
Remove unreachable branches from the new JSON aggregate functions. check-in: 6e30f8c6 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  8217   8217         releasePage(pCur->apPage[pCur->iPage--]);
  8218   8218       }
  8219   8219       rc = balance(pCur);
  8220   8220     }
  8221   8221   
  8222   8222     if( rc==SQLITE_OK ){
  8223   8223       if( bSkipnext ){
  8224         -      assert( bPreserve && pCur->iPage==iCellDepth );
         8224  +      assert( bPreserve && (pCur->iPage==iCellDepth || CORRUPT_DB) );
  8225   8225         assert( pPage==pCur->apPage[pCur->iPage] );
  8226   8226         assert( (pPage->nCell>0 || CORRUPT_DB) && iCellIdx<=pPage->nCell );
  8227   8227         pCur->eState = CURSOR_SKIPNEXT;
  8228   8228         if( iCellIdx>=pPage->nCell ){
  8229   8229           pCur->skipNext = -1;
  8230   8230           pCur->aiIdx[iCellDepth] = pPage->nCell-1;
  8231   8231         }else{