/ Check-in [75d98dae]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Do not do the bulk pcache1 allocations if SQLITE_CONFIG_PAGECACHE specifies a global page cache buffer.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | pcache-bulk-local
Files: files | file ages | folders
SHA1: 75d98dae676996a05e97b09b19e34463e8f30d51
User & Date: drh 2015-07-08 13:40:50
Context
2015-07-08
14:13
Comment fix. No changes to code. Closed-Leaf check-in: c1e2ed0e user: drh tags: pcache-bulk-local
13:40
Do not do the bulk pcache1 allocations if SQLITE_CONFIG_PAGECACHE specifies a global page cache buffer. check-in: 75d98dae user: drh tags: pcache-bulk-local
01:22
Avoid left-shifting bits into the sign of a signed integer, as such behavior is technically undefined. check-in: 9417b402 user: drh tags: pcache-bulk-local
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pcache1.c.

   698    698         pCache->nMin = 10;
   699    699         pGroup->nMinPage += pCache->nMin;
   700    700         pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
   701    701       }
   702    702       pcache1LeaveMutex(pGroup);
   703    703       /* Try to initialize the local bulk pagecache line allocation if using
   704    704       ** separate caches and if nPage!=0 */
   705         -    if( pcache1.separateCache && sqlite3GlobalConfig.nPage!=0 ){
          705  +    if( pcache1.separateCache
          706  +     && sqlite3GlobalConfig.nPage!=0
          707  +     && sqlite3GlobalConfig.pPage==0
          708  +    ){
   706    709         int szBulk;
   707    710         char *zBulk;
   708    711         sqlite3BeginBenignMalloc();
   709    712         if( sqlite3GlobalConfig.nPage>0 ){
   710    713           szBulk = pCache->szAlloc * sqlite3GlobalConfig.nPage;
   711    714         }else{
   712    715           szBulk = -1024*sqlite3GlobalConfig.nPage;