diff --git a/manifest b/manifest index 963910fbb8..faae73aec6 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Change\sa\scondition\sto\sa\s'%'\soperator\sin\sbitvec.c.\s(CVS\s6940) -D 2009-07-25T17:33:26 +C Change\san\sunreachable\scondition\sin\sPagerSharedLock\sto\sa\sNEVER(...).\sAdd\san\sassert\sto\spager_error()\sto\sshow\sthat\sit\sis\snever\scalled\sto\sput\san\sin-memory\spager\sto\sthe\serror-state.\s(CVS\s6941) +D 2009-07-25T17:39:14 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 e9d23aef33b7669ab7df24070d371f7e5d21cca1 +F src/pager.c f050740b628e564d10b7269170f7c62e91286a84 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 533d6cc67a3b6467db5b83c5ca535d229d36ad27 -R b24dc1060c0e41c7234c2870603ba4a6 -U drh -Z 737abbbb5ad16338e62e8e8aa8bd1e9e +P 10250fe5c039dbef2e1614e6320f7bd354c10211 +R 99775dd1d9caf07f15aac6d35493d7a6 +U danielk1977 +Z 48c380c40fd307d2d3f58af91056b3e0 diff --git a/manifest.uuid b/manifest.uuid index 7109966077..522dec353e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -10250fe5c039dbef2e1614e6320f7bd354c10211 \ No newline at end of file +1d931f77519baf3586708c77cbd161c0e75bcbaf \ No newline at end of file diff --git a/src/pager.c b/src/pager.c index f69a83e7ca..847e454097 100644 --- a/src/pager.c +++ b/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.624 2009/07/25 17:08:36 drh Exp $ +** @(#) $Id: pager.c,v 1.625 2009/07/25 17:39:14 danielk1977 Exp $ */ #ifndef SQLITE_OMIT_DISKIO #include "sqliteInt.h" @@ -1174,6 +1174,7 @@ static void pager_unlock(Pager *pPager){ */ static int pager_error(Pager *pPager, int rc){ int rc2 = rc & 0xff; + assert( rc==SQLITE_OK || !MEMDB ); assert( pPager->errCode==SQLITE_FULL || pPager->errCode==SQLITE_OK || @@ -3597,12 +3598,13 @@ int sqlite3PagerSharedLock(Pager *pPager){ /* This routine is only called from b-tree and only when there are no ** outstanding pages */ assert( sqlite3PcacheRefCount(pPager->pPCache)==0 ); + if( NEVER(MEMDB && pPager->errCode) ){ return pPager->errCode; } /* If this database is in an error-state, now is a chance to clear ** the error. Discard the contents of the pager-cache and rollback ** any hot journal in the file-system. */ - if( !MEMDB && pPager->errCode ){ + if( pPager->errCode ){ if( isOpen(pPager->jfd) || pPager->zJournal ){ isErrorReset = 1; } @@ -3610,14 +3612,6 @@ int sqlite3PagerSharedLock(Pager *pPager){ pager_reset(pPager); } - /* If the pager is still in an error state, do not proceed. The error - ** state will be cleared at some point in the future when all page - ** references are dropped and the cache can be discarded. - */ - if( pPager->errCode && pPager->errCode!=SQLITE_FULL ){ - return pPager->errCode; - } - if( pPager->state==PAGER_UNLOCK || isErrorReset ){ sqlite3_vfs * const pVfs = pPager->pVfs; int isHotJournal = 0;