/ Check-in [114640d9]
Login

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

Overview
Comment:Do not raise an SQLITE_CORRUPT error in Recoverymode if the database size in the header is larger than the physical file size. This facilitates recovery of a database in which the database size field has been corrupted.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 114640d920e16c85de90b19d53c485135875de5b
User & Date: drh 2011-01-12 17:56:26
References
2011-02-20
03:27
Do not raise an SQLITE_CORRUPT error in Recoverymode if the database size in the header is larger than the physical file size. This is a cherrypick of checkin [114640d920e16c8] check-in: 7701b077 user: drh tags: branch-3.7.4
Context
2011-01-13
10:58
Fix a segfault that can occur in matchinfo if an fts4 table contains mostly zero-length documents. Specifically, if the table contains more rows than it does bytes of text. check-in: fe904766 user: dan tags: trunk
2011-01-12
17:56
Do not raise an SQLITE_CORRUPT error in Recoverymode if the database size in the header is larger than the physical file size. This facilitates recovery of a database in which the database size field has been corrupted. check-in: 114640d9 user: drh tags: trunk
2011-01-11
17:40
Merge accidentally created fork. check-in: b7d080b8 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

install-sh became executable.


Changes to src/btree.c.

  2382   2382         pBt->usableSize = usableSize;
  2383   2383         pBt->pageSize = pageSize;
  2384   2384         freeTempSpace(pBt);
  2385   2385         rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize,
  2386   2386                                      pageSize-usableSize);
  2387   2387         return rc;
  2388   2388       }
  2389         -    if( nPageHeader>nPageFile ){
         2389  +    if( (pBt->db->flags & SQLITE_RecoveryMode)==0 && nPageHeader>nPageFile ){
  2390   2390         rc = SQLITE_CORRUPT_BKPT;
  2391   2391         goto page1_init_failed;
  2392   2392       }
  2393   2393       if( usableSize<480 ){
  2394   2394         goto page1_init_failed;
  2395   2395       }
  2396   2396       pBt->pageSize = pageSize;

test/progress.test became a regular file.


tool/mkopts.tcl became a regular file.