aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2011-12-20 13:13:09 +0000
committerdrh <drh@noemail.net>2011-12-20 13:13:09 +0000
commit4120994fdf0b646fda4768b68dda16f0799fd0ff (patch)
tree00488301268be216497da2a992e40d435dd36454 /src
parent19969d96ce107f6e9bbbd8af83288f151299b517 (diff)
downloadsqlite-4120994fdf0b646fda4768b68dda16f0799fd0ff.tar.gz
sqlite-4120994fdf0b646fda4768b68dda16f0799fd0ff.zip
Assert that the isCommit parameter to sqlite3WalFrames() is zero if and
only if the nTruncate parameter is zero. FossilOrigin-Name: 979daf92e09305665d943e197b93b81139197c5b
Diffstat (limited to 'src')
-rw-r--r--src/wal.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wal.c b/src/wal.c
index 03c482554..fa44b66d3 100644
--- a/src/wal.c
+++ b/src/wal.c
@@ -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",