]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Port the corruption bug fix of check-in (5938) into a branch off of
authordrh <drh@noemail.net>
Sat, 22 Nov 2008 14:07:49 +0000 (14:07 +0000)
committerdrh <drh@noemail.net>
Sat, 22 Nov 2008 14:07:49 +0000 (14:07 +0000)
version 3.6.6. (CVS 5947)

FossilOrigin-Name: 15d88edf7671822c57238c3f85adf0b40b13e3e2

VERSION
manifest
manifest.uuid
src/btree.c

diff --git a/VERSION b/VERSION
index 4f2c1d15f6df48073057472403968720cb96e72b..e2d1088825d6b4db38047334b48ed5d4ea84fc8f 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.6.6
+3.6.6.1
index 2dce09267f9eff6baa4c4db79ec59211d625b5a9..4a4ccc29f2bc598579e8fa4ee55db64b42a1d674 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,11 +1,11 @@
-C When\sa\smemory\sallocation\sfails\son\sthe\s%Q\sconversion\sin\ssqlite3_mprintf(),\nmake\ssure\sthe\serror\sis\sreported\sback\sup\sthe\scall\sstack.\s(CVS\s5933)
-D 2008-11-20T18:20:28
+C Port\sthe\scorruption\sbug\sfix\sof\scheck-in\s(5938)\sinto\sa\sbranch\soff\sof\nversion\s3.6.6.\s(CVS\s5947)
+D 2008-11-22T14:07:49
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 0aa7bbe3be6acc4045706e3bb3fd0b8f38f4a3b5
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
 F Makefile.vxwSH4 d53b4be86491060d498b22148951b6d765884cab
 F README b974cdc3f9f12b87e851b04e75996d720ebf81ac
-F VERSION 2373a66872324b856f4735e0b7f7885ae4847a68
+F VERSION 0fb8ff48a435ea7ea0f720a79cb3c4911a7ab06c
 F aclocal.m4 7d02b11fed45174e11156144227278deb6236eea
 F addopcodes.awk 215333be9d99c260e076c3080a81dba3ae928c45
 F art/2005osaward.gif 0d1851b2a7c1c9d0ccce545f3e14bca42d7fd248
@@ -100,7 +100,7 @@ F src/attach.c 85c6a3d0daf11965b47604190d7cf5597dc88382
 F src/auth.c c8b2ab5c8bad4bd90ed7c294694f48269162c627
 F src/bitvec.c 4300d311b17fb3c1476623fd895a8feac02a0b08
 F src/btmutex.c 63c5cc4ad5715690767ffcb741e185d7bc35ec1a
-F src/btree.c 76c1b09263b6f028b4f84bd6d811e9d017448216
+F src/btree.c adfb7974429f79f188fabcdb26145fca3a7d04ed
 F src/btree.h 179c3ea813780df78a289a8f5130db18e6d4616e
 F src/btreeInt.h 8d21590c97b6a2c00cce1f78ed5dc5756e835108
 F src/build.c a89e901ea24d8ec845286f9a1fbfd14572a7777e
@@ -659,7 +659,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 00b68a1e3164fbf04dabb480c2037be45612b4e4
-R 38e4d91990d6f71d4806b7fd8231a0a6
+P eebacbc9d7d0625dfbe6367046fa4a0ca9c04e74
+R d2ce2d5b91c1f6ae4cf2c6a18038f9fd
 U drh
-Z c8c595ff0394bbf0b4f1b46a403a8fd7
+Z 5e4a581e0fb000be4cccce044d88796c
index cb60f91a955a2f8ffe86ae411a9985872ee5458a..c138452a60add4c94699a5857f5f70ef7a6ff34b 100644 (file)
@@ -1 +1 @@
-eebacbc9d7d0625dfbe6367046fa4a0ca9c04e74
\ No newline at end of file
+15d88edf7671822c57238c3f85adf0b40b13e3e2
\ No newline at end of file
index 97510456b6280af341ccc766e7e0e61d6b2c6444..7282113fc44045c7691145144982a24ff8354e0e 100644 (file)
@@ -9,7 +9,7 @@
 **    May you share freely, never taking more than you give.
 **
 *************************************************************************
-** $Id: btree.c,v 1.539 2008/11/19 10:22:33 danielk1977 Exp $
+** $Id: btree.c,v 1.539.2.1 2008/11/22 14:07:49 drh Exp $
 **
 ** This file implements a external (disk-based) database using BTrees.
 ** See the header comment on "btreeInt.h" for additional information.
@@ -4304,9 +4304,12 @@ static int allocateBtreePage(
 end_allocate_page:
   releasePage(pTrunk);
   releasePage(pPrevTrunk);
-  if( rc==SQLITE_OK && sqlite3PagerPageRefcount((*ppPage)->pDbPage)>1 ){
-    releasePage(*ppPage);
-    return SQLITE_CORRUPT_BKPT;
+  if( rc==SQLITE_OK ){
+    if( sqlite3PagerPageRefcount((*ppPage)->pDbPage)>1 ){
+      releasePage(*ppPage);
+      return SQLITE_CORRUPT_BKPT;
+    }
+    (*ppPage)->isInit = 0;
   }
   return rc;
 }