/ Check-in [1277932b]
Login

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

Overview
Comment:Fix a harmless compiler warning that crops up with SQLITE_MAX_MMAP_SIZE=0.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1277932b7e8bb36c7070ffafbf110a8e128c267b
User & Date: drh 2014-03-14 11:46:10
Context
2014-03-17
14:24
Performance enhancements and size reduction for sqlite3VXPrintf() check-in: eb071eb5 user: drh tags: trunk
2014-03-14
11:46
Fix a harmless compiler warning that crops up with SQLITE_MAX_MMAP_SIZE=0. check-in: 1277932b user: drh tags: trunk
2014-03-12
19:38
Fix an obscure bug causing sqlite3_close() to fail if there are virtual tables on the disconnect list when it is called. check-in: 6504aa47 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/btree.c.

  2157   2157     assert( sqlite3_mutex_held(p->db->mutex) );
  2158   2158     sqlite3BtreeEnter(p);
  2159   2159     sqlite3PagerSetCachesize(pBt->pPager, mxPage);
  2160   2160     sqlite3BtreeLeave(p);
  2161   2161     return SQLITE_OK;
  2162   2162   }
  2163   2163   
         2164  +#if SQLITE_MAX_MMAP_SIZE>0
  2164   2165   /*
  2165   2166   ** Change the limit on the amount of the database file that may be
  2166   2167   ** memory mapped.
  2167   2168   */
  2168   2169   int sqlite3BtreeSetMmapLimit(Btree *p, sqlite3_int64 szMmap){
  2169   2170     BtShared *pBt = p->pBt;
  2170   2171     assert( sqlite3_mutex_held(p->db->mutex) );
  2171   2172     sqlite3BtreeEnter(p);
  2172   2173     sqlite3PagerSetMmapLimit(pBt->pPager, szMmap);
  2173   2174     sqlite3BtreeLeave(p);
  2174   2175     return SQLITE_OK;
  2175   2176   }
         2177  +#endif /* SQLITE_MAX_MMAP_SIZE>0 */
  2176   2178   
  2177   2179   /*
  2178   2180   ** Change the way data is synced to disk in order to increase or decrease
  2179   2181   ** how well the database resists damage due to OS crashes and power
  2180   2182   ** failures.  Level 1 is the same as asynchronous (no syncs() occur and
  2181   2183   ** there is a high probability of damage)  Level 2 is the default.  There
  2182   2184   ** is a very low but non-zero probability of damage.  Level 3 reduces the

Changes to src/btree.h.

    59     59   #define BTREE_OMIT_JOURNAL  1  /* Do not create or use a rollback journal */
    60     60   #define BTREE_MEMORY        2  /* This is an in-memory DB */
    61     61   #define BTREE_SINGLE        4  /* The file contains at most 1 b-tree */
    62     62   #define BTREE_UNORDERED     8  /* Use of a hash implementation is OK */
    63     63   
    64     64   int sqlite3BtreeClose(Btree*);
    65     65   int sqlite3BtreeSetCacheSize(Btree*,int);
    66         -int sqlite3BtreeSetMmapLimit(Btree*,sqlite3_int64);
           66  +#if SQLITE_MAX_MMAP_SIZE>0
           67  +  int sqlite3BtreeSetMmapLimit(Btree*,sqlite3_int64);
           68  +#endif
    67     69   int sqlite3BtreeSetPagerFlags(Btree*,unsigned);
    68     70   int sqlite3BtreeSyncDisabled(Btree*);
    69     71   int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix);
    70     72   int sqlite3BtreeGetPageSize(Btree*);
    71     73   int sqlite3BtreeMaxPageCount(Btree*,int);
    72     74   u32 sqlite3BtreeLastPage(Btree*);
    73     75   int sqlite3BtreeSecureDelete(Btree*,int);