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

Avoid a branch in the commit logic that is unreachable when compiled

without SQLITE_ENABLE_BATCH_ATOMIC_WRITE.

FossilOrigin-Name: 271b8980c3bcd0403a40aec26681ec111be1d88d2d5d35199a85a10f09ad6920
This commit is contained in:
drh
2018-07-19 15:27:35 +00:00
parent b657f28bf6
commit b0b0230082
3 changed files with 9 additions and 10 deletions

View File

@@ -6515,6 +6515,7 @@ int sqlite3PagerCommitPhaseOne(
rc = sqlite3JournalCreate(pPager->jfd);
if( rc!=SQLITE_OK ){
sqlite3OsClose(pPager->jfd);
goto commit_phase_one_exit;
}
bBatch = 0;
}else{
@@ -6523,10 +6524,9 @@ int sqlite3PagerCommitPhaseOne(
}
#endif /* SQLITE_ENABLE_BATCH_ATOMIC_WRITE */
if( bBatch==0 && rc==SQLITE_OK ){
if( bBatch==0 ){
rc = pager_write_pagelist(pPager, pList);
}
if( rc!=SQLITE_OK ){
assert( rc!=SQLITE_IOERR_BLOCKED );
goto commit_phase_one_exit;