Documentation Source Text

Check-in [c8b24bb8c6]
Login

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

Overview
Comment:Update the change log for 3.7.17. Fix typos in the memory-mapped I/O documentation.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c8b24bb8c61af7a43b255316607259b7e152b638
User & Date: drh 2013-04-26 19:35:34
Context
2013-04-27
12:01
Updates to documentation, especially the C API introduction. check-in: f0275a9b47 user: drh tags: trunk
2013-04-26
19:35
Update the change log for 3.7.17. Fix typos in the memory-mapped I/O documentation. check-in: c8b24bb8c6 user: drh tags: trunk
15:21
Update the change log for 3.7.17 after reviewing the timeline. check-in: 7e7024c429 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to pages/changes.in.

    73     73       for further information about what that extension does.
    74     74   <li>Added the [fts3tokenize virtual table] to the [full-text search] logic.
    75     75   <li>Query planner enhancement: Use the transitive property of constraints
    76     76       to move constraints into the outer loops of a join whenever possible,
    77     77       thereby reducing the amount of work that needs to occur in inner loops.
    78     78   <li>Enhance the [fts4aux] virtual table so that a TEMP fts4aux table can reference
    79     79       an [FTS4] table in main database.
           80  +<li>Discontinue the use of posix_fallocate() on unix, as it does not work on all
           81  +    filesystems.
    80     82   <li>Bug fix:
    81     83       Only consider AS names from the result set as candidates for resolving
    82     84       identifiers in the WHERE clause if there are no other matches. In the 
    83     85       ORDER BY clause, AS names take priority over any column names.
    84     86       Ticket [http://www.sqlite.org/src/info/2500cdb9be05 | 2500cdb9be05]
    85     87   <li>Bug fix: 
    86     88       Prevent excessive stack usage in the [full-text search] engine when processing

Changes to pages/mmap.in.

    83     83   a call to xFetch() returns a NULL pointer (indicating that the requested
    84     84   page is not currently mapped into the applications address space) then
    85     85   SQLite silently falls back to using xRead().  An error is only reported
    86     86   if xRead() also fails.</p>
    87     87   
    88     88   <p>When updating the database file, SQLite always makes a copy of the
    89     89   page content into heap memory before modifying the page.  This is necessary
    90         -since the changes are not suppose to be visible to other processes until
           90  +since the changes are not supposed to be visible to other processes until
    91     91   after the transaction commits and so the changes must occur in private memory.
    92     92   After all needed changes are completed, xWrite() is used to move the content
    93         -back into the database file.  The current xWrite() implementions for both
           93  +back into the database file.  The current xWrite() implementations for both
    94     94   unix and windows check to see if section of the file being written is 
    95     95   mapped into the applications address space, and if it is the write operation
    96     96   is implemented using memcpy() rather than invoking a "write()" system call,
    97     97   but that is just an implementation detail.  A memory copy occurs either way.
    98     98   So the use of memory mapped I/O does not significantly change the performance
    99     99   of database changes.  Memory mapped I/O is mostly a benefit for queries.</p>
   100    100   
................................................................................
   102    102   
   103    103   <p>The "mmap_size" is the maximum number of bytes of the database file that
   104    104   SQLite will try to map into the process address space at one time.  The
   105    105   mmap_size applies separately to each database file, so the total amount
   106    106   of process address space that could potentially be used is the mmap_size
   107    107   times the number of open database files.</p>
   108    108   
   109         -<p>To activate memory-mapped I/O, an application an set the mmap_size to some
          109  +<p>To activate memory-mapped I/O, an application can set the mmap_size to some
   110    110   large value.  For example:</p>
   111    111   
   112    112   <blockquote><pre>
   113    113   PRAGMA mmap_size=268435456;
   114    114   </pre></blockquote>
   115    115   
   116    116   <p>To disable memory-mapped I/O, simply set the mmap_size to zero:</p>
................................................................................
   117    117   
   118    118   <blockquote><pre>
   119    119   PRAGMA mmap_size=0;
   120    120   </pre></blockquote>
   121    121   
   122    122   <p>If mmap_size is set to N then all current implementations map the first
   123    123   N bytes of the database file and use legacy xRead() calls for any content
   124         -beyond N bytes.  If the database file is smaller then N bytes, then the entire
          124  +beyond N bytes.  If the database file is smaller than N bytes, then the entire
   125    125   file is mapped.  In the future, new OS interfaces could, in theory, map
   126    126   regions of the file other than the first N bytes, but no such 
   127    127   implementation currently exists.</p>
   128    128   
   129    129   <p>The mmap_size is set separately for each database file using the
   130    130   "[PRAGMA mmap_size]" statement.  The usual default mmap_size is zero,
   131    131   meaning that memory mapped I/O is disabled by default.  However, the