/ Check-in [255f1eef]
Login

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

Overview
Comment:Fix for ticket [5e10420e8d].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 255f1eefa373153942c67b18b22177933657911d
User & Date: dan 2010-08-23 15:41:24
References
2010-08-24
12:05
Pull the incremental_vacuum bug fix ([255f1eefa373153942c67b18b]) and the R-tree segfault bug fix ([7f2f71cc9e3c39093f09231f44]) into the 3.6.23 branch. Increase the version number to 3.6.23.3. check-in: bcbdecd8 user: drh tags: branch-3.6.23
01:59
Cherrypick the incremental_vacuum bug fix ([255f1eefa373153942c67b18b]) into the apple-osx 3.6.23 branch. check-in: 60f16838 user: drh tags: apple-osx-3623
2010-08-23
17:08 Fixed ticket [5e10420e]: Free-list corruption in incremental-vacuum mode plus 5 other changes artifact: cfdf952b user: drh
Context
2010-08-23
17:09
Update the version number in preparation for the 3.7.2 release. check-in: 77889510 user: drh tags: trunk
15:41
Fix for ticket [5e10420e8d]. check-in: 255f1eef user: dan tags: trunk
15:26
Update the "showdb" debug utility to handle 64K pages and with extra options to decode the freelist structure. check-in: 1070918e user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  4803   4803           if( rc ){
  4804   4804             goto end_allocate_page;
  4805   4805           }
  4806   4806           if( k==0 ){
  4807   4807             if( !pPrevTrunk ){
  4808   4808               memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);
  4809   4809             }else{
         4810  +            rc = sqlite3PagerWrite(pPrevTrunk->pDbPage);
         4811  +            if( rc!=SQLITE_OK ){
         4812  +              goto end_allocate_page;
         4813  +            }
  4810   4814               memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4);
  4811   4815             }
  4812   4816           }else{
  4813   4817             /* The trunk page is required by the caller but it contains 
  4814   4818             ** pointers to free-list leaves. The first leaf becomes a trunk
  4815   4819             ** page in this case.
  4816   4820             */

Added test/tkt-5e10420e8d.test.

            1  +# 2010 August 23
            2  +#
            3  +# The author disclaims copyright to this source code.  In place of
            4  +# a legal notice, here is a blessing:
            5  +#
            6  +#    May you do good and not evil.
            7  +#    May you find forgiveness for yourself and forgive others.
            8  +#    May you share freely, never taking more than you give.
            9  +#
           10  +#***********************************************************************
           11  +#
           12  +
           13  +set testdir [file dirname $argv0]
           14  +source $testdir/tester.tcl
           15  +
           16  +do_execsql_test tkt-5e10420e8d.1 {
           17  +  PRAGMA page_size = 1024;
           18  +  PRAGMA auto_vacuum = incremental;
           19  +
           20  +  CREATE TABLE t1(x);
           21  +  CREATE TABLE t2(x);
           22  +  CREATE TABLE t3(x);
           23  +} {}
           24  +
           25  +do_execsql_test tkt-5e10420e8d.2 {
           26  +  INSERT INTO t3 VALUES(randomblob(500 + 1024*248));
           27  +  INSERT INTO t1 VALUES(randomblob(1500));
           28  +  INSERT INTO t2 VALUES(randomblob(500 + 1024*248));
           29  +
           30  +  DELETE FROM t3;
           31  +  DELETE FROM t2;
           32  +  DELETE FROM t1;
           33  +} {}
           34  +
           35  +do_execsql_test tkt-5e10420e8d.3 {
           36  +  PRAGMA incremental_vacuum(248)
           37  +} {}
           38  +
           39  +do_execsql_test tkt-5e10420e8d.4 {
           40  +  PRAGMA incremental_vacuum(1)
           41  +} {}
           42  +
           43  +db close
           44  +sqlite3 db test.db
           45  +
           46  +do_execsql_test tkt-5e10420e8d.5 {
           47  +  PRAGMA integrity_check;
           48  +} {ok}
           49  +
           50  +finish_test