/ Check-in [22eaced7]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix an assert() that might fail on a corrupt database.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 22eaced7274764eaf7ab4b5fc52cc2fcfc285708
User & Date: drh 2016-02-01 00:21:08
Context
2016-02-01
13:21
Minor simplification to the OP_AutoCommit opcode. Fix some code comments related to transaction control. check-in: a9b6a067 user: drh tags: trunk
00:21
Fix an assert() that might fail on a corrupt database. check-in: 22eaced7 user: drh tags: trunk
2016-01-30
21:09
Fix new test cases in stat.test so that they work with -DSQLITE_DEFAULT_AUTOVACUUM=1 builds. check-in: a2810cf6 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  8235   8235       }
  8236   8236       rc = balance(pCur);
  8237   8237     }
  8238   8238   
  8239   8239     if( rc==SQLITE_OK ){
  8240   8240       if( bSkipnext ){
  8241   8241         assert( bPreserve && (pCur->iPage==iCellDepth || CORRUPT_DB) );
  8242         -      assert( pPage==pCur->apPage[pCur->iPage] );
         8242  +      assert( pPage==pCur->apPage[pCur->iPage] || CORRUPT_DB );
  8243   8243         assert( (pPage->nCell>0 || CORRUPT_DB) && iCellIdx<=pPage->nCell );
  8244   8244         pCur->eState = CURSOR_SKIPNEXT;
  8245   8245         if( iCellIdx>=pPage->nCell ){
  8246   8246           pCur->skipNext = -1;
  8247   8247           pCur->aiIdx[iCellDepth] = pPage->nCell-1;
  8248   8248         }else{
  8249   8249           pCur->skipNext = 1;