1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-05 04:30:38 +03:00

Improvements to the SQLITE_CONFIG_PAGECACHE documentation. Enhance the

command-line shell to be able to take advantage of the full range of
SQLITE_CONFIG_PAGECACHE capabilities, such as setting pMem==NULL and N<0.

FossilOrigin-Name: 2518d5c971c4b32d9227b3bb7259162e3e27b00b
This commit is contained in:
drh
2015-11-11 15:28:52 +00:00
parent 0c4105ee19
commit 3d38cec99a
4 changed files with 32 additions and 27 deletions

View File

@@ -4601,10 +4601,10 @@ int SQLITE_CDECL main(int argc, char **argv){
int n, sz;
sz = (int)integerValue(cmdline_option_value(argc,argv,++i));
if( sz>70000 ) sz = 70000;
if( sz<800 ) sz = 800;
if( sz<0 ) sz = 0;
n = (int)integerValue(cmdline_option_value(argc,argv,++i));
if( n<10 ) n = 10;
sqlite3_config(SQLITE_CONFIG_PAGECACHE, malloc(n*sz+1), sz, n);
sqlite3_config(SQLITE_CONFIG_PAGECACHE,
(n>0 && sz>0) ? malloc(n*sz) : 0, sz, n);
data.shellFlgs |= SHFLG_Pagecache;
}else if( strcmp(z,"-lookaside")==0 ){
int n, sz;