SQLite

Check-in [8c80b004ca]
Login

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

Overview
Comment:Earlier detection of corruption while added to the freelist.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8c80b004cae71aaf820a31dba80c100ed162ef5bae845fb4535ff4d3be407500
User & Date: drh 2019-03-25 19:50:19.302
Context
2019-03-25
21:35
Change the name of the parameter table in the CLI to "sqlite_parameters". Doing so involves adding SQLITE_DBCONFIG_WRITABLE_SCHEMA and allowing the creation of tables whose names begin with "sqlite_" and that are indexed while writable_schema is on. (check-in: 24ef384469 user: drh tags: trunk)
19:50
Earlier detection of corruption while added to the freelist. (check-in: 8c80b004ca user: drh tags: trunk)
18:44
Fix a faulty assert() statement in balance_nonroot() - the assert() should use get2byteNotZero() instead of get2byte() for the corner case where the number cells is zero on a 65536-byte page. (check-in: bcbe7d96df user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/btree.c.
6189
6190
6191
6192
6193
6194
6195

6196

6197
6198
6199
6200
6201
6202
6203
  int rc;                             /* Return Code */
  int nFree;                          /* Initial number of pages on free-list */

  assert( sqlite3_mutex_held(pBt->mutex) );
  assert( CORRUPT_DB || iPage>1 );
  assert( !pMemPage || pMemPage->pgno==iPage );


  if( iPage<2 ) return SQLITE_CORRUPT_BKPT;

  if( pMemPage ){
    pPage = pMemPage;
    sqlite3PagerRef(pPage->pDbPage);
  }else{
    pPage = btreePageLookup(pBt, iPage);
  }








>
|
>







6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
  int rc;                             /* Return Code */
  int nFree;                          /* Initial number of pages on free-list */

  assert( sqlite3_mutex_held(pBt->mutex) );
  assert( CORRUPT_DB || iPage>1 );
  assert( !pMemPage || pMemPage->pgno==iPage );

  if( iPage<2 || iPage>pBt->nPage ){
    return SQLITE_CORRUPT_BKPT;
  }
  if( pMemPage ){
    pPage = pMemPage;
    sqlite3PagerRef(pPage->pDbPage);
  }else{
    pPage = btreePageLookup(pBt, iPage);
  }

Changes to test/fuzzdata7.db.

cannot compute difference between binary files