More simplifications to pager.c. (CVS 6939)
FossilOrigin-Name: 533d6cc67a3b6467db5b83c5ca535d229d36ad27
This commit is contained in:
parent
5e1fa03dca
commit
b75d570ef8
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Simplifications\sand\scomment\simprovements\sto\spager.c\sin\ssupport\sof\scoverage\ntesting.\s(CVS\s6938)
|
||||
D 2009-07-25T15:24:14
|
||||
C More\ssimplifications\sto\spager.c.\s(CVS\s6939)
|
||||
D 2009-07-25T17:08:36
|
||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||
F Makefile.in df9359da7a726ccb67a45db905c5447d5c00c6ef
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -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 9ba1c7412f5f8fc1c98d0662a81f3842b0995300
|
||||
F src/pager.c e9d23aef33b7669ab7df24070d371f7e5d21cca1
|
||||
F src/pager.h 11852d044c86cf5a9d6e34171fb0c4fcf1f6265f
|
||||
F src/parse.y bcd46d43fbd23a22b8c020a3eb1806b794794ed5
|
||||
F src/pcache.c c92ffd4f3e1279b3766854c6d18b5bf4aac0d1fa
|
||||
@ -738,7 +738,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
|
||||
P cc9430e334fe98e1c35d408f81a2d8953377cda6
|
||||
R e5fb6459ed2755d7a158ac65e619d65e
|
||||
P 5b70b5c19cd587a8afbf2909ac7a4c04aea20f44
|
||||
R 54d659d40a4c9377c5cad3305a635f7a
|
||||
U drh
|
||||
Z ab499bece38a6094beca9b024b831cb1
|
||||
Z a386f47c7cec36b7a24969141c7a96bc
|
||||
|
@ -1 +1 @@
|
||||
5b70b5c19cd587a8afbf2909ac7a4c04aea20f44
|
||||
533d6cc67a3b6467db5b83c5ca535d229d36ad27
|
21
src/pager.c
21
src/pager.c
@ -18,7 +18,7 @@
|
||||
** file simultaneously, or one process from reading the database while
|
||||
** another is writing.
|
||||
**
|
||||
** @(#) $Id: pager.c,v 1.623 2009/07/25 15:24:14 drh Exp $
|
||||
** @(#) $Id: pager.c,v 1.624 2009/07/25 17:08:36 drh Exp $
|
||||
*/
|
||||
#ifndef SQLITE_OMIT_DISKIO
|
||||
#include "sqliteInt.h"
|
||||
@ -1179,21 +1179,8 @@ static int pager_error(Pager *pPager, int rc){
|
||||
pPager->errCode==SQLITE_OK ||
|
||||
(pPager->errCode & 0xff)==SQLITE_IOERR
|
||||
);
|
||||
if(
|
||||
rc2==SQLITE_FULL ||
|
||||
rc2==SQLITE_IOERR ||
|
||||
rc2==SQLITE_CORRUPT
|
||||
){
|
||||
if( rc2==SQLITE_FULL || rc2==SQLITE_IOERR ){
|
||||
pPager->errCode = rc;
|
||||
if( pPager->state==PAGER_UNLOCK
|
||||
&& sqlite3PcacheRefCount(pPager->pPCache)==0
|
||||
){
|
||||
/* If the pager is already unlocked, call pager_unlock() now to
|
||||
** clear the error state and ensure that the pager-cache is
|
||||
** completely empty.
|
||||
*/
|
||||
pager_unlock(pPager);
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
@ -3065,7 +3052,9 @@ static int pagerStress(void *p, PgHdr *pPg){
|
||||
** Similarly, if the pager has already entered the error state, do not
|
||||
** try to write the contents of pPg to disk.
|
||||
*/
|
||||
if( pPager->errCode || (pPager->doNotSync && pPg->flags&PGHDR_NEED_SYNC) ){
|
||||
if( NEVER(pPager->errCode)
|
||||
|| (pPager->doNotSync && pPg->flags&PGHDR_NEED_SYNC)
|
||||
){
|
||||
return SQLITE_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user