Small. Fast. Reliable.
Choose any three.

## SQLite Release 3.16.2 On 2017-01-06

1. Fix the REPLACE statement for WITHOUT ROWID tables that lack secondary indexes so that it works correctly with triggers and foreign keys. This was a new bug caused by performance optimizations added in version 3.16.0. Ticket 30027b613b4
2. Fix the sqlite3_value_text() interface so that it correctly translates content generated by zeroblob() into a string of all 0x00 characters. This is a long-standing issue discovered after the 3.16.1 release by OSS-Fuzz
3. Fix the bytecode generator to deal with a subquery in the FROM clause that is itself a UNION ALL where one side of the UNION ALL is a view that contains an ORDER BY. This is a long-standing issue that was discovered after the release of 3.16.1. See ticket 190c2507.
4. Adjust the sqlite3_column_count() API so it more often returns the same values for PRAGMA statements as it did in prior releases, to minimize disruption to applications that might be using that interface in unexpected ways.

   Hashes:

5. SQLITE_SOURCE_ID: "2017-01-06 16:32:41 a65a62893ca8319e89e48b8a38cf8a59c69a8209"
6. SHA1 for sqlite3.c: 2bebdc3f24911c0d12b6d6c0123c3f84d6946b08

Changes carried forward from version 3.16.1 (2017-01-03):

1. Fix a bug concerning the use of row values within triggers (see ticket 8c9458e7) that was in version 3.15.0 but was not reported until moments after the 3.16.0 release was published.

Changes carried forward from version 3.16.0 (2017-01-02):

1. Uses 9% fewer CPU cycles. (See the CPU performance measurement report for details on how this performance increase was computed.)
2. Added experimental support for PRAGMA functions.
3. Added the SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE option to sqlite3_db_config().
4. Enhance the date and time functions so that the 'unixepoch' modifier works for the full span of supported dates.
5. Changed the default configuration of the lookaside memory allocator from 500 slots of 128 bytes each into 125 slots of 512 bytes each.
6. Enhanced "WHERE x NOT NULL" partial indexes so that they are usable if the "x" column appears in a LIKE or GLOB operator.
7. Enhanced sqlite3_interrupt() so that it interrupts checkpoint operations that are in process.
8. Enhanced the LIKE and GLOB matching algorithm to be faster for cases when the pattern contains multiple wildcards.
9. Added the SQLITE_FCNTL_WIN32_GET_HANDLE file control opcode.
10. Added ".mode quote" to the command-line shell.
11. Added ".lint fkey-indexes" to the command-line shell.
12. Added the .imposter dot-command to the command-line shell.
13. Added the remember(V,PTR) SQL function as a loadable extension.
14. Rename the SQLITE_OMIT_BUILTIN_TEST compile-time option to SQLITE_UNTESTABLE to better reflect the implications of using it.

    Bug Fixes:

15. Fix a long-standing bug in the query planner that caused incorrect results on a LEFT JOIN where the left-hand table is a subquery and the join constraint is a bare column name coming from the left-hand subquery. Ticket 2df0107b.
16. Correctly handle the integer literal -0x8000000000000000 in the query planner.

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.