1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

In the sorter, only use large memory allocations if scratch memory has not

been configured.  Add #ifdefs to disable unused code when 
SQLITE_MAX_WORKER_THREADS is zero.  Other sorter changes in support
of testability.

FossilOrigin-Name: d7e2b0d9cb099eda3341bc934bedff9facfe88bd
This commit is contained in:
drh
2014-05-12 15:30:00 +00:00
parent ae289fccbf
commit b0f935e4da
4 changed files with 49 additions and 24 deletions

View File

@@ -516,9 +516,11 @@ int sqlite3_config(int op, ...){
#endif
case SQLITE_CONFIG_WORKER_THREADS: {
#if SQLITE_MAX_WORKER_THREADS>0
int n = va_arg(ap, int);
if( n>SQLITE_MAX_WORKER_THREADS ) n = SQLITE_MAX_WORKER_THREADS;
if( n>=0 ) sqlite3GlobalConfig.nWorker = n;
#endif
break;
}