aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2010-06-26 19:02:33 +0000
committerdrh <drh@noemail.net>2010-06-26 19:02:33 +0000
commitafb15027e836b63ee471efeb7c7ccfc3834a62fe (patch)
treebc63ba25c8c103321ea90ed9a87399284d5ee326 /src
parent6ce60746c19d9ea9ae9c2af65094f406309db423 (diff)
downloadsqlite-afb15027e836b63ee471efeb7c7ccfc3834a62fe.tar.gz
sqlite-afb15027e836b63ee471efeb7c7ccfc3834a62fe.zip
Remove a NEVER() in pager that can in fact be reached in obscure failure
cases. FossilOrigin-Name: 42b8bd1c70d8dbbc4a59e2fdee8654c4fe84f979
Diffstat (limited to 'src')
-rw-r--r--src/pager.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pager.c b/src/pager.c
index 1552f6dcd..3f3905627 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -5280,10 +5280,11 @@ int sqlite3PagerCommitPhaseTwo(Pager *pPager){
if( NEVER(pPager->errCode) ) return pPager->errCode;
/* This function should not be called if the pager is not in at least
- ** PAGER_RESERVED state. And indeed SQLite never does this. But it is
- ** nice to have this defensive test here anyway.
+ ** PAGER_RESERVED state. **FIXME**: Make it so that this test always
+ ** fails - make it so that we never reach this point if we do not hold
+ ** all necessary locks.
*/
- if( NEVER(pPager->state<PAGER_RESERVED) ) return SQLITE_ERROR;
+ if( pPager->state<PAGER_RESERVED ) return SQLITE_ERROR;
/* An optimization. If the database was not actually modified during
** this transaction, the pager is running in exclusive-mode and is