mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Add "#ifndef NDEBUG" around sqlite3pager_iswriteable() (only used in assert() expressions). Also set the internal page number of a page to zero if it fails to initialise. (CVS 3005)
FossilOrigin-Name: 77969c671c6ea1b5a2739f62de2bec10cc651b9e
This commit is contained in:
14
manifest
14
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Changes\sto\sthe\senc2.test\sscript\sso\sthat\sit\swill\srun\son\swindows.\s(CVS\s3004)
|
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-23T15:59:55
|
D 2006-01-23T16:21:06
|
||||||
F Makefile.in ab3ffd8d469cef4477257169b82810030a6bb967
|
F Makefile.in ab3ffd8d469cef4477257169b82810030a6bb967
|
||||||
F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
|
F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
|
||||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||||
@@ -59,7 +59,7 @@ F src/os_unix.c 38a55e51fb2c6f32c0ce86d274f5787f6c3668ed
|
|||||||
F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
|
F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
|
||||||
F src/os_win.c 438e6587e1767c51e9e0e781e3bb52f72764e67b
|
F src/os_win.c 438e6587e1767c51e9e0e781e3bb52f72764e67b
|
||||||
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
|
||||||
F src/pager.c d94bad3ef24095d20f7ca355506daca53d4dec19
|
F src/pager.c b101634a093451017068c4fd80af966bd5042edc
|
||||||
F src/pager.h e0acb095b3ad0bca48f2ab00c87346665643f64f
|
F src/pager.h e0acb095b3ad0bca48f2ab00c87346665643f64f
|
||||||
F src/parse.y 4285cd2d0f31a8db4c4d54325f88e500452fa029
|
F src/parse.y 4285cd2d0f31a8db4c4d54325f88e500452fa029
|
||||||
F src/pragma.c 4496cc77dc35824e1c978c3d1413b8a5a4c777d3
|
F src/pragma.c 4496cc77dc35824e1c978c3d1413b8a5a4c777d3
|
||||||
@@ -344,7 +344,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
|
|||||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||||
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
|
F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
|
||||||
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
||||||
P 436287c2bfe38cf6c39e4c52b1da12f8c0d673ce
|
P 4c1818ecebc79f5f7e5f4a7843b5fae02a251f47
|
||||||
R 1a68a7d8604e1e5b02bbaa8f0bd1e544
|
R dc39c66443bc66c77af27ec2ccf42213
|
||||||
U drh
|
U danielk1977
|
||||||
Z c85ece09f113345efc1b6dc383dc0358
|
Z dc9d99a7bc9530a8fd2d3dd016484ec8
|
||||||
|
@@ -1 +1 @@
|
|||||||
4c1818ecebc79f5f7e5f4a7843b5fae02a251f47
|
77969c671c6ea1b5a2739f62de2bec10cc651b9e
|
@@ -18,7 +18,7 @@
|
|||||||
** file simultaneously, or one process from reading the database while
|
** file simultaneously, or one process from reading the database while
|
||||||
** another is writing.
|
** 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
|
#ifndef SQLITE_OMIT_DISKIO
|
||||||
#include "sqliteInt.h"
|
#include "sqliteInt.h"
|
||||||
@@ -2695,6 +2695,7 @@ int sqlite3pager_get(Pager *pPager, Pgno pgno, void **ppPage){
|
|||||||
if( rc2!=SQLITE_OK || fileSize>=pgno*pPager->pageSize ){
|
if( rc2!=SQLITE_OK || fileSize>=pgno*pPager->pageSize ){
|
||||||
/* An IO error occured in one of the the sqlite3OsSeek() or
|
/* An IO error occured in one of the the sqlite3OsSeek() or
|
||||||
** sqlite3OsRead() calls above. */
|
** sqlite3OsRead() calls above. */
|
||||||
|
pPg->pgno = 0;
|
||||||
sqlite3pager_unref(PGHDR_TO_DATA(pPg));
|
sqlite3pager_unref(PGHDR_TO_DATA(pPg));
|
||||||
return rc;
|
return rc;
|
||||||
}else{
|
}else{
|
||||||
@@ -3111,10 +3112,12 @@ int sqlite3pager_write(void *pData){
|
|||||||
** to sqlite3pager_write(). In other words, return TRUE if it is ok
|
** to sqlite3pager_write(). In other words, return TRUE if it is ok
|
||||||
** to change the content of the page.
|
** to change the content of the page.
|
||||||
*/
|
*/
|
||||||
|
#ifndef NDEBUG
|
||||||
int sqlite3pager_iswriteable(void *pData){
|
int sqlite3pager_iswriteable(void *pData){
|
||||||
PgHdr *pPg = DATA_TO_PGHDR(pData);
|
PgHdr *pPg = DATA_TO_PGHDR(pData);
|
||||||
return pPg->dirty;
|
return pPg->dirty;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef SQLITE_OMIT_VACUUM
|
#ifndef SQLITE_OMIT_VACUUM
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user