Documentation Source Text

Check-in [4cadcc5b9c]
Login

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

Overview
Comment:Begin a change log entry for the 3.21.0 release.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4cadcc5b9c5eda7860e784e900d19ff681afe3759223d05f56690ff735d91bb1
User & Date: drh 2017-08-03 20:39:01
Context
2017-08-04
14:25
Add the 2009-2018 speed graph relative to 3.20.0 to the speed-size spreadsheet. check-in: 4df296b435 user: drh tags: trunk
2017-08-03
20:39
Begin a change log entry for the 3.21.0 release. check-in: 4cadcc5b9c user: drh tags: trunk
15:47
Fix another typo in the bindptr.html document. check-in: 8d2c7aa89d user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to pages/changes.in.

    16     16   set nChng 0
    17     17   proc chng {date desc {options {}}} {
    18     18     global nChng aChng xrefChng
    19     19     set aChng($nChng) [list $date $desc $options]
    20     20     set xrefChng($date) $nChng
    21     21     incr nChng
    22     22   }
           23  +
           24  +chng {2017-11-01 (3.21.0)} {
           25  +<li> Take advantage of the atomic-write capabilities of the 
           26  +     [https://en.wikipedia.org/wiki/F2FS|F2FS filesystem] when available, for
           27  +     greatly reduced transaction overhead.  This currently requires the
           28  +     [SQLITE_ENABLE_BATCH_ATOMIC_WRITE] compile-time option.
           29  +<li> Allow [ATTACH] and [DETACH] commands to work inside of a transaction.
           30  +<li> Query planner enhancements:
           31  +<ol type="a">
           32  +<li> Enhanced the [LIKE optimization] so that it works with an ESCAPE clause.
           33  +</ol>
           34  +<li> Miscellaneous [microoptimizations] reduce CPU usage by about 0.4%.
           35  +<li> Bug fixes:
           36  +<ol type="a">
           37  +<li> Fix a faulty assert() statement discovered by OSSFuzz.
           38  +     Ticket [https://sqlite.org/src/info/cb91bf4290c211d|cb91bf4290c211d]
           39  +</ol>
           40  +}
    23     41   
    24     42   chng {2017-08-01 (3.20.0)} {
    25     43   <li> Update the text of error messages returned by [sqlite3_errmsg()] for some
    26     44        error codes.
    27     45   <li> Add new [pointer passing interfaces].
    28     46   <li> Backwards-incompatible changes to some extensions in order to take 
    29     47        advantage of the improved security offered by the new 

Changes to pages/chronology.in.

    24     24   #    ORDER BY mtime DESC;
    25     25   #
    26     26   # A small amount of manual editing and de-duplication followed.
    27     27   #
    28     28   # Manually edit the list for each subsequent release.
    29     29   #      
    30     30   foreach line [split {
           31  +xxxxxxxxxx|pending|Version 3.21.0
    31     32   9501e22dfe|2017-08-01|Version 3.20.0
    32     33   036ebf729e|2017-06-17|Version 3.18.2
    33     34   77bb46233d|2017-06-16|Version 3.18.1
    34     35   0ee482a1e0|2017-06-08|Version 3.19.3
    35     36   edb4e819b0|2017-05-25|Version 3.19.2
    36     37   f6d7b988f4|2017-05-24|Version 3.19.1
    37     38   28a94eb282|2017-05-22|Version 3.19.0

Changes to pages/compile.in.

   766    766     or written.  On filesystems that support atomic writes, this
   767    767     optimization can result in significant speed improvements for
   768    768     small updates.  However, few filesystems support this capability
   769    769     and the code paths that check for this capability slow down write
   770    770     performance on systems that lack atomic write capability, so this
   771    771     feature is disabled by default.
   772    772   }
          773  +
          774  +COMPILE_OPTION {SQLITE_ENABLE_BATCH_ATOMIC_WRITE} {
          775  +  This compile-time option enables SQLite to take advantage batch
          776  +  atomic write capabilities in the underlying filesystem.  As of
          777  +  SQLite version 3.21.0 ([dateof:3.21.0]) this is only supported on
          778  +  [https://en.wikipedia.org/wiki/F2FS|F2FS].  However, the interface
          779  +  is implemented generically, using [sqlite3_file_control()] with
          780  +  [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]
          781  +  so the capability can be added to other filesystem times in the
          782  +  future.  When this option is enabled, SQLite automatically detects
          783  +  that the underlying filesystem supports batch atomic writes, and
          784  +  when it does so it avoids writing the [rollback journal] for transaction
          785  +  control.  This can make transactions over twice as fast, while
          786  +  simultaneously reducing wear on SSD storage devices.
          787  +<p>
          788  +  Future versions of SQLite might enable the batch-atomic-write
          789  +  capability by default, at which point this compile-time option
          790  +  will become superfluous.
          791  +}
   773    792   
   774    793   COMPILE_OPTION {SQLITE_ENABLE_COLUMN_METADATA} {
   775    794     When this C-preprocessor macro is defined, SQLite includes some
   776    795     additional APIs that provide convenient access to meta-data about
   777    796     tables and queries.  The APIs that are enabled by this option are:
   778    797   
   779    798     <ul>

Changes to pages/index.in.

    10     10   [full-featured SQL|full-featured], [public-domain],
    11     11   SQL database engine.
    12     12   SQLite is the [most used] database engine in the world.
    13     13   <a class="button" href="about.html">More Info</a></p>
    14     14   
    15     15   <hr class="xhr">
    16     16   <span class="hdrfont">Latest Release:&nbsp;&nbsp;</span>
    17         -<a href="releaselog/3_20_0.html">Version 3.20.0</a> ([dateof:3.20.0]).
           17  +<a href="releaselog/3_21_0.html">Version 3.21.0</a> ([dateof:3.21.0]).
    18     18   <a class="button" href="download.html">Download</a>
    19     19   <a class="button" href="chronology.html">Prior Releases</a>
    20     20   
    21     21   <div class="mobileonly">
    22     22   <hr class="xhr">
    23     23   <h3>Common Links</h3>
    24     24   <tcl>common_links</tcl>

Changes to pages/lang.in.

  1622   1622   ^When not in [shared cache mode], 
  1623   1623   it is possible to have the same database file attached multiple times using 
  1624   1624   different names, and detaching one connection to a file will leave the 
  1625   1625   others intact.</p>
  1626   1626   ^In [shared cache mode], attempting to attach the same database file more
  1627   1627   than once results in an error.
  1628   1628   
  1629         -<p>^This statement will fail if SQLite is in the middle of a transaction.</p>
  1630         -
  1631   1629   
  1632   1630   <tcl>
  1633   1631   ##############################################################################
  1634   1632   Section {DROP INDEX} dropindex {{DROP INDEX}}
  1635   1633   
  1636   1634   RecursiveBubbleDiagram drop-index-stmt
  1637   1635   </tcl>

Changes to pages/optoverview.in.

   320    320     There are many conditions on this optimization:
   321    321   }
   322    322   PARAGRAPH {
   323    323     <ol>
   324    324     <li>^The right-hand side of the LIKE or GLOB must be either a string literal
   325    325         or a [parameter] bound to a string literal
   326    326         that does not begin with a wildcard character.</li>
   327         -  <li>^The ESCAPE clause cannot appear on the LIKE operator.</li>
   328    327     <li>It must not be possible to make the LIKE or GLOB operator true by
   329    328         having a numeric value (instead of a string or blob) on the
   330    329         left-hand side. This means that either:
   331    330         <ol type="A">
   332    331         <li> the left-hand side of the LIKE or GLOB operator is the name
   333    332              of an indexed column with [affinity | TEXT affinity], or</li>
   334    333         <li> the right-hand side pattern argument does not begin with a
   335    334              minus sign ("-") or a digit.</li>
   336    335         </ol>
   337    336         This constraint arises from the fact that numbers do not sort in
   338    337         lexicographical order.  For example: 9&lt;10 but '9'&gt;'10'.</li>
   339    338     <li>^The built-in functions used to implement LIKE and GLOB must not
   340         -      have been overloaded using the sqlite3_create_function() API.</li>
          339  +      have been overloaded using the [sqlite3_create_function()] API.</li>
   341    340     <li>^For the GLOB operator, the column must be indexed using the 
   342    341         built-in BINARY collating sequence.</li>
   343    342     <li>^For the LIKE operator, if [case_sensitive_like] mode is enabled then
   344    343         the column must indexed using BINARY collating sequence, or if
   345    344         [case_sensitive_like] mode is disabled then the column must indexed
   346    345         using built-in NOCASE collating sequence.</li>
          346  +  <li>If the ESCAPE option is used, the ESCAPE character must be ASCII,
          347  +      or a single-byte character in UTF-8.
   347    348     </ol>
   348    349   }
   349    350   PARAGRAPH {
   350    351     The LIKE operator has two modes that can be set by a
   351    352     [case_sensitive_like | pragma].  ^The
   352    353     default mode is for LIKE comparisons to be insensitive to differences
   353    354     of case for latin1 characters.  ^(Thus, by default, the following
................................................................................
   402    403     character then this optimization is attempted.  ^If the right-hand side 
   403    404     is a [parameter] that is bound to a string, then this optimization is
   404    405     only attempted if the [prepared statement] containing the expression
   405    406     was compiled with [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()].
   406    407     ^The LIKE optimization is not attempted if the
   407    408     right-hand side is a [parameter] and the statement was prepared using
   408    409     [sqlite3_prepare()] or [sqlite3_prepare16()].
   409         -  ^The LIKE optimization is not attempted if there is an ESCAPE phrase
   410         -  on the LIKE operator.
   411    410   }
   412    411   PARAGRAPH {
   413    412     Suppose the initial sequence of non-wildcard characters on the right-hand
   414    413     side of the LIKE or GLOB operator is <i>x</i>.  We are using a single 
   415    414     character to denote this non-wildcard prefix but the reader should
   416    415     understand that the prefix can consist of more than 1 character.
   417    416     Let <i>y</i> be the smallest string that is the same length as /x/ but which
................................................................................
  1022   1021     started.  This results in a slightly faster sort.  But the bigger
  1023   1022     advantages are that many fewer rows need to be held in memory,
  1024   1023     reducing memory requirements, and outputs can begin to appear before
  1025   1024     the core query has run to completion.
  1026   1025   }
  1027   1026   
  1028   1027   HEADING 1 {Subquery flattening} flattening
  1029         -hd_keywords {flattening optimization}
         1028  +hd_keywords {flattening optimization} {query flattener}
  1030   1029   
  1031   1030   PARAGRAPH {
  1032   1031     When a subquery occurs in the FROM clause of a SELECT, the simplest
  1033   1032     behavior is to evaluate the subquery into a transient table, then run
  1034   1033     the outer SELECT against the transient table.  But such a plan
  1035   1034     can be suboptimal since the transient table will not have any indices
  1036   1035     and the outer query (which is likely a join) will be forced to do a