/ Check-in [f2d400db]
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 not be true if the database file is corrupt.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f2d400db4dbfb05e2540178ed3662f97f8c57a95f8129886c7081c35e53adf0d
User & Date: drh 2019-02-19 16:42:54
Context
2019-02-19
17:45
Fix a potential memory leak in RBU if the rbu_fossil_delta() SQL function is misused. Misuse never happens in a working RBU system, so this is not a particularly important fix. check-in: 12517d1b user: drh tags: trunk
16:42
Fix an assert() that might not be true if the database file is corrupt. check-in: f2d400db user: drh tags: trunk
13:51
New assert() to verify the TF_HasprimaryKey flag. check-in: 0abace8a user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  8257   8257     if( rc ){
  8258   8258       *ppChild = 0;
  8259   8259       releasePage(pChild);
  8260   8260       return rc;
  8261   8261     }
  8262   8262     assert( sqlite3PagerIswriteable(pChild->pDbPage) );
  8263   8263     assert( sqlite3PagerIswriteable(pRoot->pDbPage) );
  8264         -  assert( pChild->nCell==pRoot->nCell );
         8264  +  assert( pChild->nCell==pRoot->nCell || CORRUPT_DB );
  8265   8265   
  8266   8266     TRACE(("BALANCE: copy root %d into %d\n", pRoot->pgno, pChild->pgno));
  8267   8267   
  8268   8268     /* Copy the overflow cells from pRoot to pChild */
  8269   8269     memcpy(pChild->aiOvfl, pRoot->aiOvfl,
  8270   8270            pRoot->nOverflow*sizeof(pRoot->aiOvfl[0]));
  8271   8271     memcpy(pChild->apOvfl, pRoot->apOvfl,

Changes to test/fuzzdata8.db.

cannot compute difference between binary files