aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pcache.c10
-rw-r--r--src/sqliteLimit.h12
-rw-r--r--src/test_config.c1
3 files changed, 13 insertions, 10 deletions
diff --git a/src/pcache.c b/src/pcache.c
index 467e2b3de..d768fe00c 100644
--- a/src/pcache.c
+++ b/src/pcache.c
@@ -114,12 +114,20 @@ static void pcacheUnpin(PgHdr *p){
}
/*
-** Compute the number of pages of cache requested.
+** Compute the number of pages of cache requested. p->szCache is the
+** cache size requested by the "PRAGMA cache_size" statement.
+**
+**
*/
static int numberOfCachePages(PCache *p){
if( p->szCache>=0 ){
+ /* IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the
+ ** suggested cache size is set to N. */
return p->szCache;
}else{
+ /* IMPLEMENTATION-OF: R-61436-13639 If the argument N is negative, then
+ ** the number of cache pages is adjusted to use approximately abs(N*1024)
+ ** bytes of memory. */
return (int)((-1024*(i64)p->szCache)/(p->szPage+p->szExtra));
}
}
diff --git a/src/sqliteLimit.h b/src/sqliteLimit.h
index 3abad8437..75cad1274 100644
--- a/src/sqliteLimit.h
+++ b/src/sqliteLimit.h
@@ -101,18 +101,14 @@
** The suggested maximum number of in-memory pages to use for
** the main database table and for temporary tables.
**
-** EVIDENCE-OF: R-31093-59126 The default suggested cache size is 2000
-** pages.
-**
-** EVIDENCE-OF: R-45985-54577 The default cache sizes can be adjusted by
-** the SQLITE_DEFAULT_CACHE_SIZE compile-time options.
+** IMPLEMENTATION-OF: R-31093-59126 The default suggested cache size
+** is 2000 pages.
+** IMPLEMENTATION-OF: R-48205-43578 The default suggested cache size can be
+** altered using the SQLITE_DEFAULT_CACHE_SIZE compile-time options.
*/
#ifndef SQLITE_DEFAULT_CACHE_SIZE
# define SQLITE_DEFAULT_CACHE_SIZE 2000
#endif
-#ifndef SQLITE_DEFAULT_TEMP_CACHE_SIZE
-# define SQLITE_DEFAULT_TEMP_CACHE_SIZE 500
-#endif
/*
** The default number of frames to accumulate in the log file before
diff --git a/src/test_config.c b/src/test_config.c
index 25e6a5698..0be2a23d3 100644
--- a/src/test_config.c
+++ b/src/test_config.c
@@ -650,7 +650,6 @@ Tcl_SetVar2(interp, "sqlite_options", "mergesort", "1", TCL_GLOBAL_ONLY);
LINKVAR( MAX_PAGE_COUNT );
LINKVAR( MAX_LIKE_PATTERN_LENGTH );
LINKVAR( MAX_TRIGGER_DEPTH );
- LINKVAR( DEFAULT_TEMP_CACHE_SIZE );
LINKVAR( DEFAULT_CACHE_SIZE );
LINKVAR( DEFAULT_PAGE_SIZE );
LINKVAR( DEFAULT_FILE_FORMAT );