1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Remove a NEVER() in pager that can in fact be reached in obscure failure

cases.

FossilOrigin-Name: 42b8bd1c70d8dbbc4a59e2fdee8654c4fe84f979
This commit is contained in:
drh
2010-06-26 19:02:33 +00:00
parent 6ce60746c1
commit afb15027e8
3 changed files with 22 additions and 11 deletions

View File

@@ -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