*** DRAFT ***

SQLite Release 3.22.0 On 2018-01-22

  1. The output of sqlite3_trace_v2() now shows each individual SQL statement run within a trigger.
  2. Add the ability to read from WAL mode databases even if the application lacks write permission on the database and its containing directory, as long as the -shm and -wal files exist in that directory.
  3. Added the rtreecheck() scalar SQL function to the R-Tree extension.
  4. Added the sqlite3_vtab_nochange() and sqlite3_value_nochange() interfaces to help virtual table implementations optimize UPDATE operations.
  5. Added the sqlite3_vtab_collation() interface.
  6. Added support for the "^" initial token syntax in FTS5.
  7. New extensions:
    1. The Zipfile virtual table can read and write a ZIP Archive.
    2. Added the fsdir(PATH) table-valued function to the fileio.c extension, for listing the files in a directory.
    3. The sqlite_btreeinfo eponymous virtual table for introspecting and estimating the sizes of the btrees in a database.
    4. The Append VFS is a VFS shim that allows an SQLite database to be appended to some other file. This allows (for example) a database to be appended to an executable that then opens and reads the database.
  8. Query planner enhancements:
    1. The optimization that uses an index to quickly compute an aggregate min() or max() is extended to work with indexes on expressions.
    2. The decision of whether to implement a FROM-clause subquery as a co-routine or using query flattening now considers whether the result set of the outer query is "complex" (if it contains functions or expression subqueries). A complex result set biases the decision toward the use of co-routines.
    3. The planner avoids query plans that use indexes with unknown collating functions.
    4. The planner omits unused LEFT JOINs even if they are not the right-most joins of a query.
  9. Other performance optimizations:
    1. A smaller and faster implementation of text to floating-point conversion subroutine: sqlite3AtoF().
    2. The Lemon parser generator creates a faster parser.
    3. Use the strcspn() C-library routine to speed up the LIKE and GLOB operators.
  10. Improvements to the command-line shell:
    1. The ".schema" command shows the structure of virtual tables.
    2. Added support for reading and writing SQLite Archive files using the .archive command.
    3. Added the experimental .expert command
    4. Added the ".eqp trigger" variant of the ".eqp" command
    5. Enhance the ".lint fkey-indexes" command so that it works with WITHOUT ROWID tables.
    6. If the filename argument to the shell is a ZIP archive rather than an SQLite database, then the shell automatically opens that ZIP archive using the Zipfile virtual table.
    7. Added the edit() SQL function.
    8. Added the .excel command to simplify exporting database content to a spreadsheet.
    9. Databases are opened using Append VFS when the --append flag is used on the command line or with the .open command.
  11. Enhance the SQLITE_ENABLE_UPDATE_DELETE_LIMIT compile-time option so that it works for WITHOUT ROWID tables.
  12. Provide the sqlite_offset(X) SQL function that returns the byte offset into the database file to the beginning of the record holding value X, when compiling with -DSQLITE_ENABLE_OFFSET_SQL_FUNC.
  13. Bug fixes:
    1. Infinite loop on an UPDATE that uses an OR operator in the WHERE clause. Problem introduced with 3.17.0 and reported on the mailing list about one year later. Ticket 47b2581aa9bfecec.
    2. Incorrect query results when the skip-ahead-distinct optimization is used. Ticket ef9318757b152e3a.
    3. Incorrect query results on a join with a ORDER BY DESC. Ticket 123c9ba32130a6c9.
    4. Inconsistent result set column names between CREATE TABLE AS and a simple SELECT. Ticket 3b4450072511e621
    5. Assertion fault when doing REPLACE on an index on an expression. Ticket dc3f932f5a147771
    6. Assertion fault when doing an IN operator on a constant index. Ticket aa98619ad08ddcab

    Hashes:

  14. SQLITE_SOURCE_ID: "2018-01-22 18:45:57 0c55d179733b46d8d0ba4d88e01a25e10677046ee3da1d5b1581e86726f2171d"
  15. SHA3-256 for sqlite3.c: 206df47ebc49cd1710ac0dd716ce5de5854826536993f4feab7a49d136b85069

A complete list of SQLite releases in a single page and a chronology are both also available. A detailed history of every check-in is available at SQLite version control site.

*** DRAFT ***