Small. Fast. Reliable.
Choose any three.
Search for:

## SQLite Release 3.12.2 On 2016-04-18

- Fix a backwards compatibility problem in version 3.12.0 and 3.12.1: Columns declared as `"INTEGER" PRIMARY KEY` (with quotes around the datatype keyword) were not being recognized as an INTEGER PRIMARY KEY, which resulted in an incompatible database file. Ticket 7d7525cb01b68
- Fix a bug (present since version 3.9.0) that can cause the DELETE operation to miss rows if PRAGMA reverse_unordered_selects is turned on. Ticket a306e56ff68b8fa5
- Fix a bug in the code generator that can cause incorrect results if two or more virtual tables are joined and the virtual table used in outer loop of the join has an IN operator constraint.
- Correctly interpret negative "PRAGMA cache_size" values when determining the cache size used for sorting large amounts of data.

  Hashes:

- SQLITE_SOURCE_ID: "2016-04-18 17:30:31 92dc59fd5ad66f646666042eb04195e3a61a9e8e"
- SHA1 for sqlite3.c: de5a5898ebd3a3477d4652db143746d008b24c83

Changes carried forward from version 3.12.1 (2016-04-08):

- Fix a boundary condition error introduced by version 3.12.0 that can result in a crash during heavy SAVEPOINT usage. Ticket 7f7f8026eda38.
- Fix views so that they inherit column datatypes from the table that they are defined against, when possible.
- Fix the query planner so that IS and IS NULL operators are able to drive an index on a LEFT OUTER JOIN.

Changes carried forward from version 3.12.0 (2016-03-29):

Potentially Disruptive Change:

- The SQLITE_DEFAULT_PAGE_SIZE is increased from 1024 to 4096. The SQLITE_DEFAULT_CACHE_SIZE is changed from 2000 to -2000 so the same amount of cache memory is used by default. See the application note on the version 3.12.0 page size change for further information.

  Performance enhancements:

- Enhancements to the Lemon parser generator so that it creates a smaller and faster SQL parser.
- Only create master journal files if two or more attached databases are all modified, do not have PRAGMA synchronous set to OFF, and do not have the journal_mode set to OFF, MEMORY, or WAL.
- Only create statement journal files when their size exceeds a threshold. Otherwise the journal is held in memory and no I/O occurs. The threshold can be configured at compile-time using SQLITE_STMTJRNL_SPILL or at start-time using sqlite3_config(SQLITE_CONFIG_STMTJRNL_SPILL).
- The query planner is able to optimize IN operators on virtual tables even if the xBestIndex method does not set the sqlite3_index_constraint_usage.omit flag of the virtual table column to the left of the IN operator.
- The query planner now does a better job of optimizing virtual table accesses in a 3-way or higher join where constraints on the virtual table are split across two or more other tables of the join.
- More efficient handling of application-defined SQL functions, especially in cases where the application defines hundreds or thousands of custom functions.
- The query planner considers the LIMIT clause when estimating the cost of ORDER BY.
- The configure script (on unix) automatically detects pread() and pwrite() and sets compile-time options to use those OS interfaces if they are available.
- Reduce the amount of memory needed to hold the schema.
- Other miscellaneous micro-optimizations for improved performance and reduced memory usage.

  New Features:

- Added the SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER option to sqlite3_db_config() which allows the two-argument version of the fts3_tokenizer() SQL function to be enabled or disabled at run-time.
- Added the sqlite3rbu_bp_progress() interface to the RBU extension.
- The PRAGMA defer_foreign_keys=ON statement now also disables RESTRICT actions on foreign key.
- Added the sqlite3_system_errno() interface.
- Added the SQLITE_DEFAULT_SYNCHRONOUS and SQLITE_DEFAULT_WAL_SYNCHRONOUS compile-time options. The SQLITE_DEFAULT_SYNCHRONOUS compile-time option replaces the SQLITE_EXTRA_DURABLE option, which is no longer supported.
- Enhanced the ".stats" command in the command-line shell to show more information about I/O performance obtained from /proc, when available.

  Bug fixes:

- Make sure the sqlite3_set_auxdata() values from multiple triggers within a single statement do not interfere with one another. Ticket dc9b1c91.
- Fix the code generator for expressions of the form "x IN (SELECT...)" where the SELECT statement on the RHS is a correlated subquery. Ticket 5e3c886796e5512e.
- Fix a harmless TSAN warning associated with the sqlite3_db_readonly() interface.

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.