]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
In sqlite3PagerWrite(), do not set the PGHDR_NEED_SYNC flag on a page if an IO error...
authordanielk1977 <danielk1977@noemail.net>
Mon, 13 Jul 2009 11:22:10 +0000 (11:22 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Mon, 13 Jul 2009 11:22:10 +0000 (11:22 +0000)
FossilOrigin-Name: b9be365d85fddedbfa93eebf3ee62a140cbaa426

manifest
manifest.uuid
src/btree.c
src/pager.c

index 3226a1e8747b3ea0e5cf0ef4a46da0459f879916..00be53429f6e3e19f78d4523b7e8e82f7be605aa 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Remove\san\sassert\s("assert(\ssubpage>0\s)")\sfrom\sbtree.c\sthat\smay\snot\sbe\strue\sfor\sa\scorrupt\sdatabase.\sAlso\sadd\scomments\sand\sother\sassert()\sstatements\sto\sbtree.c\sfunction\smoveToRoot().\s(CVS\s6886)
-D 2009-07-13T09:41:45
+C In\ssqlite3PagerWrite(),\sdo\snot\sset\sthe\sPGHDR_NEED_SYNC\sflag\son\sa\spage\sif\san\sIO\serror\soccured\swhile\sattempting\sto\sjournal\sit.\s(CVS\s6887)
+D 2009-07-13T11:22:10
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -106,7 +106,7 @@ F src/auth.c 802a9439dfa0b8c208b10055cba400e82ef18025
 F src/backup.c 6f1c2d9862c8a3feb7739dfcca02c1f5352e37f3
 F src/bitvec.c 0ef0651714728055d43de7a4cdd95e703fac0119
 F src/btmutex.c 9b899c0d8df3bd68f527b0afe03088321b696d3c
-F src/btree.c a65e2050dacd0a5dc046c488f351588146fd5e3e
+F src/btree.c 39559c172e4f970d53fd2dbb7cf25641613eec47
 F src/btree.h e53a10fd31d16c60a86f03c9467a6f470aa3683b
 F src/btreeInt.h a568bf057aa249eb06fd31358b4393a5ac88c118
 F src/build.c 867028ee9f63f7bc8eb8d4a720bb98cf9b9a12b4
@@ -147,7 +147,7 @@ F src/os_common.h 8c61457df58f1a4bd5f5adc3e90e01b37bf7afbc
 F src/os_os2.c bed77dc26e3a95ce4a204936b9a1ca6fe612fcc5
 F src/os_unix.c cdb2a08b9ce4aa13b3f7b91d4dd60fb48be9f56a
 F src/os_win.c 725c38a524d168ce280446ad8761d731bc516405
-F src/pager.c e442d1caaeb30ab197d65514bdf41bba090800d6
+F src/pager.c 3bad5d2bfe5947b6accc3c47a97dce8ace90fa0c
 F src/pager.h 5aec418bf99f568b92ae82816a1463400513726d
 F src/parse.y bcd46d43fbd23a22b8c020a3eb1806b794794ed5
 F src/pcache.c 395f752a13574120bd7513a400ba02a265aaa76d
@@ -740,7 +740,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
-P 39ce2097da03176e256a2ff35bb857e578f3ca2d
-R 0dc08162ecc49e81bc056e17b96d72d2
+P 3151dab9c78106217ec80ebadc666dfd11b42029
+R bbef3bf03d7fab733bcd5fbb4e72b8d8
 U danielk1977
-Z b2bdf8d1bff20b39f70f8c184167a4bf
+Z e3d416373420438c306f7dfa40b1190f
index 4dc2ef6e690420ce18fb1ed32a5f85e2269aada0..cd2fcd9d6121b761dbc53ae3a4cef5c27fd25603 100644 (file)
@@ -1 +1 @@
-3151dab9c78106217ec80ebadc666dfd11b42029
\ No newline at end of file
+b9be365d85fddedbfa93eebf3ee62a140cbaa426
\ No newline at end of file
index 07d4bcfd8376024b581b00b4dffb678f58932da1..7c836b8a5931774136a9ed213bccc470557f887d 100644 (file)
@@ -9,7 +9,7 @@
 **    May you share freely, never taking more than you give.
 **
 *************************************************************************
-** $Id: btree.c,v 1.684 2009/07/13 09:41:45 danielk1977 Exp $
+** $Id: btree.c,v 1.685 2009/07/13 11:22:10 danielk1977 Exp $
 **
 ** This file implements a external (disk-based) database using BTrees.
 ** See the header comment on "btreeInt.h" for additional information.
@@ -3902,6 +3902,11 @@ const void *sqlite3BtreeDataFetch(BtCursor *pCur, int *pAmt){
 /*
 ** Move the cursor down to a new child page.  The newPgno argument is the
 ** page number of the child page to move to.
+**
+** This function returns SQLITE_CORRUPT if the page-header flags field of
+** the new child page does not match the flags field of the parent (i.e.
+** if an intkey page appears to be the parent of a non-intkey page, or
+** vice-versa).
 */
 static int moveToChild(BtCursor *pCur, u32 newPgno){
   int rc;
index 0ee445717689526d81cf0c0e0abae9a0276f5c01..0b2c7870caf9da58efdd4ea52953997080ae0183 100644 (file)
@@ -18,7 +18,7 @@
 ** file simultaneously, or one process from reading the database while
 ** another is writing.
 **
-** @(#) $Id: pager.c,v 1.606 2009/07/12 02:31:37 drh Exp $
+** @(#) $Id: pager.c,v 1.607 2009/07/13 11:22:10 danielk1977 Exp $
 */
 #ifndef SQLITE_OMIT_DISKIO
 #include "sqliteInt.h"
@@ -4404,7 +4404,7 @@ int sqlite3PagerWrite(DbPage *pDbPage){
     ** journal file must contain sync()ed copies of all of them
     ** before any of them can be written out to the database file.
     */
-    if( needSync ){
+    if( rc==SQLITE_OK && needSync ){
       assert( !MEMDB && pPager->noSync==0 );
       for(ii=0; ii<nPage && needSync; ii++){
         PgHdr *pPage = pager_lookup(pPager, pg1+ii);