Overview
| SHA1 Hash: | bcbdecd854d8430831fbcdf17f55ba6f55ba745b |
|---|---|
| Date: | 2010-08-24 12:05:18 |
| User: | drh |
| Comment: | 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. |
Tags And Properties
- bgcolor=#60b0ff inherited from [ca0bc2a22e]
- branch=branch-3.6.23 inherited from [ca0bc2a22e]
- sym-branch-3.6.23 inherited from [ca0bc2a22e]
Changes
Changes to VERSION
Changes to ext/rtree/rtree.c
434 *ppNode = pNode; 434 *ppNode = pNode; 435 rc = sqlite3_reset(pRtree->pReadNode); 435 rc = sqlite3_reset(pRtree->pReadNode); 436 436 437 if( rc==SQLITE_OK && iNode==1 ){ 437 if( rc==SQLITE_OK && iNode==1 ){ 438 pRtree->iDepth = readInt16(pNode->zData); 438 pRtree->iDepth = readInt16(pNode->zData); 439 } 439 } 440 440 441 assert( (rc==SQLITE_OK && pNode) || (pNode==0 && rc!=SQLITE_OK) ); | 441 if( pNode!=0 ){ 442 nodeHashInsert(pRtree, pNode); | 442 nodeHashInsert(pRtree, pNode); > 443 }else if( rc==SQLITE_OK ){ > 444 rc = SQLITE_CORRUPT; > 445 } 443 446 444 return rc; 447 return rc; 445 } 448 } 446 449 447 /* 450 /* 448 ** Overwrite cell iCell of node pNode with the contents of pCell. 451 ** Overwrite cell iCell of node pNode with the contents of pCell. 449 */ 452 */
Changes to src/btree.c
4726 if( rc ){ 4726 if( rc ){ 4727 goto end_allocate_page; 4727 goto end_allocate_page; 4728 } 4728 } 4729 if( k==0 ){ 4729 if( k==0 ){ 4730 if( !pPrevTrunk ){ 4730 if( !pPrevTrunk ){ 4731 memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4); 4731 memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4); 4732 }else{ 4732 }else{ > 4733 rc = sqlite3PagerWrite(pPrevTrunk->pDbPage); > 4734 if( rc!=SQLITE_OK ){ > 4735 goto end_allocate_page; > 4736 } 4733 memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4); 4737 memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4); 4734 } 4738 } 4735 }else{ 4739 }else{ 4736 /* The trunk page is required by the caller but it contains 4740 /* The trunk page is required by the caller but it contains 4737 ** pointers to free-list leaves. The first leaf becomes a trunk 4741 ** pointers to free-list leaves. The first leaf becomes a trunk 4738 ** page in this case. 4742 ** page in this case. 4739 */ 4743 */
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_test tkt-5e10420e8d.1 { > 17 db eval { > 18 PRAGMA page_size = 1024; > 19 PRAGMA auto_vacuum = incremental; > 20 > 21 CREATE TABLE t1(x); > 22 CREATE TABLE t2(x); > 23 CREATE TABLE t3(x); > 24 } > 25 } {} > 26 > 27 do_test tkt-5e10420e8d.2 { > 28 db eval { > 29 INSERT INTO t3 VALUES(randomblob(500 + 1024*248)); > 30 INSERT INTO t1 VALUES(randomblob(1500)); > 31 INSERT INTO t2 VALUES(randomblob(500 + 1024*248)); > 32 > 33 DELETE FROM t3; > 34 DELETE FROM t2; > 35 DELETE FROM t1; > 36 } > 37 } {} > 38 > 39 do_test tkt-5e10420e8d.3 { > 40 db eval { > 41 PRAGMA incremental_vacuum(248) > 42 } > 43 } {} > 44 > 45 do_test tkt-5e10420e8d.4 { > 46 db eval { > 47 PRAGMA incremental_vacuum(1) > 48 } > 49 } {} > 50 > 51 db close > 52 sqlite3 db test.db > 53 > 54 do_test tkt-5e10420e8d.5 { > 55 db eval {PRAGMA integrity_check;} > 56 } {ok} > 57 > 58 finish_test