1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Assert that the isCommit parameter to sqlite3WalFrames() is zero if and

only if the nTruncate parameter is zero.

FossilOrigin-Name: 979daf92e09305665d943e197b93b81139197c5b
This commit is contained in:
drh
2011-12-20 13:13:09 +00:00
parent 19969d96ce
commit 4120994fdf
3 changed files with 12 additions and 8 deletions

View File

@@ -2691,6 +2691,10 @@ int sqlite3WalFrames(
assert( pList );
assert( pWal->writeLock );
/* If this frame set completes a transaction, then nTruncate>0. If
** nTruncate==0 then this frame set does not complete the transaction. */
assert( (isCommit!=0)==(nTruncate!=0) );
#if defined(SQLITE_TEST) && defined(SQLITE_DEBUG)
{ int cnt; for(cnt=0, p=pList; p; p=p->pDirty, cnt++){}
WALTRACE(("WAL%p: frame write begin. %d frames. mxFrame=%d. %s\n",