aboutsummaryrefslogtreecommitdiff
path: root/src/btree.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2014-11-04 13:41:32 +0000
committerdrh <drh@noemail.net>2014-11-04 13:41:32 +0000
commit5279d3433c2ef6089559eb65d3ed1a3e298cc3b3 (patch)
treeec2f6d366c8cae7ad9d2847699ffbcd1cdf9a3b7 /src/btree.c
parentdef6889d214a04780390df0aa77efcd5011620cf (diff)
downloadsqlite-5279d3433c2ef6089559eb65d3ed1a3e298cc3b3.tar.gz
sqlite-5279d3433c2ef6089559eb65d3ed1a3e298cc3b3.zip
Improved documentation and addition of source-code evidence marks for the
sqlite3_config() interface. FossilOrigin-Name: 681031a436fdd4cce426d6cd43cbae6b83167d26
Diffstat (limited to 'src/btree.c')
-rw-r--r--src/btree.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/btree.c b/src/btree.c
index f815e85a6..6fe8e10f3 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -6649,7 +6649,13 @@ static int balance_nonroot(
nMaxCells*sizeof(u8*) /* apCell */
+ nMaxCells*sizeof(u16) /* szCell */
+ pBt->pageSize; /* aSpace1 */
- assert( szScratch<=16896 || szScratch<=6*pBt->pageSize );
+
+ /* EVIDENCE-OF: R-37926-08392 SQLite will never request a scratch buffer
+ ** that is more than 6 times the database page size, except when
+ ** performing a checkpoint in WAL mode when the scratch buffer request
+ ** size is a small fraction of the size of the WAL file. */
+ assert( szScratch<=6*pBt->pageSize );
+
apCell = sqlite3ScratchMalloc( szScratch );
if( apCell==0 ){
rc = SQLITE_NOMEM;