Check-in [cf08e3867a]
Not logged in

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

Comment:Pickup the SQLite core library 3.27.0 docs from upstream.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: cf08e3867a3bef1dea306be0fd08b08f51dbde66
User & Date: mistachkin 2019-02-08 02:11:35
Disable the production of 'fat binaries' on macOS. Fix for ticket [b41f1f002e]. check-in: 57ef270232 user: mistachkin tags: trunk
Pickup the SQLite core library 3.27.0 docs from upstream. check-in: cf08e3867a user: mistachkin tags: trunk
Update SQLite core library to the 3.27.0 release. Update version history docs. check-in: 07c06d7ebe user: mistachkin tags: trunk
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Doc/Extra/Core/images/syntax/expr.gif.

cannot compute difference between binary files

Changes to Doc/Extra/Core/images/syntax/select-core.gif.

cannot compute difference between binary files

Changes to Doc/Extra/Core/images/syntax/select-stmt.gif.

cannot compute difference between binary files

Changes to Doc/Extra/Core/images/syntax/vacuum-stmt.gif.

cannot compute difference between binary files

Changes to Doc/Extra/Core/lang_datefunc.html.

   373    373   localtime_r() C function normally only works for years
   374    374   between 1970 and 2037. For dates outside this range, SQLite 
   375    375   attempts to map the year into an equivalent year within 
   376    376   this range, do the calculation, then map the year back.</p>
   377    377   
   378    378   
   379    379   <p>These functions only work for dates between 0000-01-01 00:00:00
   380         -and 9999-12-31 23:59:59 (julidan day numbers 1721059.5 through 5373484.5).
          380  +and 9999-12-31 23:59:59 (julian day numbers 1721059.5 through 5373484.5).
   381    381   For dates outside that range, the results of these
   382    382   functions are undefined.</p>
   383    383   
   384    384   <p>Non-Vista Windows platforms only support one set of DST rules. 
   385    385   Vista only supports two. Therefore, on these platforms, 
   386    386   historical DST calculations will be incorrect. 
   387    387   For example, in the US, in 2007 the DST rules changed. 

Changes to Doc/Extra/Core/lang_vacuum.html.

   112    112   
   113    113     <li> <p> Frequent inserts, updates, and deletes can cause the database file
   114    114        to become fragmented - where data for a single table or index is scattered 
   115    115        around the database file. Running VACUUM ensures that each table and
   116    116        index is largely stored contiguously within the database file. In some
   117    117        cases, VACUUM may also reduce the number of partially filled pages in
   118    118        the database, reducing the size of the database file further.
          119  +
          120  +  <li> <p> When content is deleted from an SQLite database, the content is not
          121  +     usually erased but rather the space used to hold the content is marked as
          122  +     being available for reuse.  This can allow deleted content to be recovered
          123  +     by a hacker or by forensic analysis.  Running VACUUM will clean the database
          124  +     of all traces of deleted content, thus preventing an adversary from recovering
          125  +     deleted content.  Using VACUUM in this way is an alternative to setting
          126  +     <a href="pragma.html#pragma_secure_delete">PRAGMA secure_delete=ON</a>. 
   119    127   
   120    128     <li> <p> Normally, the database <a href="pragma.html#pragma_page_size">page_size</a> and whether or not the database
   121    129        supports <a href="pragma.html#pragma_auto_vacuum">auto_vacuum</a> must be configured before the database file is
   122    130        actually created. However, when not in <a href="wal.html">write-ahead log</a> mode, the 
   123    131        <a href="pragma.html#pragma_page_size">page_size</a> and/or <a href="pragma.html#pragma_auto_vacuum">auto_vacuum</a> properties of an existing database may be
   124    132        changed by using the <a href="pragma.html#pragma_page_size">page_size</a>  and/or 
   125    133        <a href="pragma.html#pragma_auto_vacuum">pragma auto_vacuum</a> pragmas and then immediately VACUUMing
   132    140   <span class='yyterm'>schema-name</span> to the VACUUM statement.
   133    141   
   134    142   <p><b>Compatibility Warning:</b> The ability to vacuum attached databases was
   135    143   added in <a href="releaselog/3_15_0.html">version 3.15.0</a> (2016-10-14).  Prior to that, a 
   136    144   <span class='yyterm'>schema-name</span> added to the
   137    145   VACUUM statement would be silently ignored and the "main" schema would be
   138    146   vacuumed.</p>
          147  +
          148  +<a name="vacuuminto"></a>
          149  +
          150  +<h3>VACUUM with an INTO clause</h3>
          151  +
          152  +<p>If the INTO clause is included, then the original database file is
          153  +unchanged and a new database is created in the filename given by the
          154  +argument to the INTO clause.  The new database will contain the same
          155  +logical content as the original database, fully vacuumed.
          156  +
          157  +<p>
          158  +The VACUUM command with an INTO clause is an alternative to the
          159  +<a href="backup.html">backup API</a> for generating backup copies of a live database.
          160  +The advantage of using VACUUM INTO is that the resulting backup
          161  +database is minimal in size and hence the amount of filesystem
          162  +I/O may be reduced.  Also, all deleted content is purged from the
          163  +backup, leaving behind no forensic traces.  On the other hand,
          164  +the <a href="backup.html">backup API</a> uses fewer CPU cycles and can be executed
          165  +incrementally.
          166  +
          167  +<p>
          168  +The filename in the INTO clause can be an arbitrary SQL expression
          169  +that evaluates to a string.
          170  +The file named by the INTO clause must not previously exist, or
          171  +else it must be an empty file, or the VACUUM INTO command will
          172  +fail with an error.
          173  +
          174  +<p>
          175  +The argument to INTO can a <a href="uri.html">URI filename</a> if URI filenames
          176  +are enabled.
          177  +URL filenames are enabled if any of the following are true:
          178  +<ul>
          179  +<li> The SQLite library was compiled with <a href="compile.html#use_uri">-DSQLITE_USE_URI=1</a>.
          180  +<li> The <a href="c3ref/config.html">sqlite3_config</a>(<a href="c3ref/c_config_covering_index_scan.html#sqliteconfiguri">SQLITE_CONFIG_URI</a>,1) interfaces was
          181  +     invoked at start-time.
          182  +<li> The <a href="c3ref/sqlite3.html">database connection</a> that is running the VACUUM INTO
          183  +     statement was originally opened using the
          184  +     <a href="c3ref/c_open_autoproxy.html">SQLITE_OPEN_URI</a> flag.
          185  +</ul>
          186  +
          187  +<p>
          188  +The VACUUM INTO command is transactional in the sense that
          189  +the generated output database is a consistent snapshot of the
          190  +original database.  However, if the VACUUM INTO command is
          191  +interrupted by a unplanned shutdown or power lose, then
          192  +the generated output database might be incomplete and corrupt.
          193  +Also, SQLite does not invoke fsync() or FlushFileBuffers()
          194  +on the generated database to ensure that it has reached
          195  +non-volatile storage before completing.
          196  +
          197  +
          198  +<a name="howvacuumworks"></a>
          199  +
          200  +<h3>How VACUUM works</h3>
   139    201   
   140    202   <p>The VACUUM command works by copying the contents of the database into
   141    203   a temporary database file and then overwriting the original with the 
   142    204   contents of the temporary file. When overwriting the original, a rollback
   143    205   journal or <a href="wal.html">write-ahead log</a> WAL file is used just as it would be for any
   144    206   other database transaction. This means that when VACUUMing a database, 
   145    207   as much as twice the size of the original database file is required in free
   146    208   disk space.
   147    209   
          210  +<p>The VACUUM INTO command works the same way except that it uses the file
          211  +named on the INTO clause in place of the temporary database and omits the
          212  +step of copying the vacuumed database back over top of the original database.
          213  +
   148    214   <p>The VACUUM command may change the <a href="lang_createtable.html#rowid">ROWIDs</a> of entries in any
   149    215   tables that do not have an explicit <a href="lang_createtable.html#rowid">INTEGER PRIMARY KEY</a>.
   150    216   </p>
   151    217   
   152    218   <p>A VACUUM will fail if there is an open transaction, or if there are one or
   153    219   more active SQL statements when it is run.
   154    220   

Changes to Doc/Extra/Core/pragma.html.

   662    662       returned by the same database connection at two different points in
   663    663       time.
   664    664   <a name="pragma_database_list"></a>
   665    665   <h _id=pragma_database_list style="display:none"> PRAGMA database_list</h><hr>
   666    666       <p><b>PRAGMA database_list;</b></p>
   667    667       <p>This pragma works like a query to return one row for each database
   668    668       attached to the current database connection.
   669         -    The second column is the "main" for the main database file, "temp"
          669  +    The second column is "main" for the main database file, "temp"
   670    670       for the database file used to store TEMP objects, or the name of the
   671    671       ATTACHed database for other database files.
   672    672       The third column is the name of the database file itself, or an empty
   673    673       string if the database is not associated with a file.</p>
   674    674   <a name="pragma_default_cache_size"></a>
   675    675   <h _id=pragma_default_cache_size style="display:none"> PRAGMA default_cache_size</h><hr>
   676    676       <b>PRAGMA </b><i>schema.</i><b>default_cache_size;
  1098   1098       flag.  When this flag is on, the <a href="lang_altertable.html#altertabrename">ALTER TABLE RENAME</a>
  1099   1099       command (for changing the name of a table) works as it did
  1100   1100       in SQLite 3.24.0 (2018-06-04) and earlier.  More specifically,
  1101   1101       when this flag is on
  1102   1102       the <a href="lang_altertable.html#altertabrename">ALTER TABLE RENAME</a> command only rewrites the initial occurrence
  1103   1103       of the table name in its <a href="lang_createtable.html">CREATE TABLE</a> statement and in any associated
  1104   1104       <a href="lang_createindex.html">CREATE INDEX</a> and <a href="lang_createtrigger.html">CREATE TRIGGER</a> statements.  Other references to the
  1105         -    table are unmodifed, including:
         1105  +    table are unmodified, including:
  1106   1106       <ul>
  1107   1107       <li> References to the table within the bodies of triggers and views.
  1108   1108       <li> References to the table within CHECK constraints in the original
  1109   1109            CREATE TABLE statement.
  1110   1110       <li> References to the table within the WHERE clauses of <a href="partialindex.html">partial indexes</a>.
  1111   1111       </ul>
  1112   1112       The default setting for this pragma is OFF, which means that all