*** DRAFT ***

SQLite Release 3.35.4 On 2021-04-02

Prior changes from version 3.35.0 (2021-03-12):

  1. Added built-in SQL math functions(). (Requires the -DSQLITE_ENABLE_MATH_FUNCTIONS compile-time option.)
  2. Added support for ALTER TABLE DROP COLUMN.
  3. Generalize UPSERT:
    1. Allow multiple ON CONFLICT clauses that are evaluated in order,
    2. The final ON CONFLICT clause may omit the conflict target and yet still use DO UPDATE.
  4. Add support for the RETURNING clause on DELETE, INSERT, and UPDATE statements.
  5. Use less memory when running VACUUM on databases containing very large TEXT or BLOB values. It is no longer necessary to hold the entire TEXT or BLOB in memory all at once.
  6. Add support for the MATERIALIZED and NOT MATERIALIZED hints when specifying common table expressions. The default behavior was formerly NOT MATERIALIZED, but is now changed to MATERIALIZED for CTEs that are used more than once.
  7. The SQLITE_DBCONFIG_ENABLE_TRIGGER and SQLITE_DBCONFIG_ENABLE_VIEW settings are modified so that they only control triggers and views in the main database schema or in attached database schemas and not in the TEMP schema. TEMP triggers and views are always allowed.
  8. Query planner/optimizer improvements:
    1. Enhancements to the min/max optimization so that it works better with the IN operator and the OP_SeekScan optimization of the previous release.
    2. Attempt to process EXISTS operators in the WHERE clause as if they were IN operators, in cases where this is a valid transformation and seems likely to improve performance.
    3. Allow UNION ALL sub-queries to be flattened even if the parent query is a join.
    4. Use an index, if appropriate, on IS NOT NULL expressions in the WHERE clause, even if STAT4 is disabled.
    5. Expressions of the form "x IS NULL" or "x IS NOT NULL" might be converted to simply FALSE or TRUE, if "x" is a column that has a "NOT NULL" constraint and is not involved in an outer join.
    6. Avoid checking foreign key constraints on an UPDATE statement if the UPDATE does not modify any columns associated with the foreign key.
    7. Allow WHERE terms to be pushed down into sub-queries that contain window functions, as long as the WHERE term is made up of entirely of constants and copies of expressions found in the PARTITION BY clauses of all window functions in the sub-query.
  9. CLI enhancements:
    1. Enhance the ".stats" command to accept new arguments "stmt" and "vmstep", causing prepare statement statistics and only the virtual-machine step count to be shown, respectively.
    2. Add the ".filectrl data_version" command.
    3. Enhance the ".once" and ".output" commands so that if the destination argument begins with "|" (indicating that output is redirected into a pipe) then the argument does not need to be quoted.
  10. Bug fixes:
    1. Fix a potential NULL pointer dereference when processing a syntactically incorrect SELECT statement with a correlated WHERE clause and a "HAVING 0" clause. (Also fixed in the 3.34.1 patch release.)
    2. Fix a bug in the IN-operator optimization of version 3.33.0 that can cause an incorrect answer.
    3. Fix incorrect answers from the LIKE operator if the pattern ends with "%" and there is an "ESCAPE '_'" clause.

Prior changes from version 3.35.1 (2021-03-15):

  1. Fix a bug in the new DROP COLUMN feature when used on columns that are indexed and that are quoted in the index definition.
  2. Improve the built-in documentation for the .dump command in the CLI.

Prior changes from version 3.35.2 (2021-03-17):

  1. Fix a problem in the appendvfs.c extension that was introduced into version 3.35.0.
  2. Ensure that date/time functions with no arguments (which generate responses that depend on the current time) are treated as non-deterministic functions. Ticket 2c6c8689fb5f3d2f
  3. Fix a problem in the sqldiff utility program having to do with unusual whitespace characters in a virtual table definition.
  4. Limit the new UNION ALL optimization described by item 8c in the 3.35.0 release so that it does not try to make too many new subqueries. See forum thread 140a67d3d2 for details.

Prior changes from version 3.35.3 (2021-03-26):

  1. Enhance the OP_OpenDup opcode of the bytecode engine so that it works even if the cursor being duplicated itself came from OP_OpenDup. Fix for ticket bb8a9fd4a9b7fce5. This problem only came to light due to the recent MATERIALIZED hint enhancement.
  2. When materializing correlated common table expressions, do so separately for each use case, as that is required for correctness. This fixes a problem that was introduced by the MATERIALIZED hint enhancement.
  3. Fix a problem in the filename normalizer of the unix VFS.
  4. Fix the "box" output mode in the CLI so that it works with statements that returns one or more rows of zero columns (such as PRAGMA incremental_vacuum). Forum post afbbcb5b72.
  5. Improvements to error messages generated by faulty common table expressions. Forum post aa5a0431c99e.
  6. Fix some incorrect assert() statements.
  7. Fix to the SELECT statement syntax diagram so that the FROM clause syntax is shown correctly. Forum post 9ed02582fe.
  8. Fix the EBCDIC character classifier so that it understands newlines as whitespace. Forum post 58540ce22dcd.
  9. Improvements the xBestIndex method in the implementation of the (unsupported) wholenumber virtual table extension so that it does a better job of convincing the query planner to avoid trying to materialize a table with an infinite number of rows. Forum post b52a020ce4.

Changes in this specific patch release, version 3.35.4 (2021-04-02):

  1. Fix a defect in the query planner optimization identified by item 8b above. Ticket de7db14784a08053.
  2. Fix a defect in the new RETURNING syntax. Ticket 132994c8b1063bfb.
  3. Fix the new RETURNING feature so that it raises an error if one of the terms in the RETURNING clause references a unknown table, instead of silently ignoring that error.
  4. Fix an assertion associated with aggregate function processing that was incorrectly triggered by the push-down optimization.

    Hashes:

  5. SQLITE_SOURCE_ID: 2021-04-02 15:20:15 5d4c65779dab868b285519b19e4cf9d451d50c6048f06f653aa701ec212df45e
  6. SHA3-256 for sqlite3.c: 528b8a26bf5ffd4c7b4647b5b799f86e8fb1a075f715b87a414e94fba3d09dbe

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 ***