]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add "#ifndef NDEBUG" around sqlite3pager_iswriteable() (only used in assert() express...
authordanielk1977 <danielk1977@noemail.net>
Mon, 23 Jan 2006 16:21:05 +0000 (16:21 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Mon, 23 Jan 2006 16:21:05 +0000 (16:21 +0000)
FossilOrigin-Name: 77969c671c6ea1b5a2739f62de2bec10cc651b9e

manifest
manifest.uuid
src/pager.c

index 57e0b9b5922263360bc07e26b5fb0c2931975ac0..8306f9ed20aec617ba132bd28b70c90276b78991 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Changes\sto\sthe\senc2.test\sscript\sso\sthat\sit\swill\srun\son\swindows.\s(CVS\s3004)
-D 2006-01-23T15:59:55
+C Add\s"#ifndef\sNDEBUG"\saround\ssqlite3pager_iswriteable()\s(only\sused\sin\sassert()\sexpressions).\sAlso\sset\sthe\sinternal\spage\snumber\sof\sa\spage\sto\szero\sif\sit\sfails\sto\sinitialise.\s(CVS\s3005)
+D 2006-01-23T16:21:06
 F Makefile.in ab3ffd8d469cef4477257169b82810030a6bb967
 F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -59,7 +59,7 @@ F src/os_unix.c 38a55e51fb2c6f32c0ce86d274f5787f6c3668ed
 F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
 F src/os_win.c 438e6587e1767c51e9e0e781e3bb52f72764e67b
 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
-F src/pager.c d94bad3ef24095d20f7ca355506daca53d4dec19
+F src/pager.c b101634a093451017068c4fd80af966bd5042edc
 F src/pager.h e0acb095b3ad0bca48f2ab00c87346665643f64f
 F src/parse.y 4285cd2d0f31a8db4c4d54325f88e500452fa029
 F src/pragma.c 4496cc77dc35824e1c978c3d1413b8a5a4c777d3
@@ -344,7 +344,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
 F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 436287c2bfe38cf6c39e4c52b1da12f8c0d673ce
-R 1a68a7d8604e1e5b02bbaa8f0bd1e544
-U drh
-Z c85ece09f113345efc1b6dc383dc0358
+P 4c1818ecebc79f5f7e5f4a7843b5fae02a251f47
+R dc39c66443bc66c77af27ec2ccf42213
+U danielk1977
+Z dc9d99a7bc9530a8fd2d3dd016484ec8
index 57a2a3f5fed88de0f56aa7e2a5dad011dfc58488..101ca25c3134958e49f4de9d4ba84e0b9e95008f 100644 (file)
@@ -1 +1 @@
-4c1818ecebc79f5f7e5f4a7843b5fae02a251f47
\ No newline at end of file
+77969c671c6ea1b5a2739f62de2bec10cc651b9e
\ No newline at end of file
index 524b690d2ef7b784d9332e94e949b9f0932af248..6d9857e0247d5e64c9df02ed0f9be1e6381a0452 100644 (file)
@@ -18,7 +18,7 @@
 ** file simultaneously, or one process from reading the database while
 ** another is writing.
 **
-** @(#) $Id: pager.c,v 1.253 2006/01/23 15:39:59 drh Exp $
+** @(#) $Id: pager.c,v 1.254 2006/01/23 16:21:06 danielk1977 Exp $
 */
 #ifndef SQLITE_OMIT_DISKIO
 #include "sqliteInt.h"
@@ -2695,6 +2695,7 @@ int sqlite3pager_get(Pager *pPager, Pgno pgno, void **ppPage){
         if( rc2!=SQLITE_OK || fileSize>=pgno*pPager->pageSize ){
          /* An IO error occured in one of the the sqlite3OsSeek() or
           ** sqlite3OsRead() calls above. */
+          pPg->pgno = 0;
           sqlite3pager_unref(PGHDR_TO_DATA(pPg));
           return rc;
         }else{
@@ -3111,10 +3112,12 @@ int sqlite3pager_write(void *pData){
 ** to sqlite3pager_write().  In other words, return TRUE if it is ok
 ** to change the content of the page.
 */
+#ifndef NDEBUG
 int sqlite3pager_iswriteable(void *pData){
   PgHdr *pPg = DATA_TO_PGHDR(pData);
   return pPg->dirty;
 }
+#endif
 
 #ifndef SQLITE_OMIT_VACUUM
 /*