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:
@@ -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
|
||||
|
Reference in New Issue
Block a user