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

Update to walRestartLog() function to make it shorter easier to merge with branch "bedrock".

FossilOrigin-Name: 88d7fb2aef882fc41a4f9c1bdd2f0162289e90d62df50af1b0eb6994c5c94c28
This commit is contained in:
dan
2024-12-14 17:19:06 +00:00
parent 3d6fbe469b
commit 686166eb32
3 changed files with 10 additions and 9 deletions

View File

@@ -4613,7 +4613,9 @@ static int walRestartLog(Wal *pWal){
** Condition (b) guarantees that wal file !iApp is either empty or
** completely checkpointed.
*/
if( (pWal->readLock==WAL_LOCK_PART1 || pWal->readLock==WAL_LOCK_PART2)
assert( (0*3)+1==WAL_LOCK_PART1 ); /* iApp==0 -> require WAL_LOCK_PART1 */
assert( (1*3)+1==WAL_LOCK_PART2 ); /* iApp==1 -> require WAL_LOCK_PART2 */
if( pWal->readLock==(iApp*3)+1
&& walidxGetMxFrame(&pWal->hdr, iApp)>=nWalSize
){
rc = wal2RestartOk(pWal, iApp);