Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Remove the SQLITE_CONFIG_WORKER_THREADS configuration parameter. The number of worker threads in the sorter is now determined only by the PRAGMA threads=N setting. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | threads |
Files: | files | file ages | folders |
SHA1: |
e3305d4b4efcbe06945ce7f6ec0f2e86 |
User & Date: | drh 2014-08-25 23:44:44.281 |
Context
2014-08-29
| ||
14:40 | Merge recent performance enhancements from trunk onto the threads branch. (check-in: 35c44a3c73 user: drh tags: threads) | |
2014-08-25
| ||
23:44 | Remove the SQLITE_CONFIG_WORKER_THREADS configuration parameter. The number of worker threads in the sorter is now determined only by the PRAGMA threads=N setting. (check-in: e3305d4b4e user: drh tags: threads) | |
22:43 | Merge the CAST operator enhancements from trunk. (check-in: 6c8f86e4e0 user: drh tags: threads) | |
Changes
Changes to src/global.c.
︙ | |||
163 164 165 166 167 168 169 | 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | - | 0, /* szScratch */ 0, /* nScratch */ (void*)0, /* pPage */ 0, /* szPage */ 0, /* nPage */ 0, /* mxParserStack */ 0, /* sharedCacheEnabled */ |
︙ |
Changes to src/main.c.
︙ | |||
511 512 513 514 515 516 517 | 511 512 513 514 515 516 517 518 519 520 521 522 523 524 | - - - - - - - - - | #if SQLITE_OS_WIN && defined(SQLITE_WIN32_MALLOC) case SQLITE_CONFIG_WIN32_HEAPSIZE: { sqlite3GlobalConfig.nHeap = va_arg(ap, int); break; } #endif |
︙ |
Changes to src/pragma.c.
︙ | |||
2288 2289 2290 2291 2292 2293 2294 | 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 | - + | case PragTyp_THREADS: { sqlite3_int64 N; if( sqlite3GlobalConfig.bCoreMutex && zRight && sqlite3DecOrHexToI64(zRight, &N)==SQLITE_OK && N>=0 ){ |
︙ |
Changes to src/shell.c.
︙ | |||
3814 3815 3816 3817 3818 3819 3820 | 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 | - | data->mode = MODE_List; memcpy(data->separator,"|", 2); memcpy(data->newline,"\r\n", 3); data->showHeader = 0; sqlite3_config(SQLITE_CONFIG_URI, 1); sqlite3_config(SQLITE_CONFIG_LOG, shellLog, data); sqlite3_config(SQLITE_CONFIG_MULTITHREAD); |
︙ |
Changes to src/sqlite.h.in.
︙ | |||
1714 1715 1716 1717 1718 1719 1720 | 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 | - - - - - - - - - - | ** [[SQLITE_CONFIG_WIN32_HEAPSIZE]] ** <dt>SQLITE_CONFIG_WIN32_HEAPSIZE ** <dd>^This option is only available if SQLite is compiled for Windows ** with the [SQLITE_WIN32_MALLOC] pre-processor macro defined. ** SQLITE_CONFIG_WIN32_HEAPSIZE takes a 32-bit unsigned integer value ** that specifies the maximum size of the created heap. ** </dl> |
︙ | |||
1748 1749 1750 1751 1752 1753 1754 | 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 | - | #define SQLITE_CONFIG_URI 17 /* int */ #define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */ #define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */ #define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */ #define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */ #define SQLITE_CONFIG_MMAP_SIZE 22 /* sqlite3_int64, sqlite3_int64 */ #define SQLITE_CONFIG_WIN32_HEAPSIZE 23 /* int nByte */ |
︙ |
Changes to src/sqliteInt.h.
︙ | |||
437 438 439 440 441 442 443 444 445 | 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 | + - + | /* ** If no value has been provided for SQLITE_MAX_WORKER_THREADS, or if ** SQLITE_TEMP_STORE is set to 3 (never use temporary files), set it ** to zero. */ #if SQLITE_TEMP_STORE==3 # undef SQLITE_MAX_WORKER_THREADS # define SQLITE_MAX_WORKER_THREADS 0 #endif #ifndef SQLITE_MAX_WORKER_THREADS |
︙ | |||
2760 2761 2762 2763 2764 2765 2766 | 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 | - | int szScratch; /* Size of each scratch buffer */ int nScratch; /* Number of scratch buffers */ void *pPage; /* Page cache memory */ int szPage; /* Size of each page in pPage[] */ int nPage; /* Number of pages in pPage[] */ int mxParserStack; /* maximum depth of the parser stack */ int sharedCacheEnabled; /* true if shared-cache mode enabled */ |
︙ |
Changes to src/test_malloc.c.
︙ | |||
1249 1250 1251 1252 1253 1254 1255 | 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 | - - - - - - - - - - - - - - - - - - - - - - - - - | rc = sqlite3_config(SQLITE_CONFIG_COVERING_INDEX_SCAN, bUseCis); Tcl_SetResult(interp, (char *)sqlite3ErrName(rc), TCL_VOLATILE); return TCL_OK; } |
︙ | |||
1528 1529 1530 1531 1532 1533 1534 | 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 | - | { "sqlite3_config_heap", test_config_heap ,0 }, { "sqlite3_config_heap_size", test_config_heap_size ,0 }, { "sqlite3_config_memstatus", test_config_memstatus ,0 }, { "sqlite3_config_lookaside", test_config_lookaside ,0 }, { "sqlite3_config_error", test_config_error ,0 }, { "sqlite3_config_uri", test_config_uri ,0 }, { "sqlite3_config_cis", test_config_cis ,0 }, |
︙ |
Changes to src/vdbesort.c.
︙ | |||
791 792 793 794 795 796 797 | 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 | + + + + + + - - + + - - + + | VdbeSorter *pSorter; /* The new sorter */ KeyInfo *pKeyInfo; /* Copy of pCsr->pKeyInfo with db==0 */ int szKeyInfo; /* Size of pCsr->pKeyInfo in bytes */ int sz; /* Size of pSorter in bytes */ int rc = SQLITE_OK; #if SQLITE_MAX_WORKER_THREADS==0 # define nWorker 0 #else int nWorker = sqlite3TempInMemory(db) ? 0 : db->mxWorker ; #endif /* Do not allow the total number of threads (main thread + all workers) ** to exceed the maximum merge count */ |
︙ |
Changes to test/sort.test.
︙ | |||
540 541 542 543 544 545 546 | 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 | - - + + | 4 1000000 3 file true false 0 5 0 0 memory false true 0 6 0 0 file false true 1000000 7 0 0 file false true 10000 } { db close sqlite3_shutdown |
︙ | |||
598 599 600 601 602 603 604 | 598 599 600 601 602 603 604 605 606 607 608 609 610 611 | - | } [list 2 $one 4 $ten] sorter_test_fakeheap 0 } db close sqlite3_shutdown |
︙ | |||
633 634 635 636 637 638 639 | 632 633 634 635 636 637 638 | - | reset_db do_execsql_test 17.1 { SELECT * FROM sqlite_master ORDER BY sql; } {} finish_test |
Changes to test/sort2.test.
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - - + | source $testdir/tester.tcl set testprefix sort2 foreach {tn script} { 1 { } 2 { catch { db close } |
︙ | |||
72 73 74 75 76 77 78 | 71 72 73 74 75 76 77 78 79 80 | - - - - - - - | SELECT x+1, randomblob(100) FROM r LIMIT 1000000 ) SELECT count(x), length(y) FROM r GROUP BY (x%5) } { 200000 100 200000 100 200000 100 200000 100 200000 100 } |
Changes to test/sort4.test.
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - - - + - - | # set testdir [file dirname $argv0] source $testdir/tester.tcl set testprefix sort4 # Configure the sorter to use 3 background threads. |
︙ | |||
186 187 188 189 190 191 192 | 182 183 184 185 186 187 188 189 | - - - - - | do_sorter_test $t.8 -repeats 10 -rows 100000 -read 10000 -cachesize 250 set iNow [clock_seconds] if {$iNow>=$iTimeLimit} break do_test "$testprefix-([expr $iTimeLimit-$iNow] seconds remain)" {} {} } |
Changes to test/sortfault.test.
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | - - - + | 1 0 0 file multithread false false 2 100000 0 file multithread false false 3 100000 1 file multithread false false 4 2000000 0 file singlethread false true } { if {$sqlite_options(threadsafe)} { set threadsmode singlethread } |
︙ | |||
106 107 108 109 110 111 112 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | - | sqlite3_memdebug_vfs_oom_test 1 } } catch { db close } sqlite3_shutdown |
︙ | |||
162 163 164 165 166 167 168 | 159 160 161 162 163 164 165 | - | do_faultsim_test 5.1 -faults oom* -body { execsql { SELECT * FROM t1 ORDER BY a } } -test { faultsim_test_result [list 0 [list $::a $::b $::c $::c $::b $::a]] } finish_test |