diff options
author | drh <drh@noemail.net> | 2008-11-19 01:20:26 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2008-11-19 01:20:26 +0000 |
commit | b232c23297248eb0753cf036c99f4bece9df992a (patch) | |
tree | 1131a6c766216f9a071bac0119ed202a6f377332 /src/main.c | |
parent | 4c6517848fac8fa107bbd746171f37e57380be3f (diff) | |
download | sqlite-b232c23297248eb0753cf036c99f4bece9df992a.tar.gz sqlite-b232c23297248eb0753cf036c99f4bece9df992a.zip |
Add an alternative application-defined pcache implementation and add test
cases to permutations.test to invoke it. Added the SQLITE_CONFIG_GETPCACHE
method to sqlite3_config(). (CVS 5920)
FossilOrigin-Name: 16f1e6ec2ad92f68c0079a0c2b5ca08a3b4af816
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index 3662697fe..16f89b785 100644 --- a/src/main.c +++ b/src/main.c @@ -14,7 +14,7 @@ ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** -** $Id: main.c,v 1.512 2008/11/13 14:28:29 danielk1977 Exp $ +** $Id: main.c,v 1.513 2008/11/19 01:20:26 drh Exp $ */ #include "sqliteInt.h" #include <ctype.h> @@ -315,6 +315,14 @@ int sqlite3_config(int op, ...){ break; } + case SQLITE_CONFIG_GETPCACHE: { + if( sqlite3GlobalConfig.pcache.xInit==0 ){ + sqlite3PCacheSetDefault(); + } + *va_arg(ap, sqlite3_pcache_methods*) = sqlite3GlobalConfig.pcache; + break; + } + #if defined(SQLITE_ENABLE_MEMSYS3) || defined(SQLITE_ENABLE_MEMSYS5) case SQLITE_CONFIG_HEAP: { /* Designate a buffer for heap memory space */ |