Small. Fast. Reliable.
Choose any three.
This page provides a high-level summary of changes to SQLite.
For more detail, see the Fossil checkin logs at
See the chronology a succinct listing of releases.
- Optimization: When doing an UPDATE on a table with indexes on expressions,
do not update the expression indexes if they do not refer to any of the columns
of the table being updated.
- Allow the xBestIndex() method of virtual table implementations to return
SQLITE_CONSTRAINT to indicate that the proposed query plan is unusable and
should not be given further consideration.
- Added the SQLITE_DBCONFIG_DEFENSIVE option which disables the ability to
create corrupt database files using ordinary SQL.
- Added support for read-only shadow tables when the SQLITE_DBCONFIG_DEFENSIVE
option is enabled.
- Added the PRAGMA legacy_alter_table command, which if enabled causes the
ALTER TABLE command to behave like older version of SQLite (prior to
version 3.25.0) for compatibility.
- Added PRAGMA table_xinfo that works just like PRAGMA table_info
except that it also shows hidden columns in virtual tables.
- Added the explain virtual table
as a run-time loadable extension.
- Add a limit counter to the query planner to prevent excessive
sqlite3_prepare() times for certain pathological SQL inputs.
- Added support for the sqlite3_normalized_sql() interface, when compiling
- Enhanced triggers so that they can use table-valued functions that
exist in schemas other than the schema where the trigger is defined.
- Enhancements to the CLI:
- Improvements to the ".help" command.
- The SQLITE_HISTORY environment variable, if it exists,
specifies the name of the command-line editing history file
- The --deserialize option associated with opening a new database cause the
database file to be read into memory and accessed using the
sqlite3_deserialize() API. This simplifies running tests on a database
without modifying the file on disk.
- Enhancements to the geopoly extension:
- Aways stores polygons
using the binary format, which is faster and uses less space.
- Added the geopoly_regular() function.
- Added the geopoly_ccw() function.
- Enhancements to the session extension:
- Added the SQLITE_CHANGESETAPPLY_INVERT flag
- Added the sqlite3changeset_start_v2() interface and the
- Added the
test-case generator utility.
- SQLITE_SOURCE_ID: "2018-12-01 12:34:55 bf8c1b2b7a5960c282e543b9c293686dccff272512d08865f4600fb58238b4f9"
- SHA3-256 for sqlite3.c: 72c08830da9b5d1cb397c612c0e870d7f5eb41a323b41aa3d8aa5ae9ccedb2c4
- Disallow the use of window functions in the recursive part of
a CTE. Ticket e8275b415a2f03bee
- Fix the behavior of typeof() and length() on virtual tables. Ticket
- Strengthen defenses against deliberately corrupted database files.
- Fix a problem in the query planner that results when a row-value expression
is used with a PRIMARY KEY with redundant columns. Ticket
- Fix the query planner so that it works correctly for IS NOT NULL operators
in the ON clause of a LEFT JOIN with the SQLITE_ENABLE_STAT4 compile-time option.
- SQLITE_SOURCE_ID: "2018-11-05 20:37:38 89e099fbe5e13c33e683bef07361231ca525b88f7907be7092058007b75036f2"
- SHA3-256 for sqlite3.c: 45586e4df74de3a43f3a1f8c7a78c3c3f02edce01af7d10cafe68bb94476a5c5
- Add the PRAGMA legacy_alter_table=ON command that causes the
"ALTER TABLE RENAME" command to behave as it did in SQLite versions 3.24.0
and earlier: references to the renamed table inside the bodies of triggers
and views are not updated. This new pragma provides a compatibility
work around for older programs that expected the older, wonky behavior
of ALTER TABLE RENAME.
- Fix a problem with the new window functions implementation that caused
a malfunction when complicated expressions involving window functions were used
inside of a view.
- Fixes for various other compiler warnings and minor problems associated
with obscure configurations.
- SQLITE_SOURCE_ID: "2018-09-25 19:08:10 fb90e7189ae6d62e77ba3a308ca5d683f90bbe633cf681865365b8e92792d1c7"
- SHA3-256 for sqlite3.c: 34c23ff91631ae10354f8c9d62fd7d65732b3d7f3acfd0bbae31ff4a62fe28af
- Extra sanity checking added to ALTER TABLE in the 3.25.0 release
sometimes raises a false-positive
when the table being modified has a trigger that
updates a virtual table. The false-positive caused the ALTER
TABLE to rollback, thus leaving the schema unchanged.
- The fix in the 3.25.0 release for the endless-loop in the byte-code
associated with the ORDER BY LIMIT optimization did not work for
some queries involving window functions. An additional correction
is required. Ticket
- SQLITE_SOURCE_ID: "2018-09-18 20:20:44 2ac9003de44da7dafa3fbb1915ac5725a9275c86bf2f3b7aa19321bf1460b386"
- SHA3-256 for sqlite3.c: 1b2302e7a54cc99c84ff699a299f61f069a28e1ed090b89e4430ca80ae2aab06
- Add support for window functions
- Enhancements the ALTER TABLE command:
- Add support for renaming columns within a table using
ALTER TABLE table RENAME COLUMN oldname TO newname.
- Fix table rename feature so that it also updates references
to the renamed table in triggers and views.
- Query optimizer improvements:
- Avoid unnecessary loads of columns in an aggregate query that
are not within an aggregate function and that are not part
of the GROUP BY clause.
- The IN-early-out optimization: When doing a look-up on a
multi-column index and an IN operator is used on a column
other than the left-most column, then if no rows match against
the first IN value, check to make sure there exist rows that
match the columns to the right before continuing with the
next IN value.
- Use the transitive property to try to propagate constant
values within the WHERE clause. For example, convert
"a=99 AND b=a" into "a=99 AND b=99".
- Use a separate mutex on every inode in the unix VFS, rather than
a single mutex shared among them all, for slightly better concurrency
in multi-threaded environments.
- Enhance the PRAGMA integrity_check command for improved detection
of problems on the page freelist.
- Output infinity as 1e999 in the ".dump" command of the
- Added the SQLITE_FCNTL_DATA_VERSION file-control.
- Added the Geopoly module
- The ORDER BY LIMIT optimization might have caused an infinite loop
in the byte code of the prepared statement under very obscure
due to a confluence of minor defects in the query optimizer.
Fix for ticket
- On an UPSERT when the order of constraint checks is rearranged,
ensure that the affinity transformations on the inserted content
occur before any of the constraint checks. Fix for ticket
- Avoid using a prepared statement for ".stats on" command of the
CLI after it has been closed by the ".eqp full" logicc. Fix for ticket
- The LIKE optimization was generating incorrect byte-code and hence
getting the wrong answer
if the left-hand operand has numeric affinity and the right-hand-side
pattern is '/%' or if the pattern begins with the ESCAPE character.
Fix for ticket
- SQLITE_SOURCE_ID: "2018-09-15 04:01:47 b63af6c3bd33152742648d5d2e8dc5d5fcbcdd27df409272b6aea00a6f761760"
- SHA3-256 for sqlite3.c: 989e3ff37f2b5eea8e42205f808ccf0ba86c6ea6aa928ad2c011f33a108ac45d
- Add support for PostgreSQL-style UPSERT.
- Add support for auxiliary columns in r-tree tables.
- Add C-language APIs for discovering SQL keywords used by
SQLite: sqlite3_keyword_count(), sqlite3_keyword_name(), and
- Add C-language APIs for dynamic strings based on the
- Enhance ALTER TABLE so that it recognizes "true" and "false" as
valid arguments to DEFAULT.
- Add the sorter-reference optimization as a compile-time option.
Only available if compiled with SQLITE_ENABLE_SORTER_REFERENCES.
- Improve the format of the EXPLAIN QUERY PLAN raw output, so that
it gives better information about the query plan and about the
relationships between the various components of the plan.
- Added the SQLITE_DBCONFIG_RESET_DATABASE option to the
- Automatically intercepts the raw EXPLAIN QUERY PLAN
output and reformats it into an ASCII-art graph.
- Lines that begin with "#" and that are not in the middle of an
SQL statement are interpreted as comments.
- Added the --append option to the ".backup" command.
- Added the ".dbconfig" command.
- UPDATE avoids unnecessary low-level disk writes when the contents
of the database file do not actually change.
For example, "UPDATE t1 SET x=25 WHERE y=?" generates no extra
disk I/O if the value in column x is already 25. Similarly,
when doing UPDATE on records that span multiple pages, only
the subset of pages that actually change are written to disk.
This is a low-level performance optimization only and does not
affect the behavior of TRIGGERs or other higher level SQL
- Queries that use ORDER BY and LIMIT now try to avoid computing
rows that cannot possibly come in under the LIMIT. This can greatly
improve performance of ORDER BY LIMIT queries, especially when the
LIMIT is small relative to the number of unrestricted output rows.
- The OR optimization is allowed to proceed
even if the OR expression has also been converted into an IN
expression. Uses of the OR optimization are now also
more clearly shown in the EXPLAIN QUERY PLAN output.
- The query planner is more aggressive about using
automatic indexes for views and subqueries for which it is
not possible to create a persistent index.
- Make use of the one-pass UPDATE and DELETE query plans in the
R-Tree extension where appropriate.
- Performance improvements in the LEMON-generated parser.
- For the right-hand table of a LEFT JOIN, compute the values
of expressions directly rather than loading precomputed values
out of an expression index as the expression index might
not contain the correct value. Ticket
- Do not attempt to use terms from the WHERE clause to enable
indexed lookup of the right-hand table of a LEFT JOIN. Ticket
- Fix a memory leak that can occur following a failure to open error
in the CSV virtual table
- Fix a long-standing problem wherein a corrupt schema on the
sqlite_sequence table used by AUTOINCREMENT can lead to
a crash. Ticket
- Fix the json_each() function so that it returns
valid results on its "fullkey" column when the input is a simple value
rather than an array or object.
- SQLITE_SOURCE_ID: "2018-06-04 19:24:41 c7ee0833225bfd8c5ec2f9bf62b97c4e04d03bd9566366d5221ac8fb199a87ca"
- SHA3-256 for sqlite3.c: 0d384704e1c66026228336d1e91771d295bf688c9c44c7a44f25a4c16c26ab3c
- Fix two problems in the new LEFT JOIN strength reduction optimization.
- Fix misbehavior of the FTS5 xBestIndex method. Ticket
- Fix a harmless reference to an uninitialized virtual machine register.
- Fix the CLI so that it builds with -DSQLITE_UNTESTABLE
- Fix the eval.c extension
so that it works with PRAGMA empty_result_callbacks=ON.
- Fix the generate_series virtual table so that it correctly returns
no rows if any of its constraints are NULL.
- Performance enhancements in the parser.
- SQLITE_SOURCE_ID: "2018-04-10 17:39:29 4bb2294022060e61de7da5c227a69ccd846ba330e31626ebcd59a94efd148b3b"
- SHA3-256 for sqlite3.c: 65750d1e506f416a0b0b9dd22d171379679c733e3460549754dc68c92705b5dc
- Add the sqlite3_serialize() and sqlite3_deserialize() interfaces when
the SQLITE_ENABLE_DESERIALIZE compile-time option is used.
- Recognize TRUE and FALSE as constants. (For compatibility, if there
exist columns named "true" or "false", then the identifiers refer to the
columns rather than Boolean constants.)
- Support operators IS TRUE, IS FALSE, IS NOT TRUE, and IS NOT FALSE.
- Added the SQLITE_DBSTATUS_CACHE_SPILL option to sqlite3_db_status() for
reporting the number of cache spills that have occurred.
- The "alternate-form-2" flag ("!") on the built-in printf implementation
now causes string substitutions to measure the width and precision in
characters instead of bytes.
- If the xColumn method in a virtual table implementation returns
an error message using sqlite3_result_error() then give that error
message preference over internally-generated messages.
- Added the -A command-line option to the CLI to make it easier to manage
SQLite Archive files.
- Add support for INSERT OR REPLACE, INSERT OR IGNORE, and UPDATE OR REPLACE
in the Zipfile virtual table.
- Enhance the sqlite3changeset_apply() interface so that it is hardened
against attacks from deliberately corrupted changeset objects.
- Added the sqlite3_normalize()
- Query optimizer enhancements:
- Improve the omit-left-join optimization so that it works in cases where
the right-hand table is UNIQUE but not necessarily NOT NULL.
- Improve the push-down optimization so that it works for many LEFT JOINs.
- Add the LEFT JOIN strength reduction optimization that converts a LEFT
JOIN into an ordinary JOIN if there exist terms in the WHERE clause
that would prevent the extra all-NULL row of the LEFT JOIN from
appearing in the output set.
- Avoid unnecessary writes to the sqlite_sequence table when an
AUTOINCREMENT table is updated with an rowid that is less than the
- Bug fixes:
- Fix the parser to accept valid row value syntax.
- Fix the query planner so that it takes into account dependencies in
the arguments to table-valued functions in subexpressions in
the WHERE clause.
- Fix incorrect result with complex OR-connected WHERE and STAT4.
- Fix potential corruption in indexes on expressions due to automatic
- Assertion fault in FTS4.
- Incorrect result on the less-than operator in row values.
- Always interpret non-zero floating-point values as TRUE, even if
the integer part is zero.
- Fix an issue in the fsdir(PATH) table-valued function to the
that caused a segfault if the fsdir() table was used as the inner table
of a join. Problem reported on the mailing list and fixed by check-in
- Issue an error rather instead of an assertion-fault or null-pointer
dereference when the sqlite_master table is corrupted so that the
sqlite_sequence table root page is really a btree-index page. Check-in
- Fix the ANALYZE command so that it computes statistics on tables
whose names begin with "sqlite". Check-in
- Additional fixes for issues detected by
- Fix a possible infinite loop on VACUUM for corrupt database files.
- Disallow parameters in the WITH clause of triggers and views.
- Fix a potential memory leak in row value processing.
- Improve the performance of the replace() SQL function for cases where
there are many substitutions on megabyte-sized strings, in an attempt
to avoid OSSFuzz timeouts during testing.
- Provide an appropriate error message when the sqlite_master table
contains a CREATE TABLE AS statement. Formerly this caused either an
assertion fault or null pointer dereference. Problem found by OSSFuzz
on the GDAL project. Check-in
- Incorrect assert() statement removed. Check-in
- Fix a problem with using the LIKE optimization on an
INTEGER PRIMARY KEY. Check-in
- SQLITE_SOURCE_ID: "2018-04-02 11:04:16 736b53f57f70b23172c30880186dce7ad9baa3b74e3838cae5847cffb98f5cd2"
- SHA3-256 for sqlite3.c: 4bed3dc2dc905ff55e2c21fd2725551fc0ca50912a9c96c6af712a4289cb24fa
- The output of sqlite3_trace_v2() now shows each individual SQL statement
run within a trigger.
- 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.
- Added the rtreecheck() scalar SQL function to the R-Tree extension.
- Added the sqlite3_vtab_nochange() and sqlite3_value_nochange() interfaces
to help virtual table implementations optimize UPDATE operations.
- Added the sqlite3_vtab_collation() interface.
- Added support for the "^" initial token syntax in FTS5.
- New extensions:
- The Zipfile virtual table can read and write a
- Added the fsdir(PATH) table-valued function to the
for listing the files in a directory.
- The sqlite_btreeinfo
eponymous virtual table for introspecting and estimating the sizes of
the btrees in a database.
- 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.
- Query planner enhancements:
- The optimization that uses an index to quickly compute an
aggregate min() or max() is extended to work with
indexes on expressions.
- 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.
- The planner avoids query plans that use indexes with unknown
- The planner omits unused LEFT JOINs even if they are not the
right-most joins of a query.
- Other performance optimizations:
- A smaller and faster implementation of text to floating-point
conversion subroutine: sqlite3AtoF().
- The Lemon parser generator creates a faster parser.
- Use the strcspn() C-library routine to speed up the LIKE and
- Improvements to the command-line shell:
- The ".schema" command shows the structure of virtual tables.
- Added support for reading and writing
SQLite Archive files using
the .archive command.
- Added the experimental .expert command
- Added the ".eqp trigger" variant of the ".eqp" command
- Enhance the ".lint fkey-indexes" command so that it works with
WITHOUT ROWID tables.
- 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.
- Added the edit() SQL function.
- Added the .excel command to simplify exporting
database content to a spreadsheet.
- Databases are opened using
Append VFS when
the --append flag is used on the command line or with the
- Enhance the SQLITE_ENABLE_UPDATE_DELETE_LIMIT compile-time option so
that it works for WITHOUT ROWID tables.
- 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.
- Bug fixes:
- 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
- Incorrect query results when the skip-ahead-distinct optimization is
- Incorrect query results on a join with a ORDER BY DESC. Ticket
- Inconsistent result set column names between CREATE TABLE AS
and a simple SELECT. Ticket
- Assertion fault when doing REPLACE on an index on an expression.
- Assertion fault when doing an IN operator on a constant index.
- SQLITE_SOURCE_ID: "2018-01-22 18:45:57 0c55d179733b46d8d0ba4d88e01a25e10677046ee3da1d5b1581e86726f2171d"
- SHA3-256 for sqlite3.c: 206df47ebc49cd1710ac0dd716ce5de5854826536993f4feab7a49d136b85069
- Take advantage of the atomic-write capabilities in the
F2FS filesystem when available, for
greatly reduced transaction overhead. This currently requires the
SQLITE_ENABLE_BATCH_ATOMIC_WRITE compile-time option.
- Allow ATTACH and DETACH commands to work inside of a transaction.
- Allow WITHOUT ROWID virtual tables to be writable if the PRIMARY KEY
contains exactly one column.
- The "fsync()" that occurs after the header is written in a WAL reset
now uses the sync settings for checkpoints. This means it will use a
"fullfsync" on macs if PRAGMA checkpoint_fullfsync set on.
- The sqlite3_sourceid() function tries to detect if the source code has
been modified from what is checked into version control and if there are
modifications, the last four characters of the version hash are shown as
"alt1" or "alt2". The objective is to detect accidental and/or careless
edits. A forger can subvert this feature.
- Improved de-quoting of column names for CREATE TABLE AS statements with
an aggregate query on the right-hand side.
- Fewer "stat()" system calls issued by the unix VFS.
- Enhanced the LIKE optimization so that it works with an ESCAPE clause.
- Enhanced PRAGMA integrity_check and PRAGMA quick_check to detect obscure
row corruption that they were formerly missing. Also update both pragmas
so that they return error text rather than SQLITE_CORRUPT when encountering
corruption in records.
- The query planner now prefers to implement FROM-clause subqueries using
co-routines rather using the query flattener optimization. Support for
the use of co-routines for subqueries may no longer be disabled.
- Pass information about !=, IS, IS NOT, NOT NULL, and IS NULL constraints
into the xBestIndex method of virtual tables.
- Enhanced the CSV virtual table so that it accepts the last row of
input if the final new-line character is missing.
- Remove the rarely-used "scratch" memory allocator. Replace it with the
SQLITE_CONFIG_SMALL_MALLOC configuration setting that gives SQLite
a hint that large memory allocations should be avoided when possible.
- Added the
swarm virtual table
to the existing union virtual table extension.
- Added the
sqlite_dbpage virtual table
for providing direct access to pages
of the database file. The source code is built into the amalgamation and
is activated using the -DSQLITE_ENABLE_DBPAGE_VTAB compile-time option.
- Add a new type of fts5vocab virtual table - "instance" - that provides
direct access to an FTS5 full-text index at the lowest possible level.
- Remove a call to rand_s() in the Windows VFS since it was causing problems
in Firefox on some older laptops.
- The src/shell.c source code
to the command-line shell is no longer under version control. That file
is now generated as part of the build process.
- Miscellaneous microoptimizations reduce CPU usage by about 2.1%.
- Bug fixes:
- Fix a faulty assert() statement discovered by OSSFuzz.
- Fix an obscure memory leak in sqlite3_result_pointer().
- Avoid a possible use-after-free error by deferring schema resets until
after the query planner has finished running.
- Only use indexes-on-expressions to optimize ORDER BY or GROUP BY if
the COLLATE is correct.
- Fix an assertion fault that was coming up when the expression in an
index-on-expressions is really a constant.
- Fix an assertion fault that could occur following
- Fix a segfault that can occur for queries that use table-valued functions
in an IN or EXISTS subquery.
- Fix a potential integer overflow problem when compiling a particular
horrendous common table expression. This was another problem discovered
by OSSFuzz. Check-in 6ee8cb6ae5.
- Fix a potential out-of-bound read when querying a corrupt database file,
a problem detected by Natalie Silvanovich of Google Project Zero.
- SQLITE_SOURCE_ID: "2017-10-24 18:55:49 1a584e499906b5c87ec7d43d4abce641fdf017c42125b083109bc77c4de48827"
- SHA3-256 for sqlite3.c: 84c181c0283d0320f488357fc8aab51898370c157601459ebee49d779036fe03
- Fix a potential memory leak in the new sqlite3_result_pointer() interface.
- SQLITE_SOURCE_ID: "2017-08-24 16:21:36 8d3a7ea6c5690d6b7c3767558f4f01b511c55463e3f9e64506801fe9b74dce34"
- SHA3-256 for sqlite3.c: 93b1a6d69b48dc39697d1d3a1e4c30b55da0bdd2cad0c054462f91081832954a
- Update the text of error messages returned by sqlite3_errmsg() for some
- Add new pointer passing interfaces.
- Backwards-incompatible changes to some extensions in order to take
advantage of the improved security offered by the new
pointer passing interfaces:
- Extending FTS5 → requires sqlite3_bind_pointer() to find
the fts5_api pointer.
- carray(PTR,N) → requires sqlite3_bind_pointer() to set the PTR parameter.
→ requires sqlite3_bind_pointer() to set the PTR parameter.
- Added the SQLITE_STMT virtual table extension.
- Added the COMPLETION extension - designed to suggest
tab-completions for interactive user interfaces. This is a work in progress.
Expect further enhancements in future releases.
- Added the UNION virtual table extension.
- The built-in date and time functions have been enhanced so that they can be
used in CHECK constraints, in indexes on expressions, and in the WHERE clauses
of partial indexes, provided that they do not use the 'now', 'localtime', or
'utc' keywords. More information.
- Added the sqlite3_prepare_v3() and sqlite3_prepare16_v3() interfaces
with the extra "prepFlags" parameters.
- Provide the SQLITE_PREPARE_PERSISTENT flag for sqlite3_prepare_v3() and
use it to limit lookaside memory misuse by FTS3, FTS5, and the
- Added the PRAGMA secure_delete=FAST command. When secure_delete is
set to FAST, old content is overwritten with zeros as long as that does
not increase the amount of I/O. Deleted content might still persist on
the free-page list but will be purged from all b-tree pages.
- Enhancements to the command-line shell:
- Add support for tab-completion using the COMPLETION extension, for
both readline and linenoise.
- Add the ".cd" command.
- Enhance the ".schema" command to show the schema of all attached
- Enhance ".tables" so that it shows the schema names for all attached
if the name is anything other than "main".
- The ".import" command ignores an initial UTF-8 BOM.
- Added the "--newlines" option to the ".dump" command to cause U+000a and
U+000d characters to be output literally rather than escaped using the
- Query planner enhancements:
- When generating individual loops for each ORed term of an OR scan,
move any constant WHERE expressions outside of the loop, as is
done for top-level loops.
- The query planner examines the values of bound parameters to help
determine if a partial index is usable.
- When deciding between two plans with the same estimated cost, bias
the selection toward the one that does not use the sorter.
- Evaluate WHERE clause constraints involving correlated subqueries
last, in the hope that they never have be evaluated at all.
- Do not use the flattening optimization for a sub-query on the RHS
of a LEFT JOIN if that subquery reads data from a virtual table as
doing so prevents the query planner from creating automatic indexes
on the results of the sub-query, which can slow down the query.
- Add SQLITE_STMTSTATUS_REPREPARE, SQLITE_STMTSTATUS_RUN,
and SQLITE_STMTSTATUS_MEMUSED options for the
- Provide PRAGMA functions for
PRAGMA integrity_check, PRAGMA quick_check, and
- Add the -withoutnulls option to the TCL interface eval method.
- Enhance the sqlite3_analyzer.exe utility program so that it shows
the number of bytes of metadata on btree pages.
- The SQLITE_DBCONFIG_ENABLE_QPSG run-time option and the
SQLITE_ENABLE_QPSG compile-time option enable the
query planner stability guarantee. See also ticket
- Miscellaneous optimizations result in a 2% reduction in CPU cycles used.
- Fix the behavior of sqlite3_column_name() for queries that use the
flattening optimization so that the result is consistent with other
queries that do not use that optimization, and with PostgreSQL, MySQL,
and SQLServer. Ticket de3403bf5ae.
- Fix the query planner so that it knows not to use automatic indexes
on the right table of LEFT JOIN if the WHERE clause uses the IS operator.
Fix for ce68383bf6aba.
- Ensure that the query planner knows that any column of a
flattened LEFT JOIN can be NULL even
if that column is labeled with "NOT NULL". Fix for ticket
- Fix rare false-positives in PRAGMA integrity_check when run on a database connection
with attached databases. Ticket
- Fix a bug (discovered by OSSFuzz) that causes an assertion fault if certain
dodgy CREATE TABLE declarations are used. Ticket
- SQLITE_SOURCE_ID: "2017-08-01 13:24:15 9501e22dfeebdcefa783575e47c60b514d7c2e0cad73b2a496c0bc4b680900a8"
- SHA3-256 for sqlite3.c: 79b7f3b977360456350219cba0ba0e5eb55910565eab68ea83edda2f968ebe95
- Fix a bug that might cause duplicate output rows when an IN operator is
used in the WHERE clause.
- SQLITE_SOURCE_ID: "2017-06-17 09:59:36 036ebf729e4b21035d7f4f8e35a6f705e6bf99887889e2dc14ebf2242e7930dd"
- SHA3-256 for sqlite3.c: b0bd014f2776b9f9508a3fc6432f70e2436bf54475369f88f0aeef75b0eec93e
- Fix a bug associated with auto_vacuum that can lead to database
corruption. The bug was introduced in version 3.16.0 (2017-01-02).
- SQLITE_SOURCE_ID: "2017-06-16 13:41:15 77bb46233db03a3338bacf7e56f439be3dfd1926ea0c44d252eeafa7a7b31c06"
- SHA3-256 for sqlite3.c: 334eaf776db9d09a4e69d6012c266bc837107edc2c981739ef82081cb11c5723
- Fix a bug associated with auto_vacuum that can lead to database
corruption. The bug was introduced in version 3.16.0 (2017-01-02).
- SQLITE_SOURCE_ID: "2017-06-08 14:26:16 0ee482a1e0eae22e08edc8978c9733a96603d4509645f348ebf55b579e89636b"
- SHA3-256 for sqlite3.c: 368f1d31272b1739f804bcfa5485e5de62678015c4adbe575003ded85c164bb8
- Fix more bugs in the LEFT JOIN flattening optimization. Ticket
- SQLITE_SOURCE_ID: "2017-05-25 16:50:27 edb4e819b0c058c7d74d27ebd14cc5ceb2bad6a6144a486a970182b7afe3f8b9"
- SHA3-256 for sqlite3.c: 1be0c457869c1f7eba58c3b5097b9ec307a15be338308bee8e5be8570bcf5d1e
- Fix a bug in the LEFT JOIN flattening optimization. Ticket
- Remove a surplus semicolon that was causing problems for older versions of MSVC.
- SQLITE_SOURCE_ID: "2017-05-24 13:08:33 f6d7b988f40217821a382bc298180e9e6794f3ed79a83c6ef5cae048989b3f86"
- SHA3-256 for sqlite3.c: 996b2aff37b6e0c6663d0312cd921bbdf6826c989cbbb07dadde5e9672889bca
- The SQLITE_READ authorizer callback is invoked once
with a column name that is an empty string
for every table referenced in a query from which no columns are extracted.
- When using an index on an expression, try to use expression values already
available in the index, rather than loading the original columns and recomputing
- Enhance the flattening optimization so that it is able to flatten views
on the right-hand side of a LEFT JOIN.
- Use replace() instead of char() for escaping newline and carriage-return
characters embedded in strings in the .dump output from the command-line shell.
- Avoid unnecessary foreign key processing in UPDATE statements that do not
touch the columns that are constrained by the foreign keys.
- On a DISTINCT query that uses an index, try to skip ahead to the next distinct
entry using the index rather than stepping through rows, when an appropriate
index is available.
- Avoid unnecessary invalidation of sqlite3_blob handles when making
changes to unrelated tables.
- Transfer any terms of the HAVING clause that use only columns mentioned in
the GROUP BY clause over to the WHERE clause for faster processing.
- Reuse the same materialization of a VIEW if that VIEW appears more than
once in the same query.
- Enhance PRAGMA integrity_check so that it identifies tables that have two
or more rows with the same rowid.
- Enhance the FTS5 query syntax so that column filters
may be applied to arbitrary expressions.
- Enhance the json_extract() function to cache and reuse parses of JSON
- Added the anycollseq.c
loadable extension that allows a generic SQLite database connection to
read a schema that contains unknown and/or
application-specific collating sequences.
- Fix a problem in REPLACE that can result in a corrupt database containing
two or more rows with the same rowid. Fix for ticket
- Fix a problem in PRAGMA integrity_check that was causing a subsequent
VACUUM to behave suboptimally.
- Fix the PRAGMA foreign_key_check command so that it works correctly with
foreign keys on WITHOUT ROWID tables.
- Fix a bug in the b-tree logic that can result in incorrect duplicate answers
for IN operator queries. Ticket
- Disallow leading zeros in numeric constants in JSON. Fix for ticket
- Disallow control characters inside of strings in JSON. Fix for ticket
- Limit the depth of recursion for JSON objects and arrays in order to avoid
excess stack usage in the recursive descent parser. Fix for ticket
- SQLITE_SOURCE_ID: "2017-05-22 13:58:13 28a94eb282822cad1d1420f2dad6bf65e4b8b9062eda4a0b9ee8270b2c608e40"
- SHA3-256 for sqlite3.c: c30326aa1a9cc342061b755725eac9270109acf878bc59200dd4b1cea6bc2908
- Added the PRAGMA optimize command
- The SQLite version identifier returned by the sqlite_source_id() SQL function
and the sqlite3_sourceid() C API and found in the SQLITE_SOURCE_ID macro is
now a 64-digit SHA3-256 hash instead of a 40-digit SHA1 hash.
- Added the json_patch() SQL function to the JSON1 extension.
- Enhance the LIKE optimization so that it works for arbitrary expressions on
the left-hand side as long as the LIKE pattern on the right-hand side does not
begin with a digit or minus sign.
- Added the sqlite3_set_last_insert_rowid() interface and use the new interface in
the FTS3, FTS4, and FTS5 extensions to ensure that the sqlite3_last_insert_rowid()
interface always returns reasonable values.
- Enhance PRAGMA integrity_check and PRAGMA quick_check so that they verify
- Enhance the query plans for joins to detect empty tables early and
halt without doing unnecessary work.
- Enhance the sqlite3_mprintf() family of interfaces and the printf SQL function
to put comma separators at the thousands marks for integers, if the "," format modifier
is used in between the "%" and the "d" (example: "%,d").
- Added the -DSQLITE_MAX_MEMORY=N compile-time option.
- Added the .sha3sum dot-command and the .selftest dot-command
to the command-line shell
- Begin enforcing SQLITE_LIMIT_VDBE_OP. This can be used, for example, to prevent
excessively large prepared statements in systems that accept SQL queries from
- Various performance improvements.
- Ensure that indexed expressions with collating sequences are handled correctly.
Fix for ticket eb703ba7b50c1a5.
- Fix a bug in the 'start of ...' modifiers for the date and time functions.
- Fix a potential segfault in complex recursive triggers, resulting from a
bug in the OP_Once opcode introduced as part of a performance optimization in
- In the RBU extension, add extra sync operations to avoid the possibility of
corruption following a power failure.
- The sqlite3_trace_v2() output for nested SQL statements should always begin
with a "--" comment marker.
- SQLITE_SOURCE_ID: "2017-03-28 18:48:43 424a0d380332858ee55bdebc4af3789f74e70a2b3ba1cf29d84b9b4bcf3e2e37"
- SHA3-256 for sqlite3.c: cbf322df1f76be57fb3be84f3da1fc71d1d3dfdb7e7c2757fb0ff630b3bc2e5d
- Approximately 25% better performance from the R-Tree extension.
- Uses compiler built-ins (ex: __builtin_bswap32() or _byteswap_ulong())
for byteswapping when available.
- Uses the sqlite3_blob key/value access object instead of SQL
for pulling content out of R-Tree nodes
- Other miscellaneous enhancements such as loop unrolling.
- Add the SQLITE_DEFAULT_LOOKASIDE compile-time option.
- Increase the default lookaside
size from 512,125 to 1200,100
as this provides better performance while only adding 56KB
of extra memory per connection. Memory-sensitive
applications can restore the old
default at compile-time, start-time, or run-time.
- Use compiler built-ins __builtin_sub_overflow(), __builtin_add_overflow(),
and __builtin_mul_overflow() when available. (All compiler
built-ins can be omitted with the SQLITE_DISABLE_INTRINSIC compile-time
- Added the SQLITE_ENABLE_NULL_TRIM compile-time option, which
can result in significantly smaller database files for some
applications, at the risk of being incompatible with older
versions of SQLite.
- Change SQLITE_DEFAULT_PCACHE_INITSZ from 100 to 20, for
- Added the SQLITE_UINT64_TYPE compile-time option as an
analog to SQLITE_INT64_TYPE.
- Perform some UPDATE operations in a single pass instead of
in two passes.
- Enhance the session extension to support WITHOUT ROWID
- Fixed performance problems and potential stack overflows
when creating views from multi-row VALUES clauses with
hundreds of thousands of rows.
- Added the sha1.c
- In the command-line shell, enhance the ".mode" command so that it
restores the default column and row separators for modes "line",
"list", "column", and "tcl".
- Enhance the SQLITE_DIRECT_OVERFLOW_READ option so that it works
in WAL mode as long as the pages being read are not in the WAL file.
- Enhance the
Lemon parser generator
so that it can store the parser object as a stack variable rather than
allocating space from the heap and make use of that enhancement in
- Other performance improvements. Uses about 6.5% fewer CPU cycles.
- Throw an error if the ON clause of a LEFT JOIN references tables
to the right of the ON clause. This is the same behavior as
PostgreSQL. Formerly, SQLite silently converted the LEFT JOIN
into an INNER JOIN. Fix for ticket
- Use the correct affinity for columns of automatic indexes. Ticket
- Ensure that the sqlite3_blob_reopen() interface can correctly
handle short rows. Fix for ticket
- SQLITE_SOURCE_ID: "2017-02-13 16:02:40 ada05cfa86ad7f5645450ac7a2a21c9aa6e57d2c"
- SHA1 for sqlite3.c: cc7d708bb073c44102a59ed63ce6142da1f174d1
- 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.
- 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
- 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
- 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.
- SQLITE_SOURCE_ID: "2017-01-06 16:32:41 a65a62893ca8319e89e48b8a38cf8a59c69a8209"
- SHA1 for sqlite3.c: 2bebdc3f24911c0d12b6d6c0123c3f84d6946b08
- 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.
- SQLITE_SOURCE_ID: "2017-01-03 18:27:03 979f04392853b8053817a3eea2fc679947b437fd"
- SHA1 for sqlite3.c: 354f6223490b30fd5320b4066b1535e4ce33988d
- Uses 9% fewer CPU cycles. (See the CPU performance measurement report for
details on how this performance increase was computed.)
- Added experimental support for PRAGMA functions.
- Added the SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE option to sqlite3_db_config().
- Enhance the date and time functions so that the 'unixepoch' modifier works
for the full span of supported dates.
- Changed the default configuration of the lookaside memory allocator from
500 slots of 128 bytes each into 125 slots of 512 bytes each.
- Enhanced "WHERE x NOT NULL" partial indexes so that they are usable if
the "x" column appears in a LIKE or GLOB operator.
- Enhanced sqlite3_interrupt() so that it interrupts checkpoint operations that
are in process.
- Enhanced the LIKE and GLOB matching algorithm to be faster
for cases when the pattern contains multiple wildcards.
- Added the SQLITE_FCNTL_WIN32_GET_HANDLE file control opcode.
- Added ".mode quote" to the command-line shell.
- Added ".lint fkey-indexes" to the command-line shell.
- Added the .imposter dot-command to the command-line shell.
- Added the remember(V,PTR)
SQL function as a loadable extension.
- Rename the SQLITE_OMIT_BUILTIN_TEST compile-time option to
SQLITE_UNTESTABLE to better reflect the implications of using it.
- 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
- Correctly handle the integer literal -0x8000000000000000 in the query planner.
- SQLITE_SOURCE_ID: "2017-01-02 11:57:58 04ac0b75b1716541b2b97704f4809cb7ef19cccf"
- SHA1 for sqlite3.c: e2920fb885569d14197c9b7958e6f1db573ee669
- Multiple bug fixes to the row value logic that was introduced in version 3.15.0.
- Fix a NULL pointer dereference in ATTACH/DETACH following a maliciously constructed
syntax error. Ticket
- Fix a crash that can occur following an out-of-memory condition
in the built-in instr() function.
- In the JSON extension, fix the JSON validator so that it correctly rejects
invalid backslash escapes within strings.
- SQLITE_SOURCE_ID: "2016-11-28 19:13:37 bbd85d235f7037c6a033a9690534391ffeacecc8"
- SHA1 for sqlite3.c: 06d77b42a3e70609f8d4bbb97caf53652f1082cb
- Added SQLITE_FCNTL_WIN32_GET_HANDLE file control opcode.
- Fix the VACUUM command so that it spills excess content to disk rather
than holding everything in memory, and possible causing an out-of-memory
error for larger database files. This fixes an issue introduced by
- Fix a case (present since 3.8.0 - 2013-08-26)
where OR-connected terms in the ON clause of a LEFT JOIN
might cause incorrect results. Ticket
- Fix a case where the use of row values in the ON clause of a LEFT JOIN
might cause incorrect results. Ticket
- SQLITE_SOURCE_ID: "2016-11-04 12:08:49 1136863c76576110e710dd5d69ab6bf347c65e36"
- SHA1 for sqlite3.c: e7c26a7be3e431dd06898f8d262c4ef240c07366
- Added support for row values.
- Allow deterministic SQL functions in the WHERE clause of a partial index.
- Added the "modeof=filename" URI parameter on the unix VFS
- Added support for SQLITE_DBCONFIG_MAINDBNAME.
- Added the ability to VACUUM an ATTACH-ed database.
- Enhancements to the command-line shell:
- Add the ".testcase" and ".check" dot-commands.
- Added the --new option to the ".open" dot-command, causing
any prior content in the database to be purged prior to
- Enhance the fts5vocab virtual table to handle "ORDER BY term" efficiently.
- Miscellaneous micro-optimizations reduce CPU usage by more than 7%
on common workloads. Most optimization in this release has been on the
- The multiply operator now correctly detects 64-bit integer overflow
and promotes to floating point in all corner-cases. Fix for ticket
- Correct handling of columns with redundant unique indexes when those
columns are used on the LHS of an IN operator. Fix for ticket
- Skip NULL entries on range queries in indexes on expressions.
Fix for ticket
- Ensure that the AUTOINCREMENT counters in the sqlite_sequence
table are initialized doing "Xfer Optimization" on "INSERT ... SELECT"
statements. Fix for ticket
- Make sure the ORDER BY LIMIT optimization
(from check-in 559733b09e)
works with IN operators on INTEGER PRIMARY KEYs. Fix for ticket
- SQLITE_SOURCE_ID: "2016-10-14 10:20:30 707875582fcba352b4906a595ad89198d84711d8"
- SHA1 for sqlite3.c: fba106f8f6493c66eeed08a2dfff0907de54ae76
- Improved support for using the STDCALL calling convention in winsqlite3.dll.
- Fix the sqlite3_trace_v2() interface so that it is disabled if either the
callback or the mask arguments are zero, in accordance with the documentation.
- Fix commenting errors and improve the comments generated on EXPLAIN listings
when the -DSQLITE_ENABLE_EXPLAIN_COMMENTS compile-time option is used.
- Fix the ".read" command in the command-line shell so that it understands
that its input is not interactive.
- Correct affinity computations for a SELECT on the RHS of an IN operator.
Fix for ticket 199df4168c.
- The ORDER BY LIMIT optimization is not valid unless the inner-most IN operator
loop is actually used by the query plan. Fix for
- Fix an internal code generator problem that was causing some DELETE operations
to no-op. Ticket ef360601
- SQLITE_SOURCE_ID: "2016-09-12 18:50:49 29dbef4b8585f753861a36d6dd102ca634197bd6"
- SHA1 for sqlite3.c: bcc4a1989db45e7f223191f2d0f66c1c28946383
- A performance enhancement to the page-cache "truncate" operation
reduces COMMIT time by dozens of milliseconds on systems with a
large page cache.
- Fix to the --rbu option of sqldiff.
- SQLITE_SOURCE_ID: "2016-08-11 18:53:32 a12d8059770df4bca59e321c266410344242bf7b"
- SHA1 for sqlite3.c: d545b24892278272ce4e40e0567d69c8babf12ea
Celebrating the SQLite "π release"
with a home-baked pie.
- Added support for WITHOUT ROWID virtual tables.
- Improved the query planner so that the OR optimization can
be used on virtual tables even if one or more of the disjuncts
use the LIKE, GLOB, REGEXP, MATCH operators.
- Added the CSV virtual table for reading
RFC 4180 formatted comma-separated
- Added the carray() table-valued function extension.
- Enabled persistent loadable extensions using the new
SQLITE_OK_LOAD_PERMANENTLY return code from the extension
- Added the SQLITE_DBSTATUS_CACHE_USED_SHARED option to sqlite3_db_status().
- Add the
loadable extension - a VFS shim that measures I/O
together with an eponymous virtual table that provides access to the measurements.
- Improved algorithm for running queries with both an ORDER BY and a LIMIT where
only the inner-most loop naturally generates rows in the correct order.
- Enhancements to Lemon parser generator, so that it generates a
- The PRAGMA compile_options command now attempts to show the version number
of the compiler that generated the library.
- Enhance PRAGMA table_info so that it provides information about
eponymous virtual tables.
- Added the "win32-none" VFS, analogous to the "unix-none" VFS, that works like
the default "win32" VFS except that it ignores all file locks.
- The query planner uses a full scan of a partial index instead of a
full scan of the main table, in cases where that makes sense.
- Allow table-valued functions to appear on the right-hand side of an IN operator.
- Created the dbhash.exe command-line utility.
- Added two new C-language interfaces: sqlite3_expanded_sql() and
sqlite3_trace_v2(). These new interfaces subsume the functions of
sqlite3_trace() and sqlite3_profile() which are now deprecated.
- Added the json_quote() SQL function to the json1 extension.
- Disable the authorizer callback while reparsing the schema.
- Added the SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION compile-time option and turned that
option on by default when building the command-line shell.
- Fix the ALTER TABLE command so that it does not corrupt descending indexes
when adding a column to a legacy file format database. Ticket
- Fix a NULL-pointer dereference/crash that could occurs when a transitive WHERE
clause references a non-existent collating sequence. Ticket
- Improved the cost estimation for an index scan which includes a WHERE clause
that can be partially or fully evaluated using columns in the index and without
having to do a table lookup. This fixes a performance regression that occurred
for some obscure queries following the ORDER BY LIMIT optimization introduced
in version 3.12.0.
- SQLITE_SOURCE_ID: "2016-08-08 13:40:27 d5e98057028abcf7217d0d2b2e29bbbcdf09d6de"
- SHA1 for sqlite3.c: 234a3275d03a287434ace3ccdf1afb208e6b0e92
- Postpone I/O associated with TEMP files for as long as possible, with the hope
that the I/O can ultimately be avoided completely.
- Merged the session extension into trunk.
- Added the ".auth ON|OFF" command to the command-line shell.
- Added the "--indent" option to the ".schema" and ".fullschema" commands of
the command-line shell, to turn on pretty-printing.
- Added the ".eqp full" option to the command-line shell, that does both EXPLAIN
and EXPLAIN QUERY PLAN on each statement that is evaluated.
- Improved unicode filename handling in the command-line shell on Windows.
- Improved resistance against goofy query planner decisions caused by
incomplete or incorrect modifications to the sqlite_stat1
table by the application.
- Added the sqlite3_db_config(db,SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION) interface
which allows the sqlite3_load_extension() C-API to be enabled while keeping the
load_extension() SQL function disabled for security.
- Change the temporary directory search algorithm on Unix to allow directories with
write and execute permission, but without read permission, to serve as temporary
directories. Apply this same standard to the "." fallback directory.
- Fix a problem with the multi-row one-pass DELETE optimization that was
causing it to compute incorrect answers with a self-referential subquery in
the WHERE clause. Fix for ticket
- Fix a possible segfault with DELETE when table is a rowid table with an
INTEGER PRIMARY KEY and the WHERE clause contains a OR and
the table has one or more indexes that are able to trigger the OR optimization,
but none of the indexes reference any table columns other than the INTEGER PRIMARY KEY.
- When checking for the WHERE-clause push-down optimization, verify that all terms
of the compound inner SELECT are non-aggregate, not just the last term. Fix for ticket
- Fix a locking race condition in Windows that can occur when two or more processes
attempt to recover the same hot journal at the same time.
- SQLITE_SOURCE_ID: "2016-05-18 10:57:30 fc49f556e48970561d7ab6a2f24fdd7d9eb81ff2"
- SHA1 for sqlite3.c: 9b9171b1e6ce7a980e6b714e9c0d9112657ad552
Bug fixes backported into patch release 184.108.40.206 (2014-04-03):
- Add a
for a problem that might cause incorrect query results on a query that mixes
DISTINCT, GROUP BY in a subquery, and ORDER BY.
Bug fixes backported into patch release 220.127.116.11 (2014-03-26):
- Fix a potential buffer overread that could result when trying to search a
corrupt database file.
- 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.
- 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.
- 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.
- SQLITE_SOURCE_ID: "2016-04-18 17:30:31 92dc59fd5ad66f646666042eb04195e3a61a9e8e"
- SHA1 for sqlite3.c: de5a5898ebd3a3477d4652db143746d008b24c83
- Fix a boundary condition error introduced by version 3.12.0
that can result in a crash during heavy SAVEPOINT usage.
- 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.
- SQLITE_SOURCE_ID: "2016-04-08 15:09:49 fe7d3b75fe1bde41511b323925af8ae1b910bc4d"
- SHA1 for sqlite3.c: ebb18593350779850e3e1a930eb84a70fca8c1d1
- Backport a
simple query planner optimization
that allows the IS operator
to drive an index on a LEFT OUTER JOIN. No other changes from the
version 3.9.2 baseline.
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.
- 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
- 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
- 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.
- Make sure the sqlite3_set_auxdata() values from multiple triggers
within a single statement do not interfere with one another.
- Fix the code generator for expressions of the form "x IN (SELECT...)" where
the SELECT statement on the RHS is a correlated subquery.
- Fix a harmless TSAN warning associated with the sqlite3_db_readonly() interface.
- SQLITE_SOURCE_ID: "2016-03-29 10:14:15 e9bb4cf40f4971974a74468ef922bdee481c988b"
- SHA1 for sqlite3.c: cba2be96d27cb51978cd4a200397a4ad178986eb
- Improvements to the Makefiles and build scripts used by VisualStudio.
- Fix an FTS5 issue in which the 'optimize' command could cause index corruption.
- Fix a buffer overread that might occur if FTS5 is used to query a corrupt
- Increase the maximum "scope" value for the spellfix1 extension from 6 to 30.
- SQLITE_SOURCE_ID: "2016-03-03 16:17:53 f047920ce16971e573bc6ec9a48b118c9de2b3a7"
- SHA1 for sqlite3.c: 3da832fd2af36eaedb05d61a8f4c2bb9f3d54265
- Enhanced WAL mode so that it works efficiently with transactions that are
larger than the cache_size.
- Added the FTS5 detail option.
- Added the "EXTRA" option to PRAGMA synchronous that does a sync of the
containing directory when a rollback journal is unlinked in DELETE mode,
for better durability. The SQLITE_EXTRA_DURABLE compile-time option enables
PRAGMA synchronous=EXTRA by default.
- Enhanced the query planner so that it is able to use
a covering index as part of the OR optimization.
- Avoid recomputing NOT NULL and CHECK constraints on unchanged
columns in UPDATE statement.
- Many micro-optimizations, resulting in a library that is
faster than the previous release.
Enhancements to the command-line shell:
- By default, the shell is now in "auto-explain" mode. The output of
EXPLAIN commands is automatically formatted.
- Added the ".vfslist" dot-command.
- The SQLITE_ENABLE_EXPLAIN_COMMENTS compile-time option is now turned
on by default in the standard builds.
Enhancements to the TCL Interface:
- If a database connection is opened with the "-uri 1" option, then
URI filenames are honored by the "backup" and "restore" commands.
- Added the "-sourceid" option to the "sqlite3" command.
- Improved pthreads detection in configure scripts.
- Add the ability to do MSVC Windows builds from the amalgamation tarball.
- Fix an issue with incorrect sharing of VDBE temporary registers between
co-routines that could cause incorrect query results in obscure cases. Ticket
- Fix a problem in the sqlite3_result_subtype() interface that could
cause problems for the json1 extension under obscure circumstances.
Fix for ticket
- Escape control characters in JSON strings. Fix for ticket
- Reenable the xCurrentTime and xGetLastError methods in the built-in
unix VFSes as long as SQLITE_OMIT_DEPRECATED is not defined.
- Because of continuing security concerns, the two-argument version of
of the seldom-used and little-known fts3_tokenizer() function is
disabled unless SQLite is compiled with the SQLITE_ENABLE_FTS3_TOKENIZER.
- SQLITE_SOURCE_ID: "2016-02-15 17:29:24 3d862f207e3adc00f78066799ac5a8c282430a5f"
- SHA1 for sqlite3.c: df01436c5fcfe72d1a95bc172158219796e1a90b
Critical bug fix:
- Version 3.10.0 introduced a case-folding bug in the LIKE operator which is fixed
by this patch release. Ticket
Other miscellaneous bug fixes:
- Fix a use-after-free that can occur when SQLite is compiled with -DSQLITE_HAS_CODEC.
- Fix the build so that it works with -DSQLITE_OMIT_WAL.
- Fix the configure script for the amalgamation so that the --readline option works again
on Raspberry PIs.
- SQLITE_SOURCE_ID: "2016-01-20 15:27:19 17efb4209f97fb4971656086b138599a91a75ff9"
- SHA1 for sqlite3.c: f7088b19d97cd7a1c805ee95c696abd54f01de4f
- Add the SQLITE_FCNTL_JOURNAL_POINTER file control.
- Fix a 16-month-old bug in the query planner that could generate incorrect results
when a scalar subquery attempts to use the block sorting optimization. Ticket
- SQLITE_SOURCE_ID: "2016-01-13 21:41:56 254419c36766225ca542ae873ed38255e3fb8588"
- SHA1 for sqlite3.c: 1398ba8e4043550a533cdd0834bfdad1c9eab0f4
- Added support for LIKE, GLOB, and REGEXP operators on virtual tables.
- Added the colUsed field to sqlite3_index_info for use by
the sqlite3_module.xBestIndex method.
- Enhance the PRAGMA cache_spill statement to accept a 32-bit integer
parameter which is the threshold below which cache spilling is prohibited.
- On unix, if a symlink to a database file is opened, then the corresponding
journal files are based on the actual filename, not the symlink name.
- Added the "--transaction" option to sqldiff.
- Added the sqlite3_db_cacheflush() interface.
- Added the sqlite3_strlike() interface.
- When using memory-mapped I/O map the database file read-only so that stray pointers
and/or array overruns in the application cannot accidentally modify the database file.
- Added the experimental sqlite3_snapshot_get(), sqlite3_snapshot_open(),
and sqlite3_snapshot_free() interfaces. These are subject to change or removal in
a subsequent release.
- Enhance the 'utc' modifier in the date and time functions so that it is a no-op if
the date/time is known to already be in UTC. (This is not a compatibility break since
the behavior has long been documented as "undefined" in that case.)
- Added the json_group_array() and json_group_object() SQL functions in the
- Added the SQLITE_LIKE_DOESNT_MATCH_BLOBS compile-time option.
- Many small performance optimizations.
- Work around a sign-extension bug in the optimizer of the HP C compiler on HP/UX.
Enhancements to the command-line shell:
- Added the ".changes ON|OFF" and ".vfsinfo" dot-commands.
- Translate between MBCS and UTF8 when
running in cmd.exe on Windows.
Enhancements to makefiles:
- Added the --enable-editline and --enable-static-shell options
to the various autoconf-generated configure scripts.
- Omit all use of "awk" in the makefiles, to make building easier for MSVC users.
- Fix inconsistent integer to floating-point comparison operations that
could result in a corrupt index if the index is created on a table
column that contains both large integers and floating point values
of similar magnitude. Ticket
- Fix an infinite-loop in the query planner that could occur on
malformed common table expressions.
- Various bug fixes in the sqldiff tool.
- SQLITE_SOURCE_ID: "2016-01-06 11:01:07 fd0a50f0797d154fefff724624f00548b5320566"
- SHA1 for sqlite3.c: b92ca988ebb6df02ac0c8f866dbf3256740408ac
- Fix the schema parser so that it interprets certain
(obscure and ill-formed)
CREATE TABLE statements the same as legacy. Fix for ticket
- Fix a query planner problem that could result in an incorrect
answer due to the use of automatic indexing in subqueries in
the FROM clause of a correlated scalar subqueries. Fix for ticket
- SQLITE_SOURCE_ID: "2015-11-02 18:31:45 bda77dda9697c463c3d0704014d51627fceee328"
- SHA1 for sqlite3.c: 1c4013876f50bbaa3e6f0f98e0147c76287684c1
- Fix the json1 extension so that it does not recognize ASCII form-feed as a
whitespace character, in order to comply with RFC-7159. Fix for ticket
- Add a few #ifdef and build script changes to address compilation issues that
appeared after the 3.9.0 release.
- SQLITE_SOURCE_ID: ""2015-10-16 17:31:12 767c1727fec4ce11b83f25b3f1bfcfe68a2c8b02"
- SHA1 for sqlite3.c: 5e6d1873a32d82c2cf8581f143649940cac8ae49
- The version numbering conventions for SQLite are revised to use the
emerging standard of semantic versioning.
New Features And Enhancements:
- Added the json1 extension module in the source tree, and in the amalgamation.
Enable support using the SQLITE_ENABLE_JSON1 compile-time option.
- Added Full Text Search version 5 (FTS5) to the amalgamation, enabled
using SQLITE_ENABLE_FTS5. FTS5 will be considered "experimental" (subject
to incompatible changes) for at least one more release cycle.
- The CREATE VIEW statement now accepts an optional list of
column names following the view name.
- Added support for indexes on expressions.
- Added support for table-valued functions in the FROM clause of a
- Added support for eponymous virtual tables.
- A VIEW may now reference undefined tables and functions when
initially created. Missing tables and functions are reported when
the VIEW is used in a query.
- Added the sqlite3_value_subtype() and sqlite3_result_subtype()
interfaced (used by the json1 extension).
- The query planner is now able to use partial indexes that contain
AND-connected terms in the WHERE clause.
- The sqlite3_analyzer.exe utility is updated to report the depth of
each btree and to show the average fanout for indexes and
WITHOUT ROWID tables.
- Enhanced the dbstat virtual table so that it can be used as a
table-valued function where the argument is the schema to be
- The sqlite3_memory_alarm() interface, which has been deprecated and
undocumented for 8 years, is changed into a no-op.
- Fixed a critical bug in the
SQLite Encryption Extension that
could cause the database to become unreadable and unrecoverable if a VACUUM command
changed the size of the encryption nonce.
- Added a memory barrier in the implementation of
sqlite3_initialize() to help ensure that it is thread-safe.
- Fix the OR optimization so that it always ignores subplans that
do not use an index.
- Do not apply the WHERE-clause pushdown optimization on terms that originate
in the ON or USING clause of a LEFT JOIN. Fix for ticket
- SQLITE_SOURCE_ID: "2015-10-14 12:29:53 a721fc0d89495518fe5612e2e3bbc60befd2e90d"
- SHA1 for sqlite3.c: c03e47e152ddb9c342b84ffb39448bf4a2bd4288
- Restore an undocumented side-effect of PRAGMA cache_size: force
the database schema to be parsed if the database has not been previously accessed.
- Fix a long-standing problem in sqlite3_changes() for WITHOUT ROWID
tables that was reported a few hours after the 3.8.11 release.
- SQLITE_SOURCE_ID: "2015-07-29 20:00:57 cf538e2783e468bbc25e7cb2a9ee64d3e0e80b2f"
- SHA1 for sqlite3.c: 3be71d99121fe5b17f057011025bcf84e7cc6c84
- Added the experimental RBU extension. Note that this extension is experimental
and subject to change in incompatible ways.
- Added the experimental FTS5 extension. Note that this extension is experimental
and subject to change in incompatible ways.
- Added the sqlite3_value_dup() and sqlite3_value_free() interfaces.
- Enhance the spellfix1 extension to support ON CONFLICT clauses.
- The IS operator is now able to drive indexes.
- Enhance the query planner to permit automatic indexing on FROM-clause
subqueries that are implemented by co-routine.
- Disallow the use of "rowid" in common table expressions.
- Added the PRAGMA cell_size_check command for better and earlier
detection of database file corruption.
- Added the matchinfo 'b' flag to the matchinfo() function in FTS3.
- Improved fuzz-testing of database files, with fixes for problems found.
- Add the fuzzcheck test program and automatically run this program
using both SQL and database test cases on "make test".
- Added the SQLITE_MUTEX_STATIC_VFS1 static mutex and use it in the
- The sqlite3_profile() callback is invoked (by sqlite3_reset() or
sqlite3_finalize()) for statements that did not run to completion.
- Enhance the page cache so that it can preallocate a block of memory to
use for the initial set page cache lines. Set the default preallocation
to 100 pages. Yields about a 5% performance increase on common workloads.
- Miscellaneous micro-optimizations result in 22.3% more work for the same
number of CPU cycles relative to the previous release.
SQLite now runs twice as fast as version 3.8.0 and three times as
fast as version 3.3.9.
cachegrind on the
speedtest1.c workload on
Ubuntu 14.04 x64 with gcc 4.8.2 and -Os. Your performance may vary.)
- Added the sqlite3_result_zeroblob64() and sqlite3_bind_zeroblob64()
Important bug fixes:
- Fix CREATE TABLE AS so that columns of type TEXT never end up
holding an INT value. Ticket
- Fix CREATE TABLE AS so that it does not leave NULL entries in the
sqlite_master table if the SELECT statement on the right-hand side
aborts with an error. Ticket
- Fix the skip-scan optimization so that it works correctly when
the OR optimization is used on WITHOUT ROWID tables. Ticket
- Fix the sqlite3_memory_used() and sqlite3_memory_highwater() interfaces
so that they actually do provide a 64-bit answer.
- SQLITE_SOURCE_ID: "2015-07-27 13:49:41 b8e92227a469de677a66da62e4361f099c0b79d0"
- SHA1 for sqlite3.c: 719f6891abcd9c459b5460b191d731cd12a3643e
- Fix an index corruption issue introduced by version 3.8.7. An index
with a TEXT key can be corrupted by an INSERT into the corresponding
table if the table has two nested triggers that convert the key value to INTEGER
and back to TEXT again.
- SQLITE_SOURCE_ID: "2015-05-20 18:17:19 2ef4f3a5b1d1d0c4338f8243d40a2452cc1f7fe4"
- SHA1 for sqlite3.c: 638abb77965332c956dbbd2c8e4248e84da4eb63
- Make sqlite3_compileoption_used() responsive to the SQLITE_ENABLE_DBSTAT_VTAB
- Fix a harmless warning in the command-line shell on some versions of MSVC.
- Fix minor issues with the dbstat virtual table.
- SQLITE_SOURCE_ID: "2015-05-09 12:14:55 05b4b1f2a937c06c90db70c09890038f6c98ec40"
- SHA1 for sqlite3.c: 85e4e1c08c7df28ef61bb9759a0d466e0eefbaa2
- Added the sqldiff.exe utility program for computing the differences between two
SQLite database files.
- Added the matchinfo y flag to the
matchinfo() function of FTS3.
- Performance improvements for ORDER BY, VACUUM, CREATE INDEX,
PRAGMA integrity_check, and PRAGMA quick_check.
- Fix many obscure problems discovered while SQL fuzzing.
- Identify all methods for important objects in the interface documentation.
- Made the American Fuzzy Lop fuzzer
a standard part of SQLite's testing strategy.
- Add the ".binary" and ".limits" commands to the command-line shell.
- Make the dbstat virtual table part of standard builds when
compiled with the SQLITE_ENABLE_DBSTAT_VTAB option.
- SQLITE_SOURCE_ID: "2015-05-07 11:53:08 cf975957b9ae671f34bb65f049acf351e650d437"
- SHA1 for sqlite3.c: 0b34f0de356a3f21b9dfc761f3b7821b6353c570
- Add VxWorks-7 as an officially supported and tested platform.
- Added the sqlite3_status64() interface.
- Fix memory size tracking so that it works even if SQLite uses more
than 2GiB of memory.
- Added the PRAGMA index_xinfo command.
- Fix a potential 32-bit integer overflow problem in the
sqlite3_blob_read() and sqlite3_blob_write() interfaces.
- Ensure that prepared statements automatically reset on extended
error codes of SQLITE_BUSY and SQLITE_LOCKED even when compiled
- Correct miscounts in the sqlite3_analyzer.exe utility related
to WITHOUT ROWID tables.
- Added the ".dbinfo" command to the command-line shell.
- Improve the performance of fts3/4 queries that use the OR operator
and at least one auxiliary fts function.
- Fix a bug in the fts3 snippet() function causing it to omit
leading separator characters from snippets that begin with the
first token in a column.
- SQLITE_SOURCE_ID: "2015-04-08 12:16:33 8a8ffc862e96f57aa698f93de10dee28e69f6e09"
- SHA1 for sqlite3.c: 49f1c3ae347e1327b5aaa6c7f76126bdf09c6f42
- Fix a bug (ticket
2326c258d02ead33) that can lead
to incorrect results if the qualifying constraint of a partial index appears in the
ON clause of a LEFT JOIN.
- Added the ability to link against the
command-line editing library in unix builds of the command-line shell.
- SQLITE_SOURCE_ID: "2015-02-25 13:29:11 9d6c1880fb75660bbabd693175579529785f8a6b"
- SHA1 for sqlite3.c: 74ee38c8c6fd175ec85a47276dfcefe8a262827a
- Enhance sqlite3_wal_checkpoint_v2(TRUNCATE) interface so that it truncates the
WAL file even if there is no checkpoint work to be done.
- SQLITE_SOURCE_ID: "2015-01-30 14:30:45 7757fc721220e136620a89c9d28247f28bbbc098"
- SHA1 for sqlite3.c: 85ce79948116aa9a087ec345c9d2ce2c1d3cd8af
- Fix a bug in the sorting logic, present since version 3.8.4, that can cause
output to appear in the wrong order on queries that contains an ORDER BY clause,
a LIMIT clause, and that have approximately 60 or more columns in the result set.
- SQLITE_SOURCE_ID: "2015-01-20 16:51:25 f73337e3e289915a76ca96e7a05a1a8d4e890d55"
- SHA1 for sqlite3.c: 33987fb50dcc09f1429a653d6b47672f5a96f19e
- Added the PRAGMA data_version command that can be used to determine if
a database file has been modified by another process.
- Added the SQLITE_CHECKPOINT_TRUNCATE option to the
sqlite3_wal_checkpoint_v2() interface, with corresponding enhancements
to PRAGMA wal_checkpoint.
- Added the sqlite3_stmt_scanstatus() interface, available only when
compiled with SQLITE_ENABLE_STMT_SCANSTATUS.
- The sqlite3_table_column_metadata() is enhanced to work correctly on
WITHOUT ROWID tables and to check for the existence of a
a table if the column name parameter is NULL. The interface is now
also included in the build by default, without requiring
the SQLITE_ENABLE_COLUMN_METADATA compile-time option.
- Added the SQLITE_ENABLE_API_ARMOR compile-time option.
- Added the SQLITE_REVERSE_UNORDERED_SELECTS compile-time option.
- Added the SQLITE_SORTER_PMASZ compile-time option and SQLITE_CONFIG_PMASZ
- Added the SQLITE_CONFIG_PCACHE_HDRSZ option to sqlite3_config()
which makes it easier for applications to determine the appropriate
amount of memory for use with SQLITE_CONFIG_PAGECACHE.
- The number of rows in a VALUES clause is no longer limited by
- Added the eval.c
loadable extension that implements an eval() SQL function that will recursively
- Reduce the number of memcpy() operations involved in balancing a b-tree,
for 3.2% overall performance boost.
- Improvements to cost estimates for the skip-scan optimization.
- The automatic indexing optimization is now capable of generating
a partial index if that is appropriate.
- Ensure durability following a power loss with
"PRAGMA journal_mode=TRUNCATE" by calling fsync() right after truncating
the journal file.
- The query planner now recognizes that any column in the right-hand
table of a LEFT JOIN can be NULL, even if that column has a NOT NULL
constraint. Avoid trying to optimize out NULL tests in those cases.
Fix for ticket
- Make sure ORDER BY puts rows in ascending order even if the DISTINCT
operator is implemented using a descending index. Fix for ticket
- Fix data races that might occur under stress when running with many threads
in shared cache mode where some of the threads are opening and
- Fix obscure crash bugs found by
american fuzzy lop. Ticket
- Work around a GCC optimizer bug (for gcc 4.2.1 on MacOS 10.7) that caused the
R-Tree extension to compute incorrect results when compiled with -O3.
- Disable the use of the strchrnul() C-library routine unless it is
specifically enabled using the -DHAVE_STRCHRNULL compile-time option.
- Improvements to the effectiveness and accuracy of the
likelihood(), likely(), and unlikely() SQL hint functions.
- SQLITE_SOURCE_ID: "2015-01-16 12:08:06 7d68a42face3ab14ed88407d4331872f5b243fdf"
- SHA1 for sqlite3.c: 91aea4cc722371d58aae3d22e94d2a4165276905
- Bug fix: Add in a mutex that was omitted from the previous release.
- SQLITE_SOURCE_ID: "2014-12-09 01:34:36 f66f7a17b78ba617acde90fc810107f34f1a1f2e"
- SHA1 for sqlite3.c: 0a56693a3c24aa3217098afab1b6fecccdedfd23
- Bug fix: Ensure the cached KeyInfo objects (an internal abstraction not visible to the
application) do not go stale when operating in shared cache mode and frequently closing
and reopening some database connections while leaving other database connections on the
same shared cache open continuously. Ticket
- Bug fix: Recognize that any column in the right-hand table of a LEFT JOIN can be
NULL even if the column has a NOT NULL constraint. Do not apply optimizations that
assume the column is never NULL. Ticket
- SQLITE_SOURCE_ID: "2014-12-05 22:29:24 647e77e853e81a5effeb4c33477910400a67ba86"
- SHA1 for sqlite3.c: 3ad2f5ba3a4a3e3e51a1dac9fda9224b359f0261
- Enhance the ROLLBACK command so that pending queries are allowed to continue as long
as the schema is unchanged. Formerly, a ROLLBACK would cause all pending queries to
fail with an SQLITE_ABORT or SQLITE_ABORT_ROLLBACK error. That error is still returned
if the ROLLBACK modifies the schema.
- Bug fix: Make sure that NULL results from OP_Column are fully and completely NULL and
do not have the MEM_Ephem bit set.
- Bug fix: The %c format in sqlite3_mprintf() is able to handle precisions greater than 70.
- Bug fix: Do not automatically remove the DISTINCT keyword from a SELECT that forms
the right-hand side of an IN operator since it is necessary if the SELECT also
contains a LIMIT.
- SQLITE_SOURCE_ID: "2014-11-18 20:57:56 2ab564bf9655b7c7b97ab85cafc8a48329b27f93"
- SHA1 for sqlite3.c: b2a68d5783f48dba6a8cb50d8bf69b238c5ec53a
- In PRAGMA journal_mode=TRUNCATE mode, call fsync() immediately after truncating
the journal file to ensure that the transaction is durable across a power loss.
- Fix an assertion fault that can occur when updating the NULL value of a field
at the end of a table that was added using ALTER TABLE ADD COLUMN.
- Do not attempt to use the strchrnul() function from the standard C library unless
the HAVE_STRCHRNULL compile-time option is set.
- Fix a couple of problems associated with running an UPDATE or DELETE on a
VIEW with a rowid in the WHERE clause.
- SQLITE_SOURCE_ID: "2014-10-29 13:59:56 3b7b72c4685aa5cf5e675c2c47ebec10d9704221"
- SHA1 for sqlite3.c: 2d25bd1a73dc40f538f3a81c28e6efa5999bdf0c
- Many micro-optimizations result in 20.3% more work for the same number
of CPU cycles relative to the previous release.
The cumulative performance increase since version 3.8.0 is 61%.
cachegrind on the
speedtest1.c workload on
Ubuntu 13.10 x64 with gcc 4.8.1 and -Os. Your performance may vary.)
- The sorter can use auxiliary helper threads to increase real-time response.
This feature is off by default and may be
enabled using the PRAGMA threads command or the SQLITE_DEFAULT_WORKER_THREADS
- Enhance the skip-scan optimization so that it is able to skip index terms that
occur in the middle of the index, not just as the left-hand side of the index.
- Improved optimization of CAST operators.
- Various improvements in how the query planner uses sqlite_stat4
information to estimate plan costs.
- Added new interfaces with 64-bit length parameters:
- Added the new interface sqlite3_msize() that returns the size of a memory allocation
obtained from sqlite3_malloc64() and its variants.
- Added the SQLITE_LIMIT_WORKER_THREADS option to sqlite3_limit() and
PRAGMA threads command for configuring the number of available worker threads.
- The spellfix1 extension allows the application to optionally specify the rowid for
- Added the User Authentication
- Fix a bug in the partial index implementation that might result in an incorrect
answer if a partial index is used in a subquery or in a view.
- Fix a query planner bug that might cause a table to be scanned in the wrong direction
(thus reversing the order of output) when a DESC index is used to implement the ORDER BY
clause on a query that has an identical GROUP BY clause.
- Fix a bug in sqlite3_trace() that was causing it to sometimes fail to print
an SQL statement if that statement needed to be re-prepared.
- Fix a faulty assert() statement.
Test, Debug, and Analysis Changes:
- Show ASCII-art abstract syntax tree diagrams using the ".selecttrace"
and ".wheretrace" commands in the
command-line shell when compiled with SQLITE_DEBUG, SQLITE_ENABLE_SELECTTRACE,
and SQLITE_ENABLE_WHERETRACE. Also provide the sqlite3TreeViewExpr() and
sqlite3TreeViewSelect() entry points that can be invoked from with the
debugger to show the parse tree when stopped at a breakpoint.
- Drop support for SQLITE_ENABLE_TREE_EXPLAIN. The SELECTTRACE mechanism provides
more useful diagnostics information.
- New options to the command-line shell for configuring auxiliary
memory usage: --pagecache, --lookaside, and --scratch.
- SQLITE_SOURCE_ID: "2014-10-17 11:24:17 e4ab094f8afce0817f4074e823fabe59fc29ebb4"
- SHA1 for sqlite3.c: 56dcf5e931a9e1fa12fc2d600cd91d3bf9b639cd
- Added support for hexadecimal integer literals in the SQL parser.
- Enhanced the PRAGMA integrity_check command to detect UNIQUE and
NOT NULL constraint violations.
- Increase the maximum value of SQLITE_MAX_ATTACHED from 62 to 125.
- Increase the timeout in WAL mode before issuing an SQLITE_PROTOCOL
error from 1 second to 10 seconds.
- Added the likely(X) SQL function.
- The unicode61 tokenizer is now included in FTS4 by default.
- Trigger automatic reprepares on all prepared statements when ANALYZE is
- Added a new
loadable extension source code file to the source tree:
- Add extension functions readfile(X) and writefile(X,Y)
(using code copy/pasted from fileio.c in the previous bullet) to the
- Added the .fullschema dot-command to the command-line shell.
- Deactivate the DISTINCT keyword on subqueries on the
right-hand side of the IN operator.
- Add the capability of evaluating an IN operator as a sequence
of comparisons as an alternative to using a table lookup. Use the sequence
of comparisons implementation in circumstances where it is likely to be
faster, such as when the right-hand side of the IN operator
is small and/or changes frequently.
- The query planner now uses sqlite_stat4 information (created by ANALYZE)
to help determine if the skip-scan optimization is appropriate.
- Ensure that the query planner never tries to use a self-made transient
index in place of a schema-defined index.
- Other minor tweaks to improve the quality of VDBE code.
- Fix a bug in CREATE UNIQUE INDEX, introduced when WITHOUT ROWID
support added in version 3.8.2, that allows a non-unique NOT NULL column to be
given a UNIQUE index.
- Fix a bug in R-Tree extension, introduced in the previous release,
that can cause an
incorrect results for queries that use the rowid of the R-Tree on the
left-hand side of an IN operator.
- Fix the sqlite3_stmt_busy() interface so that it gives the correct answer
for ROLLBACK statements that have been stepped but never reset.
- Fix a bug in that would cause a null pointer to be dereferenced
if a column with a DEFAULT that is an aggregate function tried to usee its
- CSV output from the command-line shell now always uses CRNL for the
row separator and avoids inserting CR in front of NLs contained in
- Fix a column affinity problem with the IN operator.
- Fix the ANALYZE command so that it adds correct samples for
WITHOUT ROWID tables in the sqlite_stat4 table.
- SQLITE_SOURCE_ID: "2014-08-15 11:46:33 9491ba7d738528f168657adb43a198238abde19e"
- SHA1 for sqlite3.c: 72c64f05cd9babb9c0f9b3c82536d83be7804b1c
- Added support for partial sorting by index.
- Enhance the query planner so that it always prefers an index that uses a superset of
WHERE clause terms relative to some other index.
- Improvements to the automerge command of FTS4 to better control the index size
for a full-text index that is subject to a large number of updates.
- Added the sqlite3_rtree_query_callback() interface to R-Tree extension
- Added new URI query parameters "nolock" and "immutable".
- Use less memory by not remembering CHECK constraints on read-only
- Enable the OR optimization for WITHOUT ROWID tables.
- Render expressions of the form "x IN (?)" (with a single value in
the list on the right-hand side of the IN operator) as if they where "x==?",
Similarly optimize "x NOT IN (?)"
- Add the ".system" and ".once" commands to the command-line shell.
- Added the SQLITE_IOCAP_IMMUTABLE bit to the set of bits that can be returned by
the xDeviceCharacteristics method of a VFS.
- Added the SQLITE_TESTCTRL_BYTEORDER test control.
- OFFSET clause ignored on queries without a FROM clause.
- Assertion fault on queries involving expressions of the form
"x IN (?)". Ticket e39d032577.
- Incorrect column datatype reported.
- Duplicate row returned on a query against a table with more than
16 indices, each on a separate column, and all used via OR-connected constraints.
- Partial index causes assertion fault on UPDATE OR REPLACE.
- Crash when calling undocumented SQL function sqlite_rename_parent()
with NULL parameters.
- ORDER BY ignored if the query has an identical GROUP BY.
- The group_concat(x,'') SQL function returns NULL instead of an empty string
when all inputs are empty strings.
- Fix a bug in the VDBE code generator that caused crashes when
doing an INSERT INTO ... SELECT statement where the number of columns
being inserted is larger than the number of columns in the destination
- Fix a problem in CSV import in the command-line shell
where if the leftmost field of the first row
in the CSV file was both zero bytes in size and unquoted no data would
- Fix a problem in FTS4 where the left-most column that contained
the notindexed column name as a prefix
was not indexed rather than the column whose name matched exactly.
- Fix the sqlite3_db_readonly() interface so that it returns true if
the database is read-only due to the file format write version number
being too large.
- SQLITE_SOURCE_ID: "2014-06-04 14:06:34 b1ed4f2a34ba66c29b130f8d13e9092758019212"
- SHA1 for sqlite3.c: 7bc194957238c61b1a47f301270286be5bc5208c
- Add a
for a problem that might cause incorrect query results on a query that mixes
DISTINCT, GROUP BY in a subquery, and ORDER BY.
- SQLITE_SOURCE_ID: "2014-04-03 16:53:12 a611fa96c4a848614efe899130359c9f6fb889c3"
- SHA1 for sqlite3.c: 310a1faeb9332a3cd8d1f53b4a2e055abf537bdc
- Fix a potential buffer overread that could result when trying to search a
corrupt database file.
- SQLITE_SOURCE_ID: "2014-03-26 18:51:19 02ea166372bdb2ef9d8dfbb05e78a97609673a8e"
- SHA1 for sqlite3.c: 4685ca86c2ea0649ed9f59a500013e90b3fe6d03
- Work around a C-preprocessor macro conflict that breaks the build for some
configurations with Microsoft Visual Studio.
- When computing the cost of the skip-scan optimization, take into account the
fact that multiple seeks are required.
- SQLITE_SOURCE_ID: "2014-03-11 15:27:36 018d317b1257ce68a92908b05c9c7cf1494050d0"
- SHA1 for sqlite3.c: d5cd1535053a50aa8633725e3595740b33709ac5
- Code optimization and refactoring for improved performance.
- Add the ".clone" and ".save" commands to the command-line shell.
- Update the banner on the command-line shell to alert novice users when they
are using an ephemeral in-memory database.
- Fix editline support in the command-line shell.
- Add support for coverage testing of VDBE programs using the
SQLITE_TESTCTRL_VDBE_COVERAGE verb of sqlite3_test_control().
- Update the _FILE_OFFSET_BITS macro so that builds work again on QNX.
- Change the datatype of SrcList.nSrc from type u8 to type int to work around
an issue in the C compiler on AIX.
- Get extension loading working on Cygwin.
- Bug fix: Fix the char() SQL function so that it returns an empty string
rather than an "out of memory" error when called with zero arguments.
- Bug fix: DISTINCT now recognizes that a zeroblob and a blob of all
0x00 bytes are the same thing.
- Bug fix: Compute the correct answer for queries that contain an IS NOT NULL
term in the WHERE clause and also contain an OR term in the WHERE clause and
are compiled with SQLITE_ENABLE_STAT4.
- Bug fix: Make sure "rowid" columns are correctly resolved in joins between
normal tables and WITHOUT ROWID tables.
- Bug fix: Make sure the same temporary registers are not used in concurrent
co-routines used to implement compound SELECT statements containing ORDER
BY clauses, as such use can lead to incorrect answers.
- Bug fix: Ensure that "ORDER BY random()" clauses do not get optimized out.
- Bug fix: Repair a name-resolution error that can occur in sub-select statements
contained within a TRIGGER.
- Bug fix: Fix column default values expressions of the form
"DEFAULT(-(-9223372036854775808))" so that they work correctly, initializing
the column to a floating point value approximately equal to
- SQLITE_SOURCE_ID: "2014-03-10 12:20:37 530a1ee7dc2435f80960ce4710a3c2d2bfaaccc5"
- SHA1 for sqlite3.c: b0c22e5f15f5ba2afd017ecd990ea507918afe1c
- Fix a bug (ticket 4c86b126f2)
that causes rows to go missing on some queries with OR clauses and
IS NOT NULL operators in the WHERE clause, when the SQLITE_ENABLE_STAT3
or SQLITE_ENABLE_STAT4 compile-time options are used.
- Fix a harmless compiler warning that was causing problems for VS2013.
- SQLITE_SOURCE_ID: "2014-02-11 14:52:19 ea3317a4803d71d88183b29f1d3086f46d68a00e"
- SHA1 for sqlite3.c: 990004ef2d0eec6a339e4caa562423897fe02bf0
- Added support for common table expressions and the WITH clause.
- Added the printf() SQL function.
- Added SQLITE_DETERMINISTIC as an optional bit in the 4th argument to the
sqlite3_create_function() and related interfaces, providing applications with
the ability to create new functions that can be factored out of inner loops when
they have constant arguments.
- Add SQLITE_READONLY_DBMOVED error code, returned at the beginning of a
transaction, to indicate that the underlying database file has been renamed
or moved out from under SQLite.
- Allow arbitrary expressions, including function calls and subqueries, in
the filename argument to ATTACH.
- Allow a VALUES clause to be used anywhere a SELECT statement is valid.
- Reseed the PRNG used by sqlite3_randomness(N,P) when invoked with N==0.
Automatically reseed after a fork() on unix.
- Enhance the spellfix1 virtual table so that it can search efficiently by rowid.
- Performance enhancements.
- Improvements to the comments in the VDBE byte-code display when running EXPLAIN.
- Add the "%token_class" directive to Lemon parser generator and use it to simplify
- Change the Lemon source code to avoid calling C-library functions that OpenBSD
considers dangerous. (Ex: sprintf).
- Bug fix: In the command-line shell CSV import feature, do not end a field
when an escaped double-quote occurs at the end of a CRLN line.
"2014-02-03 13:52:03 e816dd924619db5f766de6df74ea2194f3e3b538"
- SHA1 for sqlite3.c: 98a07da78f71b0275e8d9c510486877adc31dbee
- Changed the defined behavior for the CAST expression when floating point values
greater than +9223372036854775807 are cast into into integers so that the
result is the largest possible integer, +9223372036854775807, instead of
the smallest possible integer, -9223372036854775808. After this change,
CAST(9223372036854775809.0 as INT) yields +9223372036854775807 instead
← Potentially Incompatible Change!
- Added support for WITHOUT ROWID tables.
- Added the skip-scan optimization to the query planner.
- Extended the virtual table interface, and in particular the
sqlite3_index_info object to allow a virtual table to report its estimate
on the number of rows that will be returned by a query.
- Update the R-Tree extension to make use of the enhanced virtual table
- Add the SQLITE_ENABLE_EXPLAIN_COMMENTS compile-time option.
- Enhanced the comments that are inserted into EXPLAIN output when the
SQLITE_ENABLE_EXPLAIN_COMMENTS compile-time option is enabled.
- Performance enhancements in the VDBE, especially to the OP_Column opcode.
- Factor constant subexpressions in inner loops out to the initialization code
in prepared statements.
- Enhanced the ".explain" output formatting of the command-line shell
so that loops are indented to better show the structure of the program.
- Enhanced the ".timer" feature of the command-line shell so that it
shows wall-clock time in addition to system and user times.
"2013-12-06 14:53:30 27392118af4c38c5203a04b8013e1afdb1cebd0d"
- SHA1 for sqlite3.c: 6422c7d69866f5ea3db0968f67ee596e7114544e
- Added the unlikely() and likelihood() SQL functions to be used
as hints to the query planner.
- Enhancements to the query planner:
- Take into account the fact WHERE clause terms that cannot be used with indices
still probably reduce the number of output rows.
- Estimate the sizes of table and index rows and use the smallest applicable B-Tree
for full scans and "count(*)" operations.
- Added the soft_heap_limit pragma.
- Added support for SQLITE_ENABLE_STAT4
- Added support for "sz=NNN" parameters at the end of
used to specify the average length in bytes for table and index rows.
- Avoid running foreign-key constraint checks on an UPDATE if none of the
modified columns are associated with foreign keys.
- Added the SQLITE_MINIMUM_FILE_DESCRIPTOR compile-time option
- Added the win32-longpath VFS on windows, permitting filenames up to 32K
characters in length.
- The Date And Time Functions are enhanced so that the current time
(ex: julianday('now')) is always the same for multiple function invocations
within the same sqlite3_step() call.
- Add the "totype.c" extension, implementing the tointeger() and toreal()
- FTS4 queries are better able to make use of docid<$limit constraints to
limit the amount of I/O required.
- Added the hidden fts4aux languageid column to the fts4aux virtual table.
- The VACUUM command packs the database about 1% tighter.
- The sqlite3_analyzer utility program is updated to provide better descriptions
and to compute a more accurate estimate for "Non-sequential pages"
- Refactor the implementation of PRAGMA statements to improve parsing performance.
- The directory used to hold temporary files on unix can now be set using
the SQLITE_TMPDIR environment variable, which takes precedence over the
TMPDIR environment variable. The sqlite3_temp_directory global variable
still has higher precedence than both environment variables, however.
- Added the PRAGMA stats statement.
- Bug fix: Return the correct answer for "SELECT count(*) FROM table" even if
there is a partial index on the table. Ticket
"2013-10-17 12:57:35 c78be6d786c19073b3a6730dfe3fb1be54f5657a"
- SHA1 for sqlite3.c: 0a54d76566728c2ba96292a49b138e4f69a7c391
- Fix a bug in the optimization that attempts to omit unused LEFT JOINs
"2013-09-03 17:11:13 7dd4968f235d6e1ca9547cda9cf3bd570e1609ef"
- SHA1 for sqlite3.c: 6cf0c7b46975a87a0dc3fba69c229a7de61b0c21
- Fix an off-by-one error that caused quoted empty string at the end of a
CRNL-terminated line of CSV input to be misread by the command-line shell.
- Fix a query planner bug involving a LEFT JOIN with a BETWEEN or LIKE/GLOB
constraint and then another INNER JOIN to the right that involves an OR constraint.
- Fix a query planner bug that could result in a segfault when querying tables
with a UNIQUE or PRIMARY KEY constraint with more than four columns.
"2013-08-29 17:35:01 352362bc01660edfbda08179d60f09e2038a2f49"
- SHA1 for sqlite3.c: 99906bf63e6cef63d6f3d7f8526ac4a70e76559e
- Add support for partial indexes
- Cut-over to the next generation query planner for faster and better query plans.
- The EXPLAIN QUERY PLAN output no longer shows an estimate of the number of
rows generated by each loop in a join.
- Added the FTS4 notindexed option, allowing non-indexed columns in an FTS4 table.
- Added the SQLITE_STMTSTATUS_VM_STEP option to sqlite3_stmt_status().
- Added the cache_spill pragma.
- Added the query_only pragma.
- Added the defer_foreign_keys pragma and the
sqlite3_db_status(db, SQLITE_DBSTATUS_DEFERRED_FKS,...) C-language interface.
- Added the "percentile()" function as a loadable extension in the ext/misc
subdirectory of the source tree.
- Added the SQLITE_ALLOW_URI_AUTHORITY compile-time option.
- Add the sqlite3_cancel_auto_extension(X) interface.
- A running SELECT statement that lacks a FROM clause (or any other statement that
never reads or writes from any database file) will not prevent a read
transaction from closing.
- Add the SQLITE_DEFAULT_AUTOMATIC_INDEX compile-time option. Setting this option
to 0 disables automatic indices by default.
- Issue an SQLITE_WARNING_AUTOINDEX warning on the SQLITE_CONFIG_LOG whenever
the query planner uses an automatic index.
- Added the SQLITE_FTS3_MAX_EXPR_DEPTH compile-time option.
- Added an optional 5th parameter defining the collating sequence to the
next_char() extension SQL function.
- The SQLITE_BUSY_SNAPSHOT extended error code is returned in WAL mode when
a read transaction cannot be upgraded to a write transaction because the read is
on an older snapshot.
- Enhancements to the sqlite3_analyzer utility program to provide size
information separately for each individual index of a table, in addition to
the aggregate size.
- Allow read transactions to be freely opened and closed by SQL statements run
from within the implementation of application-defined SQL functions if the
function is called by a SELECT statement that does not access any database table.
- Disable the use of posix_fallocate() on all (unix) systems unless the
HAVE_POSIX_FALLOCATE compile-time option is used.
- Update the ".import" command in the command-line shell to support multi-line
fields and correct RFC-4180 quoting and to issue warning and/or error messages
if the input text is not strictly RFC-4180 compliant.
- Bug fix: In the unicode61 tokenizer of FTS4, treat all private code points
as identifier symbols.
- Bug fix: Bare identifiers in ORDER BY clauses bind more tightly to output column
names, but identifiers in expressions bind more tightly to input column names.
Identifiers in GROUP BY clauses always prefer output column names, however.
- Bug fixes: Multiple problems in the legacy query optimizer were fixed by the
move to NGQP.
"2013-08-26 04:50:08 f64cd21e2e23ed7cff48f7dafa5e76adde9321c2"
- SHA1 for sqlite3.c: b7347f4b4c2a840e6ba12040093d606bd16ea21e
- Add support for memory-mapped I/O.
- Add the sqlite3_strglob() convenience interface.
- Assigned the integer at offset 68 in the database header as the
Application ID for when SQLite is used as an application file-format.
Added the PRAGMA application_id command to query and set the Application ID.
- Report rollback recovery in the error log as SQLITE_NOTICE_RECOVER_ROLLBACK.
Change the error log code for WAL recover from
SQLITE_OK to SQLITE_NOTICE_RECOVER_WAL.
- Report the risky uses of unlinked database files and
database filename aliasing as SQLITE_WARNING messages in the error log.
- Added the SQLITE_TRACE_SIZE_LIMIT compile-time option.
- Increase the default value of SQLITE_MAX_SCHEMA_RETRY to 50 and make sure
that it is honored in every place that a schema change might force a statement
- Add a new test harness called "mptester" used to verify correct operation
when multiple processes are using the same database file at the same time.
- Enhance the extension loading mechanism to be more flexible (while
still maintaining backwards compatibility) in two ways:
- If the default entry point "sqlite3_extension_init" is not present in
the loadable extension, also try an entry point "sqlite3_X_init" where
"X" is based on the shared library filename. This allows every extension
to have a different entry point, which allows them to be statically linked
with no code changes.
- The shared library filename passed to sqlite3_load_extension() may
omit the filename suffix, and an appropriate architecture-dependent
suffix (".so", ".dylib", or ".dll") will be added automatically.
- Added many new loadable extensions to the source tree, including
amatch, closure, fuzzer, ieee754, nextchar, regexp, spellfix,
and wholenumber. See header comments on each extension source file
for further information about what that extension does.
- Enhance FTS3 to avoid using excess stack space when there are a huge
number of terms on the right-hand side of the MATCH operator. A side-effect
of this change is that the MATCH operator can only accommodate 12 NEAR
operators at a time.
- Enhance the fts4aux virtual table so that it can be a TEMP table.
- Added the fts3tokenize virtual table to the full-text search logic.
- Query planner enhancement: Use the transitive property of constraints
to move constraints into the outer loops of a join whenever possible,
thereby reducing the amount of work that needs to occur in inner loops.
- Discontinue the use of posix_fallocate() on unix, as it does not work on all
- Improved tracing and debugging facilities in the Windows VFS.
- Bug fix: Fix a potential database corruption bug
in shared cache mode when one
database connection is closed while another is in the middle of a write
- Bug fix:
Only consider AS names from the result set as candidates for resolving
identifiers in the WHERE clause if there are no other matches. In the
ORDER BY clause, AS names take priority over any column names.
- Bug fix: Do not allow a virtual table to cancel the ORDER BY clause unless
all outer loops are guaranteed to return no more than one row result.
- Bug fix: Do not suppress the ORDER BY clause on a virtual table query if
an IN constraint is used.
- Bug fix: The command-line shell gives an exit code of 0 when terminated
using the ".quit" command.
- Bug fix: Make sure PRAGMA statements appear in sqlite3_trace() output.
- Bug fix: When a compound query that uses an ORDER BY clause
with a COLLATE operator, make sure that the sorting occurs
according to the specified collation and that the comparisons associate with
the compound query use the native collation. Ticket
- Bug fix: Makes sure the authorizer callback gets
a valid pointer to the string "ROWID" for the column-name parameter when
doing an UPDATE that changes the rowid. Ticket
- Bug fix: Do not move WHERE clause terms inside OR expressions that are
contained within an ON clause of a LEFT JOIN. Ticket
- Bug fix: Make sure an error is always reported when attempting to preform
an operation that requires a collating sequence that is missing.
"2013-05-20 00:56:22 118a3b35693b134d56ebd780123b7fd6f1497668"
- SHA1 for sqlite3.c: 246987605d0503c700a08b9ee99a6b5d67454aab
- Fix a bug (present since version 3.7.13) that could result in database corruption
on windows if two or more processes try to access the same database file at the
same time and immediately after third process crashed in the middle of committing
to that same file. See ticket
7ff3120e4f for further
"2013-04-12 11:52:43 cbea02d93865ce0e06789db95fd9168ebac970c7"
- SHA1 for sqlite3.c: d466b54789dff4fb0238b9232e74896deaefab94
- Fix for a bug in the ORDER BY optimizer that was introduced in
version 3.7.15 which would sometimes optimize out the sorting step
when in fact the sort was required.
- Fix a long-standing bug in the CAST expression that would recognize UTF16
characters as digits even if their most-significant-byte was not zero.
- Fix a bug in the NEAR operator of FTS3 when applied to subfields.
- Fix a long-standing bug in the storage engine that would (very rarely)
cause a spurious report of an SQLITE_CORRUPT error but which was otherwise
- The SQLITE_OMIT_MERGE_SORT option has been removed. The merge sorter is
now a required component of SQLite.
- Fixed lots of spelling errors in the source-code comments
"2013-03-29 13:44:34 527231bc67285f01fb18d4451b28f61da3c4e39d"
- SHA1 for sqlite3.c: 7a91ceceac9bcf47ceb8219126276e5518f7ff5a
- Added the PRAGMA foreign_key_check command.
- Added new extended error codes for all SQLITE_CONSTRAINT errors
- Added the SQLITE_READONLY_ROLLBACK extended error code for when a database
cannot be opened because it needs rollback recovery but is read-only.
- Added SQL functions unicode(A) and char(X1,...,XN).
- Performance improvements for PRAGMA incremental_vacuum, especially in
cases where the number of free pages is greater than what will fit on a
single trunk page of the freelist.
- Improved optimization of queries containing aggregate min() or max().
- Enhance virtual tables so that they can potentially use an index when
the WHERE clause contains the IN operator.
- Allow indices to be used for sorting even if prior terms of the index
are constrained by IN operators in the WHERE clause.
- Enhance the PRAGMA table_info command so that the "pk" column is an
increasing integer to show the order of columns in the primary key.
- Enhance the query optimizer to exploit transitive join constraints.
- Performance improvements in the query optimizer.
- Allow the error message from PRAGMA integrity_check to be longer than
- Improved name resolution for deeply nested queries.
- Added the test_regexp.c module as a demonstration of how to implement
the REGEXP operator.
- Improved error messages in the RTREE extension.
- Enhance the command-line shell so that a non-zero argument to the
".exit" command causes the shell to exit immediately without cleanly
shutting down the database connection.
- Improved error messages for invalid boolean arguments to dot-commands
in the command-line shell.
- Improved error messages for "foreign key mismatch" showing the names of
the two tables involved.
- Remove all uses of umask() in the unix VFS.
- Added the PRAGMA vdbe_addoptrace and PRAGMA vdbe_debug commands.
- Change to use strncmp() or the equivalent instead of memcmp() when
comparing non-zero-terminated strings.
- Update cygwin interfaces to omit deprecated API calls.
- Enhance the spellfix1 extension so that the edit distance cost table can
be changed at runtime by inserting a string like 'edit_cost_table=TABLE'
into the "command" field.
- Bug fix: repair a long-standing problem that could cause incorrect query
results in a 3-way or larger join that compared INTEGER fields against TEXT
fields in two or more places.
- Bug fix: Issue an error message if the 16-bit reference counter on a
view overflows due to an overly complex query.
- Bug fix: Avoid leaking memory on LIMIT and OFFSET clauses in deeply
nested UNION ALL queries.
- Bug fix: Make sure the schema is up-to-date prior to running pragmas
table_info, index_list, index_info, and foreign_key_list.
"2013-03-18 11:39:23 66d5f2b76750f3520eb7a495f6247206758f5b90"
- SHA1 for sqlite3.c: 7308ab891ca1b2ebc596025cfe4dc36f1ee89cf6
- Fix a bug, introduced in version 3.7.15, that causes an ORDER BY clause
to be optimized out of a three-way join when the ORDER BY is actually
"2013-01-09 11:53:05 c0e09560d26f0a6456be9dd3447f5311eb4f238f"
- SHA1 for sqlite3.c: 5741f47d1bc38aa0a8c38f09e60a5fe0031f272d
- Fix a bug, introduced in version 3.7.15, that causes a segfault if
the AS name of a result column of a SELECT statement is used as a logical
term in the WHERE clause. Ticket
"2012-12-19 20:39:10 6b85b767d0ff7975146156a99ad673f2c1a23318"
- SHA1 for sqlite3.c: bbbaa68061e925bd4d7d18d7e1270935c5f7e39a
- Added the sqlite3_errstr() interface.
- Avoid invoking the sqlite3_trace() callback multiple times when a
statement is automatically reprepared due to SQLITE_SCHEMA errors.
- Added support for Windows Phone 8 platforms
- Enhance IN operator processing to make use of indices with numeric
- Do full-table scans using covering indices when possible, under the
theory that an index will be smaller and hence can be scanned with
- Enhance the query optimizer so that ORDER BY clauses are more aggressively
optimized, especially in joins where various terms of the ORDER BY clause
come from separate tables of the join.
- Add the ability to implement FROM clause subqueries as coroutines rather
that manifesting the subquery into a temporary table.
- Enhancements the command-line shell:
- Added the ".print" command
- Negative numbers in the ".width" command cause right-alignment
- Add the ".wheretrace" command when compiled with SQLITE_DEBUG
- Added the busy_timeout pragma.
- Added the instr() SQL function.
- Added the SQLITE_FCNTL_BUSYHANDLER file control, used to allow VFS
implementations to get access to the busy handler callback.
- The xDelete method in the built-in VFSes now return
SQLITE_IOERR_DELETE_NOENT if the file to be deleted does not exist.
- Enhanced support for QNX.
- Work around an optimizer bug in the MSVC compiler when targeting ARM.
- Bug fix: Avoid various concurrency problems in shared cache mode.
- Bug fix: Avoid a deadlock or crash if the backup API, shared cache,
and the SQLite Encryption Extension are all used at once.
- Bug fix: SQL functions created using the TCL interface honor the
- Bug fix: Fix a 32-bit overflow problem on CREATE INDEX for databases
larger than 16GB.
- Bug fix: Avoid segfault when using the COLLATE operator inside of a
CHECK constraint or view in shared cache mode.
"2012-12-12 13:36:53 cd0b37c52658bfdf992b1e3dc467bae1835a94ae"
- SHA1 for sqlite3.c: 2b413611f5e3e3b6ef5f618f2a9209cdf25cbcff"
- Fix a bug (ticket
that causes a segfault on a LEFT JOIN that includes an OR in the ON clause.
- Work around a bug in the optimizer in the VisualStudio-2012 compiler that
causes invalid code to be generated when compiling SQLite on ARM.
- Fix the TCL interface so that the "nullvalue" setting is honored for
TCL implementations of SQL functions.
"2012-10-04 19:37:12 091570e46d04e84b67228e0bdbcd6e1fb60c6bdb"
- SHA1 for sqlite3.c: 62aaecaacab3a4bf4a8fe4aec1cfdc1571fe9a44
- Drop built-in support for OS/2. If you need to upgrade an OS/2
application to use this or a later version of SQLite,
then add an application-defined VFS using the
sqlite3_vfs_register() interface. The code removed in this release can
serve as a baseline for the application-defined VFS.
- Ensure that floating point values are preserved exactly when reconstructing
a database from the output of the ".dump" command of the
- Added the sqlite3_close_v2() interface.
- Updated the command-line shell so that it can be built using
SQLITE_OMIT_FLOATING_POINT and SQLITE_OMIT_AUTOINIT.
- Improvements to the windows makefiles and build processes.
- Enhancements to PRAGMA integrity_check and PRAGMA quick_check so that
they can optionally check just a single attached database instead of all
- Enhancements to WAL mode processing that ensure that at least one
valid read-mark is available at all times, so that read-only processes
can always read the database.
- Performance enhancements in the sorter used by ORDER BY and CREATE INDEX.
- Added the SQLITE_DISABLE_FTS4_DEFERRED compile-time option.
- Better handling of aggregate queries where the aggregate functions are
contained within subqueries.
- Enhance the query planner so that it will try to use a covering index
on queries that make use of or optimization.
"2012-09-03 15:42:36 c0d89d4a9752922f9e367362366efde4f1b06f2a"
- SHA1 for sqlite3.c: 5fdf596b29bb426001f28b488ff356ae14d5a5a6
- In-memory databases that are specified using
URI filenames are allowed to use shared cache,
so that the same
in-memory database can be accessed from multiple database connections.
- Recognize and use the mode=memory query parameter in
- Avoid resetting the schema of shared cache connections when any one
connection closes. Instead, wait for the last connection to close before
resetting the schema.
- In the RTREE extension, when rounding 64-bit floating point numbers
to 32-bit for storage, always round in a direction that causes the
bounding box to get larger.
- Adjust the unix driver to avoid unnecessary calls to fchown().
- Add interfaces sqlite3_quota_ferror() and sqlite3_quota_file_available()
to the test_quota.c module.
- The sqlite3_create_module() and sqlite3_create_module_v2() interfaces
return SQLITE_MISUSE on any attempt to overload or replace a virtual table
module. The destructor is always called in this case, in accordance with
historical and current documentation.
"2012-06-11 02:05:22 f5b5a13f7394dc143aa136f1d4faba6839eaa6dc"
- SHA1 for sqlite3.c: ff0a771d6252545740ba9685e312b0e3bb6a641b
- Fix a bug
in the 3.7.12 release that can cause a segfault for certain
obscure nested aggregate queries.
- Fix various other minor test script problems.
"2012-05-22 02:45:53 6d326d44fd1d626aae0e8456e5fa2049f1ce0789"
- SHA1 for sqlite3.c: d494e8d81607f0515d4f386156fb0fd86d5ba7df
- Add the SQLITE_DBSTATUS_CACHE_WRITE option for sqlite3_db_status().
- Optimize the typeof() and length() SQL functions so that they avoid
unnecessary reading of database content from disk.
- Add the FTS4 "merge" command, the FTS4 "automerge" command, and
the FTS4 "integrity-check" command.
- Report the name of specific CHECK constraints that fail.
- In the command-line shell, use popen() instead of fopen() if the first
character of the argument to the ".output" command is "|".
- Make use of OVERLAPPED in the windows VFS to avoid some system calls
and thereby obtain a performance improvement.
- More aggressive optimization of the AND operator when one side or the
other is always false.
- Improved performance of queries with many OR-connected terms in the
WHERE clause that can all be indexed.
- Add the SQLITE_RTREE_INT_ONLY compile-time option to force the
R*Tree Extension Module to use integer instead of
floating point values for both storage and computation.
- Enhance the PRAGMA integrity_check command to use much less memory when
processing multi-gigabyte databases.
- New interfaces added to the test_quota.c add-on module.
- Added the ".trace" dot-command to the command-line shell.
- Allow virtual table constructors to be invoked recursively.
- Improved optimization of ORDER BY clauses on compound queries.
- Improved optimization of aggregate subqueries contained within an
- Bug fix: Fix the RELEASE command so that it does not cancel pending
queries. This repairs a problem introduced in 3.7.11.
- Bug fix: Do not discard the DISTINCT as superfluous unless a subset of
the result set is subject to a UNIQUE constraint and it none
of the columns in that subset can be NULL.
- Bug fix: Do not optimize away an ORDER BY clause that has the same terms
as a UNIQUE index unless those terms are also NOT NULL.
"2012-05-14 01:41:23 8654aa9540fe9fd210899d83d17f3f407096c004"
- SHA1 for sqlite3.c: 57e2104a0f7b3f528e7f6b7a8e553e2357ccd2e1
- Enhance the INSERT syntax to allow multiple rows to be inserted
via the VALUES clause.
- Enhance the CREATE VIRTUAL TABLE command to support the
IF NOT EXISTS clause.
- Added the sqlite3_stricmp() interface as a counterpart to
- Added the sqlite3_db_readonly() interface.
- Added the SQLITE_FCNTL_PRAGMA file control, giving VFS implementations
the ability to add new PRAGMA statements or to override built-in
- Queries of the form: "SELECT max(x), y FROM table" returns the
value of y on the same row that contains the maximum x value.
- Added support for the FTS4 languageid option.
- Documented support for the FTS4 content option. This feature has
actually been in the code since version 3.7.9 but is only now considered
to be officially supported.
- Pending statements no longer block ROLLBACK. Instead, the pending
statement will return SQLITE_ABORT upon next access after the ROLLBACK.
- Improvements to the handling of CSV inputs in the command-line shell
- Fix a bug introduced
in version 3.7.10 that might cause a LEFT JOIN
to be incorrectly converted into an INNER JOIN if the WHERE clause
indexable terms connected by OR.
"2012-03-20 11:35:50 00bb9c9ce4f465e6ac321ced2a9d0062dc364669"
- SHA1 for sqlite3.c: d460d7eda3a9dccd291aed2a9fda868b9b120a10
- The default schema format number is changed from 1 to 4.
This means that, unless
the PRAGMA legacy_file_format=ON statement is
run, newly created database files will be unreadable by version of SQLite
prior to 3.3.0 (2006-01-10). It also means that the descending indices
are enabled by default.
- The sqlite3_pcache_methods structure and the SQLITE_CONFIG_PCACHE
and SQLITE_CONFIG_GETPCACHE configuration parameters are deprecated.
They are replaced by a new sqlite3_pcache_methods2 structure and
SQLITE_CONFIG_PCACHE2 and SQLITE_CONFIG_GETPCACHE2 configuration
- Added the powersafe overwrite property to the VFS interface. Provide
the SQLITE_IOCAP_POWERSAFE_OVERWRITE I/O capability, the
SQLITE_POWERSAFE_OVERWRITE compile-time option, and the
"psow=BOOLEAN" query parameter for URI filenames.
- Added the sqlite3_db_release_memory() interface and the
- Added the sqlite3_db_filename() interface.
- Added the sqlite3_stmt_busy() interface.
- Added the sqlite3_uri_boolean() and sqlite3_uri_int64() interfaces.
- If the argument to PRAGMA cache_size is negative N, that means to use
approximately -1024*N bytes of memory for the page cache regardless of
the page size.
- Enhanced the default memory allocator to make use of _msize() on windows,
malloc_size() on Mac, and malloc_usable_size() on Linux.
- Enhanced the query planner to support index queries with range constraints
on the rowid.
- Enhanced the query planner flattening logic to allow UNION ALL compounds
to be promoted upwards to replace a simple wrapper SELECT even if the
compounds are joins.
- Enhanced the query planner so that the xfer optimization can be used with
INTEGER PRIMARY KEY ON CONFLICT as long as the destination table is
- Enhanced the windows VFS so that all system calls can be overridden
using the xSetSystemCall interface.
- Updated the "unix-dotfile" VFS to use locking directories with mkdir()
and rmdir() instead of locking files with open() and unlink().
- Enhancements to the test_quota.c extension to support stdio-like interfaces
- Change the unix VFS to be tolerant of read() system calls that return
less then the full number of requested bytes.
- Change both unix and windows VFSes to report a sector size of 4096
instead of the old default of 512.
- In the TCL Interface, add the -uri option to the "sqlite3" TCL command
used for creating new database connection objects.
- Added the SQLITE_TESTCTRL_EXPLAIN_STMT test-control option with the
SQLITE_ENABLE_TREE_EXPLAIN compile-time option to enable the
command-line shell to display ASCII-art parse trees of SQL statements
that it processes, for debugging and analysis.
- Bug fix:
Add an additional xSync when restarting a WAL in order to prevent an
exceedingly unlikely but theoretically possible
database corruption following power-loss.
- Bug fix:
Change the VDBE so that all registers are initialized to Invalid
instead of NULL.
- Bug fix:
Fix problems that can result from 32-bit integer overflow.
"2012-01-16 13:28:40 ebd01a8deffb5024a5d7494eef800d2366d97204"
- SHA1 for sqlite3.c: 6497cbbaad47220bd41e2e4216c54706e7ae95d4
- If a search token (on the right-hand side of the MATCH operator) in
FTS4 begins with "^" then that token must be the first in its field
of the document. ** Potentially Incompatible Change **
- Added options SQLITE_DBSTATUS_CACHE_HIT and SQLITE_DBSTATUS_CACHE_MISS
to the sqlite3_db_status() interface.
- Removed support for SQLITE_ENABLE_STAT2, replacing it with the much
more capable SQLITE_ENABLE_STAT3 option.
- Enhancements to the sqlite3_analyzer utility program, including the
--pageinfo and --stats options and support for multiplexed databases.
- Enhance the sqlite3_data_count() interface so that it can be used to
determine if SQLITE_DONE has been seen on the prepared statement.
- Added the SQLITE_FCNTL_OVERWRITE file-control by which the SQLite core
indicates to the VFS that the current transaction will overwrite the
entire database file.
- Increase the default lookaside memory allocator allocation size from
100 to 128 bytes.
- Enhanced the query planner so that it can factor terms in and out of
OR expressions in the WHERE clause in an effort to find better indices.
- Added the SQLITE_DIRECT_OVERFLOW_READ compile-time option, causing
overflow pages to be read directly from the database file,
bypassing the page cache.
- Remove limits on the magnitude of precision and width value in the
format specifiers of the sqlite3_mprintf() family of string rendering
- Fix a bug that prevent ALTER TABLE ... RENAME from working
on some virtual tables in a database with a UTF16 encoding.
- Fix a bug in ASCII-to-float conversion that causes slow performance and
incorrect results when converting numbers with ridiculously large exponents.
- Fix a bug that causes incorrect results in aggregate queries that use
multiple aggregate functions whose arguments contain complicated expressions
that differ only in the case of string literals contained within those
- Fix a bug that prevented the page_count and quick_check pragmas from
working correctly if their names were capitalized.
- Fix a bug that caused VACUUM to fail if the count_changes pragma was
- Fix a bug in virtual table implementation that causes a crash if
an FTS4 table is dropped inside a transaction and
a SAVEPOINT occurs afterwards.
"2011-11-01 00:52:41 c7c6050ef060877ebe77b41d959e9df13f8c9b5e"
- SHA1 for sqlite3.c: becd16877f4f9b281b91c97e106089497d71bb47
- Orders of magnitude performance improvement for CREATE INDEX on
very large tables.
- Improved the windows VFS to better defend against interference
from anti-virus software.
- Improved query plan optimization when the DISTINCT keyword is present.
- Allow more system calls to be overridden in the unix VFS - to provide
better support for chromium sandboxes.
- Increase the default size of a lookahead cache line from 100 to 128 bytes.
- Enhancements to the test_quota.c module so that it can track
- Bug fix: Virtual tables now handle IS NOT NULL constraints correctly.
- Bug fixes: Correctly handle nested correlated subqueries used with
indices in a WHERE clause.
"2011-09-19 14:49:19 3e0da808d2f5b4d12046e05980ca04578f581177"
- SHA1 for sqlite3.c: bfcd74a655636b592c5dba6d0d5729c0f8e3b4de
- Fix a bug causing
PRAGMA case_sensitive_like statements compiled using sqlite3_prepare()
to fail with an SQLITE_SCHEMA error.
"2011-06-28 17:39:05 af0d91adf497f5f36ec3813f04235a6e195a605f"
- SHA1 for sqlite3.c: d47594b8a02f6cf58e91fb673e96cb1b397aace0
- Add support for URI filenames
- Add the sqlite3_vtab_config() interface in
support of ON CONFLICT clauses with virtual tables.
- Add the xSavepoint, xRelease and xRollbackTo methods in
virtual tables in support of SAVEPOINT for virtual tables.
- Update the built-in FTS3/FTS4 and RTREE virtual tables to support
ON CONFLICT clauses and REPLACE.
- Avoid unnecessary reparsing of the database schema.
- Added support for the FTS4 prefix option and the FTS4 order option.
- Allow WAL-mode databases to be opened read-only as long as
there is an existing read/write connection.
- Added support for short filenames.
"2011-06-23 19:49:22 4374b7e83ea0a3fbc3691f9c0c936272862f32f2"
- SHA1 for sqlite3.c: 5bbe79e206ae5ffeeca760dbd0d66862228db551
- Fix a problem with WAL mode which could cause transactions to
silently rollback if the cache_size is set very small (less than 10)
and SQLite comes under memory pressure.
- Fix the function prototype for the open(2) system call to agree with
POSIX. Without this fix, pthreads does not work correctly on NetBSD.
"2011-04-17 17:25:17 154ddbc17120be2915eb03edc52af1225eb7cb5e"
- SHA1 for sqlite3.c: 806577fd524dd5f3bfd8d4d27392ed2752bc9701
- Fix a bug in 3.7.6 that only appears if the SQLITE_FCNTL_SIZE_HINT
file control is used with a build of SQLite that makes use of the
HAVE_POSIX_FALLOCATE compile-time option and which has
SQLITE_ENABLE_LOCKING_MODE turned off.
"2011-04-13 14:40:25 a35e83eac7b185f4d363d7fa51677f2fdfa27695"
- SHA1 for sqlite3.c: b81bfa27d3e09caf3251475863b1ce6dd9f6ab66
- Added the sqlite3_wal_checkpoint_v2() interface and enhanced the
wal_checkpoint pragma to support blocking checkpoints.
- Improvements to the query planner so that it makes better estimates of
plan costs and hence does a better job of choosing the right plan,
especially when SQLITE_ENABLE_STAT2 is used.
- Fix a bug which prevented deferred foreign key constraints from being
enforced when sqlite3_finalize() was not
called by one statement with a failed foreign key constraint prior to
another statement with foreign key constraints running.
- Integer arithmetic operations that would have resulted in overflow
are now performed using floating-point instead.
- Increased the version number on the VFS object to
3 and added new methods xSetSysCall, xGetSysCall, and xNextSysCall
used for doing full-coverage testing.
- Increase the maximum value of SQLITE_MAX_ATTACHED from 30 to 62
(though the default value remains at 10).
- Enhancements to FTS4:
- Added the fts4aux table
- Added support for compressed FTS4 content
- Enhance the ANALYZE command to support the name of an index
as its argument, in order to analyze just that one index.
- Added the "unix-excl" built-in VFS on unix and unix-like platforms.
"2011-04-12 01:58:40 f9d43fa363d54beab6f45db005abac0a7c0c47a7"
- SHA1 for sqlite3.c: f38df08547efae0ff4343da607b723f588bbd66b
- Added the sqlite3_vsnprintf() interface.
- Added the SQLITE_DBSTATUS_LOOKASIDE_HIT,
SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL options for the
- Added the SQLITE_OMIT_AUTORESET compile-time option.
- Added the SQLITE_DEFAULT_FOREIGN_KEYS compile-time option.
- Updates to sqlite3_stmt_readonly() so that its result is well-defined
for all prepared statements and so that it works with VACUUM.
- Added the "-heap" option to the command-line shell
- Fix a bug involving
frequent changes in and out of WAL mode and
VACUUM that could (in theory) cause database corruption.
- Enhance the sqlite3_trace() mechanism so that nested SQL statements
such as might be generated by virtual tables are shown but are shown
in comments and without parameter expansion. This
greatly improves tracing output when using the FTS3/4 and/or RTREE
- Change the xFileControl() methods on all built-in VFSes to return
SQLITE_NOTFOUND instead of SQLITE_ERROR for an unrecognized
- The SQLite core invokes the SQLITE_FCNTL_SYNC_OMITTED
to the VFS in place of a call to xSync if the database has
PRAGMA synchronous set to OFF.
- Added the sqlite3_blob_reopen() interface to allow an existing
sqlite3_blob object to be rebound to a new row.
- Use the new sqlite3_blob_reopen() interface to improve the performance
- VFSes that do not support shared memory are allowed
to access WAL databases if PRAGMA locking_mode is set to EXCLUSIVE.
- Enhancements to EXPLAIN QUERY PLAN.
- Added the sqlite3_stmt_readonly() interface.
- Added PRAGMA checkpoint_fullfsync.
- Added the SQLITE_FCNTL_FILE_POINTER option
- Added support for FTS4 and enhancements
to the FTS matchinfo() function.
- Added the test_superlock.c module which provides example
code for obtaining an exclusive lock to a rollback
or WAL database.
- Added the test_multiplex.c module which provides
an example VFS that provides multiplexing (sharding)
of a DB, splitting it over multiple files of fixed size.
- A very obscure bug
associated with the or optimization was fixed.
- Added the sqlite3_create_function_v2() interface that includes a
- Added support for custom r-tree queries using application-supplied
callback routines to define the boundary of the query region.
- The default page cache strives more diligently to avoid using memory
beyond what is allocated to it by SQLITE_CONFIG_PAGECACHE. Or if
using page cache is allocating from the heap, it strives to avoid
going over the sqlite3_soft_heap_limit64(), even if
SQLITE_ENABLE_MEMORY_MANAGEMENT is not set.
- Added the sqlite3_soft_heap_limit64() interface as a replacement for
- The ANALYZE command now gathers statistics on tables even if they
have no indices.
- Tweaks to the query planner to help it do a better job of finding the
most efficient query plan for each query.
- Enhanced the internal text-to-numeric conversion routines so that they
work with UTF8 or UTF16, thereby avoiding some UTF16-to-UTF8 text
- Fix a problem that was causing excess memory usage with large WAL
transactions in win32 systems.
- The interface between the VDBE and B-Tree layer is enhanced such that
the VDBE provides hints to the B-Tree layer letting the B-Tree layer
know when it is safe to use hashing instead of B-Trees for transient
- Miscellaneous documentation enhancements.
- Fix an
old and very obscure bug that can lead to corruption of the
database free-page list when incremental_vacuum is used.
- Added new commands SQLITE_DBSTATUS_SCHEMA_USED and
SQLITE_DBSTATUS_STMT_USED to the sqlite3_db_status() interface, in
order to report out the amount of memory used to hold the schema and
prepared statements of a connection.
- Increase the maximum size of a database pages from 32KiB to 64KiB.
- Use the LIKE optimization even if the right-hand side string contains
- Added the SQLITE_FCNTL_CHUNK_SIZE verb to the sqlite3_file_control()
interface for both unix and windows, to cause database files to grow in
large chunks in order to reduce disk fragmentation.
- Fixed a bug in the query planner that caused performance regressions
relative to 18.104.22.168 on some complex joins.
- Fixed a typo in the OS/2 backend.
- Refactored the pager module.
- The SQLITE_MAX_PAGE_SIZE compile-time option is now silently ignored.
The maximum page size is hard-coded at 65536 bytes.
- Fix a potential database corruption bug that can occur if version 3.7.0
and version 22.214.171.124 alternately write to the same database file.
- Fix a performance regression related to the query planner enhancements
of version 3.7.0.
- Added support for write-ahead logging.
- Query planner enhancement - automatic transient indices are created
when doing so reduces the estimated query time.
- Query planner enhancement - the ORDER BY becomes a no-op if the query
also contains a GROUP BY clause that forces the correct output order.
- Add the SQLITE_DBSTATUS_CACHE_USED verb for sqlite3_db_status().
- The logical database size is now stored in the database header so that
bytes can be appended to the end of the database file without corrupting
it and so that SQLite will work correctly on systems that lack support
- Fix a bug in the offsets() function of FTS3
- Fix a missing "sync" that when omitted could lead to database
corruption if a power failure or OS crash occurred just as a
ROLLBACK operation was finishing.
- Added the secure_delete pragma.
- Added the sqlite3_compileoption_used() and
sqlite3_compileoption_get() interfaces as well as the
compile_options pragma and the sqlite_compileoption_used() and
sqlite_compileoption_get() SQL functions.
- Added the sqlite3_log() interface together with the
SQLITE_CONFIG_LOG verb to sqlite3_config(). The ".log" command
is added to the Command Line Interface.
- Improvements to FTS3.
- Improvements and bug-fixes in support for SQLITE_OMIT_FLOATING_POINT.
- The integrity_check pragma is enhanced to detect out-of-order rowids.
- The ".genfkey" operator has been removed from the
Command Line Interface.
- Updates to the co-hosted Lemon LALR(1) parser generator. (These
updates did not affect SQLite.)
- Various minor bug fixes and performance enhancements.
- Fix bugs that can (rarely) lead to incorrect query results when
the CAST or OR operators are used in the WHERE clause of a query.
- Continuing enhancements and improvements to FTS3.
- Other miscellaneous bug fixes.
- The SQL output resulting from sqlite3_trace() is now modified to include
the values of bound parameters.
- Performance optimizations targeting a specific use case from
a single high-profile user of SQLite. A 12% reduction in the number of
CPU operations is achieved (as measured by Valgrind). Actual performance
improvements in practice may vary depending on workload. Changes
- The ifnull() and coalesce() SQL functions are now implemented
using in-line VDBE code rather than calling external functions, so that
unused arguments need never be evaluated.
- The substr() SQL function does not bother to measure the length
its entire input string if it is only computing a prefix
- Unnecessary OP_IsNull, OP_Affinity, and OP_MustBeInt VDBE opcodes
- Various code refactorizations for performance
- The FTS3 extension has undergone a major rework and cleanup.
New FTS3 documentation is now available.
- The SQLITE_SECURE_DELETE compile-time option fixed to make sure that
content is deleted even when the truncate optimization applies.
- Improvements to "dot-command" handling in the
Command Line Interface.
- Other minor bug fixes and documentation enhancements.
- Optimizer enhancement: prepared statements are automatically
re-compiled when a binding on the RHS of a LIKE operator changes or
when any range constraint changes under SQLITE_ENABLE_STAT2.
- Various minor bug fixes and documentation enhancements.
- A small patch to version 3.6.16 to fix
the OP_If bug.
- Added support for foreign key constraints. Foreign key constraints
are disabled by default. Use the foreign_keys pragma to turn them on.
- Generalized the IS and IS NOT operators to take arbitrary expressions
on their right-hand side.
- The TCL Interface has been enhanced to use the
Non-Recursive Engine (NRE)
interface to the TCL interpreter when linked against TCL 8.6 or later.
- Fix a bug introduced in 3.6.18 that can lead to a segfault when an
attempt is made to write on a read-only database.
- Versioning of the SQLite source code has transitioned from CVS to
- Query planner enhancements.
- The SQLITE_ENABLE_STAT2 compile-time option causes the ANALYZE
command to collect a small histogram of each index, to help SQLite better
select among competing range query indices.
- Recursive triggers can be enabled using the PRAGMA recursive_triggers
- Delete triggers fire when rows are removed due to a
REPLACE conflict resolution. This feature is only
enabled when recursive triggers are enabled.
- Added the SQLITE_OPEN_SHAREDCACHE and SQLITE_OPEN_PRIVATECACHE
flags for sqlite3_open_v2() used to override the global
shared cache mode settings for individual database connections.
- Added improved version identification features:
C-Preprocessor macro SQLITE_SOURCE_ID,
C/C++ interface sqlite3_sourceid(), and SQL function sqlite_source_id().
- Obscure bug fix on triggers
- Expose the sqlite3_strnicmp() interface for use by extensions and
- Remove the restriction on virtual tables and shared cache mode.
Virtual tables and shared cache can now be used at the same time.
- Many code simplifications and obscure bug fixes in support of
providing 100% branch test coverage.
- Fix a bug (ticket #3929) that occasionally causes INSERT or UPDATE
operations to fail on an indexed table that has a self-modifying trigger.
- Other minor bug fixes and performance optimizations.
- Refactor the internal representation of SQL expressions so that they
use less memory on embedded platforms.
- Reduce the amount of stack space used
- Fix an 64-bit alignment bug on HP/UX and Sparc
- The sqlite3_create_function() family of interfaces now return
SQLITE_MISUSE instead of SQLITE_ERROR when passed invalid
- When new tables are created using CREATE TABLE ... AS SELECT ... the
datatype of the columns is the simplified SQLite datatype (TEXT, INT,
REAL, NUMERIC, or BLOB) instead of a copy of the original datatype from
the source table.
- Resolve race conditions when checking for a hot rollback journal.
- The sqlite3_shutdown() interface frees all mutexes under windows.
- Enhanced robustness against corrupt database files
- Continuing improvements to the test suite and fixes to obscure
bugs and inconsistencies that the test suite improvements are
- Fix a code generator bug introduced in version 3.6.14. This bug
can cause incorrect query results under obscure circumstances.
- Fix a bug in group_concat(), ticket #3841
- Fix a performance bug in the pager cache, ticket #3844
- Fix a bug in the sqlite3_backup implementation that can lead
to a corrupt backup database. Ticket #3858.
- Added the optional asynchronous VFS module.
- Enhanced the query optimizer so that virtual tables are able to
make use of OR and IN operators in the WHERE clause.
- Speed improvements in the btree and pager layers.
- Added the SQLITE_HAVE_ISNAN compile-time option which will cause
the isnan() function from the standard math library to be used instead
of SQLite's own home-brew NaN checker.
- Countless minor bug fixes, documentation improvements, new and
improved test cases, and code simplifications and cleanups.
- Fix a bug in version 3.6.12 that causes a segfault when running
a count(*) on the sqlite_master table of an empty database. Ticket #3774.
- Fix a bug in version 3.6.12 that causes a segfault that when
inserting into a table using a DEFAULT value where there is a
function as part of the DEFAULT value expression. Ticket #3791.
- Fix data structure alignment issues on Sparc. Ticket #3777.
- Other minor bug fixes.
- Fixed a bug that caused database corruption when an incremental_vacuum is
rolled back in an in-memory database. Ticket #3761.
- Added the sqlite3_unlock_notify() interface.
- Added the reverse_unordered_selects pragma.
- The default page size on windows is automatically adjusted to match the
capabilities of the underlying filesystem.
- Add the new ".genfkey" command in the CLI for generating triggers to
implement foreign key constraints.
- Performance improvements for "count(*)" queries.
- Reduce the amount of heap memory used, especially by TRIGGERs.
- Added the hot-backup interface.
- Added new commands ".backup" and ".restore" to the CLI.
- Added new methods backup and
restore to the TCL interface.
- Improvements to the syntax bubble
- Various minor bug fixes
- Fix a cache coherency problem that could lead to database corruption.
- Fix two bugs, which when combined might result in incorrect
query results. Both bugs were harmless by themselves; only when
they team up do they cause problems. Ticket #3581.
- Added support for nested transactions
- Enhanced the query optimizer so that it is able to use
multiple indices to efficiently process
in a WHERE clause.
- Added support for parentheses in FTS3 query patterns using the
SQLITE_ENABLE_FTS3_PARENTHESIS compile-time option.
- Reorganize the Unix interface in os_unix.c
- Added support for "Proxy Locking" on Mac OS X.
- Changed the prototype of the sqlite3_auto_extension() interface in a
way that is backwards compatible but which might cause warnings in new
builds of applications that use that interface.
- Changed the signature of the xDlSym method of the sqlite3_vfs object
in a way that is backwards compatible but which might cause
- Added superfluous casts and variable initializations in order
to suppress nuisance compiler warnings.
- Fixes for various minor bugs.
- Fix a bug in the b-tree delete algorithm that seems like it might be
able to cause database corruption. The bug was first introduced in
version 3.6.6 by check-in  on 2008-11-13.
- Fix a memory leak that can occur following a disk I/O error.
- Fix a bug in the page cache that can lead database corruption following
a rollback. This bug was first introduced in version 3.6.4.
- Two other very minor bug fixes
- Fix a #define that prevented memsys5 from compiling
- Fix a problem in the virtual table commit mechanism that was causing
a crash in FTS3. Ticket #3497.
- Add the application-defined page cache
- Added built-in support for VxWorks
- Add the MEMORY option to the journal_mode pragma.
- Added the sqlite3_db_mutex() interface.
- Added the SQLITE_OMIT_TRUNCATE_OPTIMIZATION compile-time option.
- Fixed the truncate optimization so that sqlite3_changes() and
sqlite3_total_changes() interfaces and the count_changes pragma
return the correct values.
- Added the sqlite3_extended_errcode() interface.
- The COMMIT command now succeeds even if there are pending queries.
It returns SQLITE_BUSY if there are pending incremental BLOB I/O requests.
- The error code is changed to SQLITE_BUSY (instead of SQLITE_ERROR)
when an attempt is made to ROLLBACK while one or more queries are
- Drop all support for the experimental memory allocators memsys4 and
- Added the SQLITE_ZERO_MALLOC compile-time option.
- Add option support for LIMIT and ORDER BY clauses on DELETE and
UPDATE statements. Only works if SQLite is compiled with
- Added the sqlite3_stmt_status() interface for performance monitoring.
- Add the INDEXED BY clause.
- The LOCKING_STYLE extension is now enabled by default on Mac OS X
- Added the TRUNCATE option to PRAGMA journal_mode
- Performance enhancements to tree balancing logic in the B-Tree layer.
- Added the
source code and
documentation for the genfkey program for automatically generating
triggers to enforce foreign key constraints.
- Added the SQLITE_OMIT_TRUNCATE_OPTIMIZATION compile-time option.
- The SQL language documentation is converted to use
syntax diagrams instead of BNF.
- Other minor bug fixes
- Fix for a bug in the SELECT DISTINCT logic that was introduced by the
- Other minor bug fixes
- Split the pager subsystem into separate pager and pcache subsystems.
- Factor out identifier resolution procedures into separate files.
- Bug fixes
- Added the lookaside memory allocator for a speed improvement in excess
of 15% on some workloads. (Your mileage may vary.)
- Added the SQLITE_CONFIG_LOOKASIDE verb to sqlite3_config() to control
the default lookaside configuration.
- Added verbs SQLITE_STATUS_PAGECACHE_SIZE and
SQLITE_STATUS_SCRATCH_SIZE to the sqlite3_status() interface.
- Modified SQLITE_CONFIG_PAGECACHE and SQLITE_CONFIG_SCRATCH to remove
the "+4" magic number in the buffer size computation.
- Added the sqlite3_db_config() and sqlite3_db_status() interfaces for
controlling and monitoring the lookaside allocator separately on each
- Numerous other performance enhancements
- Miscellaneous minor bug fixes
2008-07-16 (3.6.0 beta)
- Modifications to the virtual file system interface
to support a wider range of embedded systems.
See 35to36.html for additional information.
*** Potentially incompatible change ***
- All C-preprocessor macros used to control compile-time options
now begin with the prefix "SQLITE_". This may require changes to
applications that compile SQLite using their own makefiles and with
custom compile-time options, hence we mark this as a
*** Potentially incompatible change ***
- The SQLITE_MUTEX_APPDEF compile-time option is no longer supported.
Alternative mutex implementations can now be added at run-time using
the sqlite3_config() interface with the SQLITE_CONFIG_MUTEX verb.
*** Potentially incompatible change ***
- The handling of IN and NOT IN operators that contain a NULL on their
right-hand side expression is brought into compliance with the SQL
standard and with other SQL database engines. This is a bug fix,
but as it has the potential to break legacy applications that depend
on the older buggy behavior, we mark that as a
*** Potentially incompatible change ***
- The result column names generated for compound subqueries have been
simplified to show only the name of the column of the original table and
omit the table name. This makes SQLite operate more like other SQL
- Added the sqlite3_config() interface for doing run-time configuration
of the entire SQLite library.
- Added the sqlite3_status() interface used for querying run-time status
information about the overall SQLite library and its subsystems.
- Added the sqlite3_initialize() and sqlite3_shutdown() interfaces.
- The SQLITE_OPEN_NOMUTEX option was added to sqlite3_open_v2().
- Added the PRAGMA page_count command.
- Added the sqlite3_next_stmt() interface.
- Added a new R*Tree virtual table
- Added experimental
support for the journal_mode PRAGMA and persistent journal.
- Journal mode PERSIST is the default behavior in
exclusive locking mode.
- Fix a performance regression on LEFT JOIN (see ticket #3015)
that was mistakenly introduced in version 3.5.8.
- Performance enhancement: Reengineer the internal routines used
to interpret and render variable-length integers.
- Fix a buffer-overrun problem in sqlite3_mprintf() which occurs
when a string without a zero-terminator is passed to "%.*s".
- Always convert IEEE floating point NaN values into NULL during
processing. (Ticket #3060)
- Make sure that when a connection blocks on a RESERVED lock that
it is able to continue after the lock is released. (Ticket #3093)
- The "configure" scripts should now automatically configure Unix
systems for large file support. Improved error messages for
when large files are encountered and large file support is disabled.
- Avoid cache pages leaks following disk-full or I/O errors
- And, many more minor bug fixes and performance enhancements....
- Expose SQLite's internal pseudo-random number generator (PRNG)
via the sqlite3_randomness() interface
- New interface sqlite3_context_db_handle() that returns the
database connection handle that has invoked an application-defined
- New interface sqlite3_limit() allows size and length limits to be
set on a per-connection basis and at run-time.
- Improved crash-robustness: write the database page size into the rollback
- Allow the VACUUM command to change the page size of a database file.
- The xAccess() method of the VFS is allowed to return -1 to signal
a memory allocation error.
- Performance improvement: The OP_IdxDelete opcode uses unpacked records,
obviating the need for one OP_MakeRecord opcode call for each index
- Performance improvement: Constant subexpressions are factored out of
- Performance improvement: Results of OP_Column are reused rather than
issuing multiple OP_Column opcodes.
- Fix a bug in the RTRIM collating sequence.
- Fix a bug in the SQLITE_SECURE_DELETE option that was causing
Firefox crashes. Make arrangements to always test SQLITE_SECURE_DELETE
prior to each release.
- Other miscellaneous performance enhancements.
- Other miscellaneous minor bug fixes.
- Fix a bug (ticket #2927) in the register allocation for
compound selects - introduced by the new VM code in version 3.5.5.
- ALTER TABLE uses double-quotes instead of single-quotes for quoting
- Use the WHERE clause to reduce the size of a materialized VIEW in
an UPDATE or DELETE statement. (Optimization)
- Do not apply the flattening optimization if the outer query is an
aggregate and the inner query contains ORDER BY. (Ticket #2943)
- Additional OS/2 updates
- Added an experimental power-of-two, first-fit memory allocator.
- Remove all instances of sprintf() from the code
- Accept "Z" as the zulu timezone at the end of date strings
- Fix a bug in the LIKE optimizer that occurs when the last character
before the first wildcard is an upper-case "Z"
- Added the "bitvec" object for keeping track of which pages have
been journalled. Improves speed and reduces memory consumption, especially
for large database files.
- Get the SQLITE_ENABLE_LOCKING_STYLE macro working again on Mac OS X.
- Store the statement journal in the temporary file directory instead of
collocated with the database file.
- Many improvements and cleanups to the configure script
- Fix a bug (ticket #2913)
that prevented virtual tables from working in a LEFT JOIN.
The problem was introduced into shortly before the 3.5.5 release.
- Bring the OS/2 porting layer up-to-date.
- Add the new sqlite3_result_error_code() API and use it in the
implementation of ATTACH so that proper error codes are returned
when an ATTACH fails.
- Convert the underlying virtual machine to be a register-based machine
rather than a stack-based machine. The only user-visible change
is in the output of EXPLAIN.
- Add the build-in RTRIM collating sequence.
- Fix a critical bug in UPDATE or DELETE that occurs when an
OR REPLACE clause or a trigger causes rows in the same table to
be deleted as side effects. (See ticket #2832.) The most likely
result of this bug is a segmentation fault, though database
corruption is a possibility.
- Bring the processing of ORDER BY into compliance with the
SQL standard for case where a result alias and a table column name
are in conflict. Correct behavior is to prefer the result alias.
Older versions of SQLite incorrectly picked the table column.
(See ticket #2822.)
- The VACUUM command preserves
the setting of the
- Productize and officially support the group_concat() SQL function.
- Better optimization of some IN operator expressions.
- Add the ability to change the
auto_vacuum status of a
database by setting the auto_vaccum pragma and VACUUMing the database.
- Prefix search in FTS3 is much more efficient.
- Relax the SQL statement length restriction in the CLI so that
the ".dump" output of databases with very large BLOBs and strings can
be played back to recreate the database.
- Other small bug fixes and optimizations.
- Move website and documentation files out of the source tree into
a separate CM system.
- Fix a long-standing bug in INSERT INTO ... SELECT ... statements
where the SELECT is compound.
- Fix a long-standing bug in RAISE(IGNORE) as used in BEFORE triggers.
- Fixed the operator precedence for the ~ operator.
- On Win32, do not return an error when attempting to delete a file
that does not exist.
- Allow collating sequence names to be quoted.
- Modify the TCL interface to use sqlite3_prepare_v2().
- Fix multiple bugs that can occur following a malloc() failure.
- sqlite3_step() returns SQLITE_MISUSE instead of crashing when
called with a NULL parameter.
- FTS3 now uses the SQLite memory allocator exclusively. The
FTS3 amalgamation can now be appended to the SQLite amalgamation to
generate a super-amalgamation containing both.
- The DISTINCT keyword now will sometimes use an INDEX if an
appropriate index is available and the optimizer thinks its use
might be advantageous.
- Dropped support for the SQLITE_OMIT_MEMORY_ALLOCATION compile-time
- Always open files using FILE_FLAG_RANDOM_ACCESS under Windows.
- The 3rd parameter of the built-in SUBSTR() function is now optional.
- Bug fix: do not invoke the authorizer when reparsing the schema after
a schema change.
- Added the experimental malloc-free memory allocator in mem3.c.
- Virtual machine stores 64-bit integer and floating point constants
in binary instead of text for a performance boost.
- Fix a race condition in test_async.c.
- Added the ".timer" command to the CLI
- Nota Bene: We are not using terms "alpha" or "beta" on this
release because the code is stable and because if we use those terms,
nobody will upgrade. However, we still reserve the right to make
incompatible changes to the new VFS interface in future releases.
- Fix a bug in the handling of SQLITE_FULL errors that could lead
to database corruption. Ticket #2686.
- The test_async.c drive now does full file locking and works correctly
when used simultaneously by multiple processes on the same database.
- The CLI ignores whitespace (including comments) at the end of lines
- Make sure the query optimizer checks dependencies on all terms of
a compound SELECT statement. Ticket #2640.
- Add demonstration code showing how to build a VFS for a raw
mass storage without a filesystem.
- Added an output buffer size parameter to the xGetTempname() method
of the VFS layer.
- Sticky SQLITE_FULL or SQLITE_IOERR errors in the pager are reset
when a new transaction is started.
2007-09-04 (3.5.0) alpha
- Redesign the OS interface layer. See
34to35.html for details.
*** Potentially incompatible change ***
- The sqlite3_release_memory(), sqlite3_soft_heap_limit(),
and sqlite3_enable_shared_cache() interfaces now work cross all
threads in the process, not just the single thread in which they
*** Potentially incompatible change ***
- Added the sqlite3_open_v2() interface.
- Reimplemented the memory allocation subsystem and made it
replaceable at compile-time.
- Created a new mutex subsystem and made it replicable at
- The same database connection may now be used simultaneously by
- Fix a database corruption bug that might occur if a ROLLBACK command
is executed in auto-vacuum mode
and a very small sqlite3_soft_heap_limit is set.
- Add the ability to run a full regression test with a small
- Fix other minor problems with using small soft heap limits.
- Work-around for
GCC bug 32575.
- Improved error detection of misused aggregate functions.
- Improvements to the amalgamation generator script so that all symbols
are prefixed with either SQLITE_PRIVATE or SQLITE_API.
- Fix a bug in VACUUM that can lead to
database corruptio if two
processes are connected to the database at the same time and one
VACUUMs then the other then modifies the database.
- The expression "+column" is now considered the same as "column"
when computing the collating sequence to use on the expression.
- In the TCL language interface,
"@variable" instead of "$variable" always binds as a blob.
- Added PRAGMA freelist_count
for determining the current size of the freelist.
PRAGMA auto_vacuum=incremental setting is now persistent.
- Add FD_CLOEXEC to all open files under Unix.
- Fix a bug in the
min()/max() optimization when applied to
- Make sure the TCL language interface works correctly with 64-bit
integers on 64-bit machines.
- Allow the value -9223372036854775808 as an integer literal in SQL
- Add the capability of "hidden" columns in virtual tables.
- Use the macro SQLITE_PRIVATE (defaulting to "static") on all
internal functions in the amalgamation.
- Add pluggable tokenizers and ICU
tokenization support to FTS2
- Other minor bug fixes and documentation enhancements
- Fix a bug that can lead to database corruption if an SQLITE_BUSY error
occurs in the middle of an explicit transaction and that transaction
is later committed. Ticket #2409.
- Fix a bug that can lead to database corruption if autovacuum mode is
on and a malloc() failure follows a CREATE TABLE or CREATE INDEX statement
which itself follows a cache overflow inside a transaction. See
- Added explicit upper bounds on the sizes and
quantities of things SQLite can process. This change might cause
compatibility problems for
applications that use SQLite in the extreme, which is why the current
release is 3.4.0 instead of 3.3.18.
- Added support for Incremental BLOB I/O.
- Added the sqlite3_bind_zeroblob() API
and the zeroblob() SQL function.
- Added support for
- Added the SQLITE_MIXED_ENDIAN_64BIT_FLOAT compile-time option to support
ARM7 processors with goofy endianness.
- Removed all instances of sprintf() and strcpy() from the core library.
- Added support for
International Components for Unicode (ICU)
to the full-text search extensions.
- In the Windows OS driver, reacquire a SHARED lock if an attempt to
acquire an EXCLUSIVE lock fails. Ticket #2354
- Fix the REPLACE() function so that it returns NULL if the second argument
is an empty string. Ticket #2324.
- Document the hazards of type conversions in
and related APIs. Fix unnecessary type conversions. Ticket #2321.
- Internationalization of the TRIM() function. Ticket #2323
- Use memmove() instead of memcpy() when moving between memory regions
that might overlap. Ticket #2334
- Fix an optimizer bug involving subqueries in a compound SELECT that has
both an ORDER BY and a LIMIT clause. Ticket #2339.
- Make sure the sqlite3_snprintf()
interface does not zero-terminate the buffer if the buffer size is
less than 1. Ticket #2341
- Fix the built-in printf logic so that it prints "NaN" not "Inf" for
floating-point NaNs. Ticket #2345
- When converting BLOB to TEXT, use the text encoding of the main database.
- Keep the full precision of integers (if possible) when casting to
NUMERIC. Ticket #2364
- Fix a bug in the handling of UTF16 codepoint 0xE000
- Consider explicit collate clauses when matching WHERE constraints
to indices in the query optimizer. Ticket #2391
- Fix the query optimizer to correctly handle constant expressions in
the ON clause of a LEFT JOIN. Ticket #2403
- Fix the query optimizer to handle rowid comparisons to NULL
correctly. Ticket #2404
- Fix many potential segfaults that could be caused by malicious SQL
- When the "write_version" value of the database header is larger than
what the library understands, make the database read-only instead of
- Other minor bug fixes
- Fix a bug that caused VACUUM to fail if NULLs appeared in a
- Reinstate performance improvements that were added in
but regressed in Version 3.3.15.
- Fix problems with the handling of ORDER BY expressions on
compound SELECT statements in subqueries.
- Fix a potential segfault when destroying locks on WinCE in
a multi-threaded environment.
- Documentation updates.
- Fix a bug introduced in 3.3.14 that caused a rollback of
CREATE TEMP TABLE to leave the database connection wedged.
- Fix a bug that caused an extra NULL row to be returned when
a descending query was interrupted by a change to the database.
- The FOR EACH STATEMENT clause on a trigger now causes a syntax
error. It used to be silently ignored.
- Fix an obscure and relatively harmless problem that might have caused
a resource leak following an I/O error.
- Many improvements to the test suite. Test coverage now exceeded 98%
- Fix a bug (ticket #2273)
that could cause a segfault when the IN operator
is used one one term of a two-column index and the right-hand side of
the IN operator contains a NULL.
- Added a new OS interface method for determining the sector size
of underlying media: sqlite3OsSectorSize().
- A new algorithm for statements of the form
INSERT INTO table1 SELECT * FROM table2
is faster and reduces fragmentation. VACUUM uses statements of
this form and thus runs faster and defragments better.
- Performance enhancements through reductions in disk I/O:
- Do not read the last page of an overflow chain when
deleting the row - just add that page to the freelist.
- Do not store pages being deleted in the
- Do not read in the (meaningless) content of
pages extracted from the freelist.
- Do not flush the page cache (and thus avoiding
a cache refill) unless another process changes the underlying
- Truncate rather than delete the rollback journal when committing
a transaction in exclusive access mode, or when committing the TEMP
- Added support for exclusive access mode using
- Use heap space instead of stack space for large buffers in the
pager - useful on embedded platforms with stack-space
- Add a makefile target "sqlite3.c" that builds an amalgamation containing
the core SQLite library C code in a single file.
- Get the library working correctly when compiled
with GCC option "-fstrict-aliasing".
- Removed the vestigal SQLITE_PROTOCOL error.
- Improvements to test coverage, other minor bugs fixed,
memory leaks plugged,
code refactored and/or recommended in places for easier reading.
- Add a "fragmentation" measurement in the output of sqlite3_analyzer.
- Add the COLLATE operator used to explicitly set the collating sequence
used by an expression. This feature is considered experimental pending
- Allow up to 64 tables in a join - the old limit was 32.
- Added two new experimental functions:
Their intended use is to facilitate generating
- Fix a problem where
PRAGMA count_changes was
causing incorrect results for updates on tables with triggers
- Fix a bug in the ORDER BY clause optimizer for joins where the
left-most table in the join is constrained by a UNIQUE index.
- Fixed a bug in the "copy" method of the TCL interface.
- Bug fixes in fts1 and fts2 modules.
- Fix another bug in the IS NULL optimization that was added in
- Fix an assertion fault that occurred on deeply nested views.
- Limit the amount of output that
- Minor syntactic changes to support a wider variety of compilers.
- Fix another bug in the implementation of the new
We'll get it right eventually...
- Fix a bug in the IS NULL optimization that was added in version 3.3.9 -
the bug was causing incorrect results on certain LEFT JOINs that included
in the WHERE clause an IS NULL constraint for the right table of the
- Make AreFileApisANSI() a no-op macro in WinCE since WinCE does not
support this function.
- Fix bugs in the implementation of the new
that can lead to segfaults.
- Fix 1-second round-off errors in the
- Enhance the Windows OS layer to provide detailed error codes
- Work around a win2k problem so that SQLite can use single-character
database file names
correctly set their column names in the result set
- Documentation updates
- Fix bugs in pager.c that could lead to database corruption if two
processes both try to recover a hot journal at the same instant
- Added the sqlite3_prepare_v2()
- Fixed the ".dump" command in the command-line shell to show
indices, triggers and views again.
- Change the table_info pragma so that it returns NULL for the default
value if there is no default value
- Support for non-ASCII characters in win95 filenames
- Query optimizer enhancements:
- Optimizer does a better job of using indices to satisfy ORDER BY
clauses that sort on the integer primary key
- Use an index to satisfy an IS NULL operator in the WHERE clause
- Fix a bug that was causing the optimizer to miss an OR optimization
- The optimizer has more freedom to reorder tables in the FROM clause
even in there are LEFT joins.
- Extension loading supported added to WinCE
- Allow constraint names on the DEFAULT clause in a table definition
- Added the ".bail" command to the command-line shell
- Make CSV (comma separate value) output from the command-line shell
more closely aligned to accepted practice
- Experimental FTS2 module added
- Use sqlite3_mprintf() instead of strdup() to avoid libc dependencies
- VACUUM uses a temporary file in the official TEMP folder, not in the
same directory as the original database
- The prefix on temporary filenames on Windows is changed from "sqlite"
- Support for full text search using the FTS1 module (beta)
- Added Mac OS X locking patches (beta - disabled by default)
- Introduce extended error codes and add error codes for various
kinds of I/O errors.
- Added support for IF EXISTS on CREATE/DROP TRIGGER/VIEW
- Fix the regression test suite so that it works with Tcl8.5
- Enhance sqlite3_set_authorizer() to provide notification of calls to
- Added experimental API: sqlite3_auto_extension()
- Various minor bug fixes
- Added support for virtual tables (beta)
- Added support for dynamically loaded extensions (beta)
routine can be called for a different thread
- Added the MATCH operator.
- The default file format is now 1.
- Plays better with virus scanners on Windows
- Faster :memory: databases
- Fix an obscure segfault in UTF-8 to UTF-16 conversions
- Added driver for OS/2
- Correct column meta-information returned for aggregate queries
- Enhanced output from EXPLAIN QUERY PLAN
- LIMIT 0 now works on subqueries
- Bug fixes and performance enhancements in the query optimizer
- Correctly handle NULL filenames in ATTACH and DETACH
- Improved syntax error messages in the parser
- Fix type coercion rules for the IN operator
- CHECK constraints use conflict resolution algorithms correctly.
- The SUM() function throws an error on integer overflow.
- Choose the column names in a compound query from the left-most SELECT
instead of the right-most.
- The sqlite3_create_collation() function
honors the SQLITE_UTF16_ALIGNED flag.
- SQLITE_SECURE_DELETE compile-time option causes deletes to overwrite
old data with zeros.
- Detect integer overflow in abs().
- The random() function provides 64 bits of randomness instead of
only 32 bits.
- Parser detects and reports automaton stack overflow.
- Change the round() function to return REAL instead of TEXT.
- Allow WHERE clause terms on the left table of a LEFT OUTER JOIN to
contain aggregate subqueries.
- Skip over leading spaces in text to numeric conversions.
- Various minor bug and documentation typo fixes and
- Fix a blunder in the Unix mutex implementation that can lead to
deadlock on multithreaded systems.
- Fix an alignment problem on 64-bit machines
- Added the fullfsync pragma.
- Fix an optimizer bug that could have caused some unusual LEFT OUTER JOINs
to give incorrect results.
- The SUM function detects integer overflow and converts to accumulating
an approximate result using floating point numbers
- Host parameter names can begin with '@' for compatibility with SQL Server.
- Other miscellaneous bug fixes
- Removed support for an ON CONFLICT clause on CREATE INDEX - it never
worked correctly so this should not present any backward compatibility
- Authorizer callback now notified of ALTER TABLE ADD COLUMN commands
- After any changes to the TEMP database schema, all prepared statements
are invalidated and must be recreated using a new call to
- Other minor bug fixes in preparation for the first stable release
of version 3.3
2006-01-24 (3.3.2 beta)
- Bug fixes and speed improvements. Improved test coverage.
- Changes to the OS-layer interface: mutexes must now be recursive.
- Discontinue the use of thread-specific data for out-of-memory
2006-01-16 (3.3.1 alpha)
- Countless bug fixes
- Speed improvements
- Database connections can now be used by multiple threads, not just
the thread in which they were created.
2006-01-11 (3.3.0 alpha)
- CHECK constraints
- IF EXISTS and IF NOT EXISTS clauses on CREATE/DROP TABLE/INDEX.
- DESC indices
- More efficient encoding of boolean values resulting in smaller database
- More aggressive SQLITE_OMIT_FLOATING_POINT
- Separate INTEGER and REAL affinity
- Added a virtual function layer for the OS interface
- "exists" method added to the TCL interface
- Improved response to out-of-memory errors
- Database cache can be optionally shared between connections
in the same thread
- Optional READ UNCOMMITTED isolation (instead of the default
isolation level of SERIALIZABLE) and table level locking when
database connections share a common cache.
- Fix an obscure bug that can cause database corruption under the
following unusual circumstances: A large INSERT or UPDATE statement which
is part of an even larger transaction fails due to a uniqueness constraint
but the containing transaction commits.
- Fix an obscure bug that can cause database corruption under the
following unusual circumstances: A large INSERT or UPDATE statement which
is part of an even larger transaction fails due to a uniqueness contraint
but the containing transaction commits.
- GROUP BY now considers NULLs to be equal again, as it should
- Now compiles on Solaris and OpenBSD and other Unix variants
that lack the fdatasync() function
- Now compiles on MSVC++6 again
- Fix uninitialized variables causing malfunctions for various obscure
- Correctly compute a LEFT OUTER JOINs that is constrained on the
left table only
- Fix a bug that can cause database corruption if a VACUUM (or
autovacuum) fails and is rolled back on a database that is
larger than 1GiB
- LIKE optimization now works for columns with COLLATE NOCASE
- ORDER BY and GROUP BY now use bounded memory
- Added support for COUNT(DISTINCT expr)
- Change the way SUM() handles NULL values in order to comply with
the SQL standard
- Use fdatasync() instead of fsync() where possible in order to speed
up commits slightly
- Use of the CROSS keyword in a join turns off the table reordering
- Added the experimental and undocumented EXPLAIN QUERY PLAN capability
- Use the unicode API in Windows
- Fix a bug effecting DELETE and UPDATE statements that changed
more than 40960 rows.
- Change the makefile so that it no longer requires GNUmake extensions
- Fix the --enable-threadsafe option on the configure script
- Fix a code generator bug that occurs when the left-hand side of an IN
operator is constant and the right-hand side is a SELECT statement
- The PRAGMA synchronous=off statement now disables syncing of the
master journal file in addition to the normal rollback journals
- Fix a bug introduced in the previous release
that can cause a segfault while generating code
for complex WHERE clauses.
- Allow floating point literals to begin or end with a decimal point.
- Added support for the CAST operator
- Tcl interface allows BLOB values to be transferred to user-defined
- Added the "transaction" method to the Tcl interface
- Allow the DEFAULT value of a column to call functions that have constant
- Added the ANALYZE command for gathering statistics on indices and
using those statistics when picking an index in the optimizer
- Remove the limit (formerly 100) on the number of terms in the
- The right-hand side of the IN operator can now be a list of expressions
instead of just a list of constants
- Rework the optimizer so that it is able to make better use of indices
- The order of tables in a join is adjusted automatically to make
better use of indices
- The IN operator is now a candidate for optimization even if the left-hand
side is not the left-most term of the index. Multiple IN operators can be
used with the same index.
- WHERE clause expressions using BETWEEN and OR are now candidates
- Added the "case_sensitive_like" pragma and the SQLITE_CASE_SENSITIVE_LIKE
compile-time option to set its default value to "on".
- Use indices to help with GLOB expressions and LIKE expressions too
when the case_sensitive_like pragma is enabled
- Added support for grave-accent quoting for compatibility with MySQL
- Improved test coverage
- Dozens of minor bug fixes
- Added the sqlite3_db_handle() API
- Added the sqlite3_get_autocommit() API
- Added a REGEXP operator to the parser. There is no function to back
up this operator in the standard build but users can add their own using
- Speed improvements and library footprint reductions.
- Fix byte alignment problems on 64-bit architectures.
- Many, many minor bug fixes and documentation updates.
- Fix a memory allocation error in the new ADD COLUMN comment.
- Documentation updates
- Added support for ALTER TABLE ADD COLUMN.
- Added support for the "T" separator in ISO-8601 date/time strings.
- Improved support for Cygwin.
- Numerous bug fixes and documentation updates.
- Fix a bug that could cause database corruption when inserting
record into tables with around 125 columns.
- sqlite3_step() is now much more likely to invoke the busy handler
and less likely to return SQLITE_BUSY.
- Fix memory leaks that used to occur after a malloc() failure.
- The ioctl on Mac OS X to control syncing to disk is F_FULLFSYNC,
not F_FULLSYNC. The previous release had it wrong.
- Fix a bug in autovacuum that could cause database corruption if
a CREATE UNIQUE INDEX fails because of a constraint violation.
This problem only occurs if the new autovacuum feature introduced in
version 3.1 is turned on.
- The F_FULLSYNC ioctl (currently only supported on Mac OS X) is disabled
if the synchronous pragma is set to something other than "full".
- Add additional forward compatibility to the future version 3.2 database
- Fix a bug in WHERE clauses of the form (rowid<'2')
- New SQLITE_OMIT_... compile-time options added
- Updates to the man page
- Remove the use of strcasecmp() from the shell
- Windows DLL exports symbols Tclsqlite_Init and Sqlite_Init
- Fix a problem with VACUUM on databases from which tables containing
AUTOINCREMENT have been dropped.
- Add forward compatibility to the future version 3.2 database file
- Documentation updates
- Fix a bug that can lead to database corruption if there are two
open connections to the same database and one connection does a VACUUM
and the second makes some change to the database.
- Allow "?" parameters in the LIMIT clause.
- Fix VACUUM so that it works with AUTOINCREMENT.
- Fix a race condition in AUTOVACUUM that can lead to corrupt databases
- Add a numeric version number to the sqlite3.h include file.
- Other minor bug fixes and performance enhancements.
- Fix a bug that can lead to database corruption if there are two
open connections to the same database and one connection does a VACUUM
and the second makes some change to the database.
- Correctly handle quoted names in CREATE INDEX statements.
- Fix a naming conflict between sqlite.h and sqlite3.h.
- Avoid excess heap usage when copying expressions.
- Other minor bug fixes.
2005-02-01 (3.1.1 BETA)
- Automatic caching of prepared statements in the TCL interface
- ATTACH and DETACH as well as some other operations cause existing
prepared statements to expire.
- Numerous minor bug fixes
2005-01-21 (3.1.0 ALPHA)
- Autovacuum support added
- CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP added
- Support for the EXISTS clause added.
- Support for correlated subqueries added.
- Added the ESCAPE clause on the LIKE operator.
- Support for ALTER TABLE ... RENAME TABLE ... added
- AUTOINCREMENT keyword supported on INTEGER PRIMARY KEY
- Many SQLITE_OMIT_ macros inserts to omit features at compile-time
and reduce the library footprint.
- The REINDEX command was added.
- The engine no longer consults the main table if it can get
all the information it needs from an index.
- Many nuisance bugs fixed.
- Add support for DEFERRED, IMMEDIATE, and EXCLUSIVE transactions.
- Allow new user-defined functions to be created when there are
already one or more precompiled SQL statements.
- Fix portability problems for MinGW/MSYS.
- Fix a byte alignment problem on 64-bit Sparc machines.
- Fix the ".import" command of the shell so that it ignores \r
characters at the end of lines.
- The "csv" mode option in the shell puts strings inside double-quotes.
- Fix typos in documentation.
- Convert array constants in the code to have type "const".
- Numerous code optimizations, specially optimizations designed to
make the code footprint smaller.
- The BTree module allocates large buffers using malloc() instead of
off of the stack, in order to play better on machines with limited
- Fixed naming conflicts so that versions 2.8 and 3.0 can be
linked and used together in the same ANSI-C source file.
- New interface: sqlite3_bind_parameter_index()
- Add support for wildcard parameters of the form: "?nnn"
- Fix problems found on 64-bit systems.
- Removed encode.c file (containing unused routines) from the
version 3.0 source tree.
- The sqlite3_trace() callbacks occur before each statement
is executed, not when the statement is compiled.
- Makefile updates and miscellaneous bug fixes.
2004-09-02 (3.0.6 beta)
- Better detection and handling of corrupt database files.
- The sqlite3_step() interface returns SQLITE_BUSY if it is unable
to commit a change because of a lock
- Combine the implementations of LIKE and GLOB into a single
- Miscellaneous code size optimizations and bug fixes
2004-08-29 (3.0.5 beta)
- Support for ":AAA" style bind parameter names.
- Added the new sqlite3_bind_parameter_name() interface.
- Support for TCL variable names embedded in SQL statements in the
- The TCL bindings transfer data without necessarily doing a conversion
to a string.
- The database for TEMP tables is not created until it is needed.
- Add the ability to specify an alternative temporary file directory
using the "sqlite_temp_directory" global variable.
- A compile-time option (SQLITE_BUSY_RESERVED_LOCK) causes the busy
handler to be called when there is contention for a RESERVED lock.
- Various bug fixes and optimizations
2004-08-09 (3.0.4 beta)
- CREATE TABLE and DROP TABLE now work correctly as prepared statements.
- Fix a bug in VACUUM and UNIQUE indices.
- Add the ".import" command to the command-line shell.
- Fix a bug that could cause index corruption when an attempt to
delete rows of a table is blocked by a pending query.
- Library size optimizations.
- Other minor bug fixes.
- This is a maintenance release only. Various minor bugs have been
fixed and some portability enhancements are added.
2004-07-22 (3.0.3 beta)
- The second beta release for SQLite 3.0.
- Add support for "PRAGMA page_size" to adjust the page size of
- Various bug fixes and documentation updates.
2004-06-30 (3.0.2 beta)
- The first beta release for SQLite 3.0.
2004-06-22 (3.0.1 alpha)
*** Alpha Release - Research And Testing Use Only ***
- Lots of bug fixes.
2004-06-18 (3.0.0 alpha)
*** Alpha Release - Research And Testing Use Only ***
- Support for internationalization including UTF-8, UTF-16, and
user defined collating sequences.
- New file format that is 25% to 35% smaller for typical use.
- Improved concurrency.
- Atomic commits for ATTACHed databases.
- Remove cruft from the APIs.
- BLOB support.
- 64-bit rowids.
- More information.
- Fix the min() and max() optimizer so that it works when the FROM
clause consists of a subquery.
- Ignore extra whitespace at the end of of "." commands in the shell.
- Bundle sqlite_encode_binary() and sqlite_decode_binary() with the
- The TEMP_STORE and DEFAULT_TEMP_STORE pragmas now work.
- Code changes to compile cleanly using OpenWatcom.
- Fix VDBE stack overflow problems with INSTEAD OF triggers and
NULLs in IN operators.
- Add the global variable sqlite_temp_directory which if set defines the
directory in which temporary files are stored.
- sqlite_interrupt() plays well with VACUUM.
- Other minor bug fixes.
- Refactor parts of the code in order to make the code footprint
smaller. The code is now also a little bit faster.
- sqlite_exec() is now implemented as a wrapper around sqlite_compile()
- The built-in min() and max() functions now honor the difference between
NUMERIC and TEXT datatypes. Formerly, min() and max() always assumed
their arguments were of type NUMERIC.
- New HH:MM:SS modifier to the built-in date/time functions.
- Experimental sqlite_last_statement_changes() API added. Fixed
the last_insert_rowid() function so that it works correctly with
- Add functions prototypes for the database encryption API.
- Fix several nuisance bugs.
- Fix a bug that will might corrupt the rollback journal if a power failure
or external program halt occurs in the middle of a COMMIT. The corrupt
journal can lead to database corruption when it is rolled back.
- Reduce the size and increase the speed of various modules, especially
the virtual machine.
- Allow "<expr> IN <table>" as a shorthand for
"<expr> IN (SELECT * FROM <table>".
- Optimizations to the sqlite_mprintf() routine.
- Make sure the MIN() and MAX() optimizations work within subqueries.
- Fix a bug in how the IN operator handles NULLs in subqueries. The bug
was introduced by the previous release.
- Fix a potential database corruption problem on Unix caused by the fact
that all POSIX advisory locks are cleared whenever you close() a file.
The work around it to embargo all close() calls while locks are
- Performance enhancements on some corner cases of COUNT(*).
- Make sure the in-memory backend response sanely if malloc() fails.
- Allow sqlite_exec() to be called from within user-defined SQL
- Improved accuracy of floating-point conversions using "long double".
- Bug fixes in the experimental date/time functions.
- Fix a 32-bit integer overflow problem that could result in corrupt
indices in a database if large negative numbers (less than -2147483648)
were inserted into an indexed numeric column.
- Fix a locking problem on multi-threaded Linux implementations.
- Always use "." instead of "," as the decimal point even if the locale
- Added UTC to localtime conversions to the experimental date/time
- Bug fixes to date/time functions.
- Fix a critical bug introduced into 2.8.0 which could cause
- Fix a problem with 3-way joins that do not use indices
- The VACUUM command now works with the non-callback API
- Improvements to the "PRAGMA integrity_check" command
- Added experimental sqlite_bind() and sqlite_reset() APIs.
- If the name of the database is an empty string, open a new database
in a temporary file that is automatically deleted when the database
- Performance enhancements in the Lemon-generated parser
- Experimental date/time functions revised.
- Disallow temporary indices on permanent tables.
- Documentation updates and typo fixes
- Added experimental sqlite_progress_handler() callback API
- Removed support for the Oracle8 outer join syntax.
- Allow GLOB and LIKE operators to work as functions.
- Other minor documentation and makefile changes and bug fixes.
- Moved the CVS repository to www.sqlite.org
- Update the NULL-handling documentation.
- Experimental date/time functions added.
- Bug fix: correctly evaluate a view of a view without segfaulting.
- Bug fix: prevent database corruption if you dropped a
trigger that had the same name as a table.
- Bug fix: allow a VACUUM (without segfaulting) on an empty
database after setting the EMPTY_RESULT_CALLBACKS pragma.
- Bug fix: if an integer value will not fit in a 32-bit int, store it in
a double instead.
- Bug fix: Make sure the journal file directory entry is committed to disk
before writing the database file.
- Make LIMIT work on a compound SELECT statement.
- LIMIT 0 now shows no rows. Use LIMIT -1 to see all rows.
- Correctly handle comparisons between an INTEGER PRIMARY KEY and
a floating point number.
- Fix several important bugs in the new ATTACH and DETACH commands.
- Updated the NULL-handling document.
- Allow NULL arguments in sqlite_compile() and sqlite_step().
- Many minor bug fixes
- Enhanced the "PRAGMA integrity_check" command to verify indices.
- Added authorization hooks for the new ATTACH and DETACH commands.
- Many documentation updates
- Many minor bug fixes
- Fix a problem that will corrupt the indices on a table if you
do an INSERT OR REPLACE or an UPDATE OR REPLACE on a table that
contains an INTEGER PRIMARY KEY plus one or more indices.
- Fix a bug in Windows locking code so that locks work correctly
when simultaneously accessed by Win95 and WinNT systems.
- Add the ability for INSERT and UPDATE statements to refer to the
"rowid" (or "_rowid_" or "oid") columns.
- Other important bug fixes
- Fix a problem that will corrupt the database file if you drop a
table from the main database that has a TEMP index.
- Reactivated the VACUUM command that reclaims unused disk space in
a database file.
- Added the ATTACH and DETACH commands to allow interacting with multiple
database files at the same time.
- Added support for TEMP triggers and indices.
- Added support for in-memory databases.
- Removed the experimental sqlite_open_aux_file(). Its function is
subsumed in the new ATTACH command.
- The precedence order for ON CONFLICT clauses was changed so that
ON CONFLICT clauses on BEGIN statements have a higher precedence than
ON CONFLICT clauses on constraints.
- Many, many bug fixes and compatibility enhancements.
- Modified the journal file format to make it more resistant to corruption
that can occur after an OS crash or power failure.
- Added a new C/C++ API that does not use callback for returning data.
- Performance improvements. The library is now much faster.
- Added the sqlite_set_authorizer() API. Formal documentation has
not been written - see the source code comments for instructions on
how to use this function.
- Fix a bug in the GLOB operator that was preventing it from working
with upper-case letters.
- Various minor bug fixes.
- Fix an uninitialized variable in pager.c which could (with a probability
of about 1 in 4 billion) result in a corrupted database.
- Database files can now grow to be up to 2^41 bytes. The old limit
was 2^31 bytes.
- The optimizer will now scan tables in the reverse if doing so will
satisfy an ORDER BY ... DESC clause.
- The full pathname of the database file is now remembered even if
a relative path is passed into sqlite_open(). This allows
the library to continue operating correctly after a chdir().
- Speed improvements in the VDBE.
- Lots of little bug fixes.
- Various compiler compatibility fixes.
- Fix a bug in the "expr IN ()" operator.
- Accept column names in parentheses.
- Fix a problem with string memory management in the VDBE
- Fix a bug in the "table_info" pragma"
- Export the sqlite_function_type() API function in the Windows DLL
- Fix locking behavior under Windows
- Fix a bug in LEFT OUTER JOIN
- Prevent journal file overflows on huge transactions.
- Fix a memory leak that occurred when sqlite_open() failed.
- Honor the ORDER BY and LIMIT clause of a SELECT even if the
result set is used for an INSERT.
- Do not put write locks on the file used to hold TEMP tables.
- Added documentation on SELECT DISTINCT and on how SQLite handles NULLs.
- Fix a problem that was causing poor performance when many thousands
of SQL statements were executed by a single sqlite_exec() call.
- Fix a bug in the ORDER BY logic that was introduced in version 2.7.0
- C-style comments are now accepted by the tokenizer.
- INSERT runs a little faster when the source is a SELECT statement.
- Make a distinction between numeric and text values when sorting.
Text values sort according to memcmp(). Numeric values sort in
- Allow multiple simultaneous readers under Windows by simulating
the reader/writers locks that are missing from Win95/98/ME.
- An error is now returned when trying to start a transaction if
another transaction is already active.
- Add the ability to read both little-endian and big-endian databases.
So a database created under SunOS or Mac OS X can be read and written
under Linux or Windows and vice versa.
- Convert to the new website: http://www.sqlite.org/
- Allow transactions to span Linux Threads
- Bug fix in the processing of the ORDER BY clause for GROUP BY queries
- Text files read by the COPY command can now have line terminators
of LF, CRLF, or CR.
- SQLITE_BUSY is handled correctly if encountered during database
- Fix to UPDATE triggers on TEMP tables.
- Documentation updates.
- Include a static string in the library that responds to the RCS
"ident" command and which contains the library version number.
- Fix an assertion failure that occurred when deleting all rows of
a table with the "count_changes" pragma turned on.
- Better error reporting when problems occur during the automatic
2.5.6 to 2.6.0 database format upgrade.
- Change the format of indices to correct a design flaw the originated
with version 2.1.0. *** This is an incompatible
file format change *** When version 2.6.0 or later of the
library attempts to open a database file created by version 2.5.6 or
earlier, it will automatically and irreversibly convert the file format.
Make backup copies of older database files before opening them with
version 2.6.0 of the library.
- Fix more problems with rollback. Enhance the test suite to exercise
the rollback logic extensively in order to prevent any future problems.
- Fix a bug which could cause database corruption during a rollback.
This bugs was introduced in version 2.4.0 by the freelist
optimization of checkin .
- Fix a bug in aggregate functions for VIEWs.
- Other minor changes and enhancements.
- Make the "AS" keyword optional again.
- The datatype of columns now appear in the 4th argument to the
- Added the sqlite_open_aux_file() API, though it is still
mostly undocumented and untested.
- Added additional test cases and fixed a few bugs that those
test cases found.
- Bug fix: Database corruption can occur due to the optimization
that was introduced in version 2.4.0 (check-in ). The problem
should now be fixed. The use of versions 2.4.0 through 2.5.2 is
- Added the new SQLITE_TEMP_MASTER table which records the schema
for temporary tables in the same way that SQLITE_MASTER does for
- Added an optimization to UNION ALL
- Fixed a bug in the processing of LEFT OUTER JOIN
- The LIMIT clause now works on subselects
- ORDER BY works on subselects
- There is a new TypeOf() function used to determine if an expression
is numeric or text.
- Autoincrement now works for INSERT from a SELECT.
- The query optimizer now attempts to implement the ORDER BY clause
using an index. Sorting is still used if not suitable index is
- Added support for row triggers.
- Added SQL-92 compliant handling of NULLs.
- Add support for the full SQL-92 join syntax and LEFT OUTER JOINs.
- Double-quoted strings interpreted as column names not text literals.
- Parse (but do not implement) foreign keys.
- Performance improvements in the parser, pager, and WHERE clause code
- Make the LIMIT clause work on subqueries. (ORDER BY still does not
- Added the "%Q" expansion to sqlite_*_printf().
- Bug fixes too numerous to mention (see the change log).
- Added logic to detect when the library API routines are called out
- Bug fix: Column names in the result set were not being generated
correctly for some (rather complex) VIEWs. This could cause a
segfault under certain circumstances.
- Bug fix: Generate correct column headers when a compound SELECT is used
as a subquery.
- Added the sqlite_encode_binary() and sqlite_decode_binary() functions to
the source tree. But they are not yet linked into the library.
- Documentation updates.
- Export the sqlite_changes() function from Windows DLLs.
- Bug fix: Do not attempt the subquery flattening optimization on queries
that lack a FROM clause. To do so causes a segfault.
- Fix a bug that was causing the precompiled binary of SQLITE.EXE to
report "out of memory" under Windows 98.
- Make sure VIEWs are created after their corresponding TABLEs in the
output of the .dump command in the shell.
- Speed improvements: Do not do synchronous updates on TEMP tables.
- Many improvements and enhancements to the shell.
- Make the GLOB and LIKE operators functions that can be overridden
by a programmer. This allows, for example, the LIKE operator to
be changed to be case sensitive.
- Add the ability to put TABLE.* in the column list of a
- Permit SELECT statements without a FROM clause.
- Added the last_insert_rowid() SQL function.
- Do not count rows where the IGNORE conflict resolution occurs in
the row count.
- Make sure functions expressions in the VALUES clause of an INSERT
- Added the sqlite_changes() API function to return the number
of row that changed in the most recent operation.
- Bug fix: Correctly handle terms in the WHERE clause of a join that
do not contain a comparison operator.
- Bug fix: Correctly handle functions that appear in the WHERE clause
of a join.
- When the PRAGMA vdbe_trace=ON is set, correctly print the P3 operand
value when it is a pointer to a structure rather than a pointer to
- When inserting an explicit NULL into an INTEGER PRIMARY KEY, convert
the NULL value into a unique key automatically.
- Allow "VIEW" to be a column name
- Added support for CASE expressions (patch from Dan Kennedy)
- Added RPMS to the delivery (patches from Doug Henry)
- Fix typos in the documentation
- Cut over configuration management to a new CVS repository with
its own CVSTrac bug tracking system.
- Fix a bug in SELECT that occurs when a compound SELECT is used as a
subquery in the FROM of a SELECT.
- The sqlite_get_table() function now returns an error if you
give it two or more SELECTs that return different numbers of columns.
- Bug fix: Fix an assertion failure that occurred when ROWID was a column
in a SELECT statement on a view.
- Bug fix: Fix an uninitialized variable in the VDBE that would could an
- Make the os.h header file more robust in detecting when the compile is
for Windows and when it is for Unix.
- Using an unnamed subquery in a FROM clause would cause a segfault.
- The parser now insists on seeing a semicolon or the end of input before
executing a statement. This avoids an accidental disaster if the
WHERE keyword is misspelled in an UPDATE or DELETE statement.
- Change the name of the sanity_check PRAGMA to integrity_check
and make it available in all compiles.
- SELECT min() or max() of an indexed column with no WHERE or GROUP BY
clause is handled as a special case which avoids a complete table scan.
- Automatically generated ROWIDs are now sequential.
- Do not allow dot-commands of the command-line shell to occur in the
middle of a real SQL command.
- Modifications to the Lemon parser generator so that the parser tables
are 4 times smaller.
- Added support for user-defined functions implemented in C.
- Added support for new functions: coalesce(), lower(),
upper(), and random()
- Added support for VIEWs.
- Added the subquery flattening optimizer.
- Modified the B-Tree and Pager modules so that disk pages that do not
contain real data (free pages) are not journaled and are not
written from memory back to the disk when they change. This does not
impact database integrity, since the
pages contain no real data, but it does make large INSERT operations
about 2.5 times faster and large DELETEs about 5 times faster.
- Made the CACHE_SIZE pragma persistent
- Added the SYNCHRONOUS pragma
- Fixed a bug that was causing updates to fail inside of transactions when
the database contained a temporary table.
- Allow identifiers to be quoted in square brackets, for compatibility
- Added support for sub-queries in the FROM clause of a SELECT.
- More efficient implementation of sqliteFileExists() under Windows.
(by Joel Luscy)
- The VALUES clause of an INSERT can now contain expressions, including
scalar SELECT clauses.
- Added support for CREATE TABLE AS SELECT
- Bug fix: Creating and dropping a table all within a single
transaction was not working.
- Bug fix: There was an incorrect assert() in pager.c. The real code was
all correct (as far as is known) so everything should work OK if you
compile with -DNDEBUG=1. When asserts are not disabled, there
could be a fault.
- Bug fix: An assertion was failing if "PRAGMA full_column_names=ON;" was
set and you did a query that used a rowid, like this:
"SELECT rowid, * FROM ...".
- Fix a serious bug in the INSERT command which was causing data to go
into the wrong columns if the data source was a SELECT and the INSERT
clauses specified its columns in some order other than the default.
- Added the ability to resolve constraint conflicts is ways other than
an abort and rollback. See the documentation on the "ON CONFLICT"
clause for details.
- Temporary files are now automatically deleted by the operating system
when closed. There are no more dangling temporary files on a program
crash. (If the OS crashes, fsck will delete the file after reboot
under Unix. I do not know what happens under Windows.)
- NOT NULL constraints are honored.
- The COPY command puts NULLs in columns whose data is '\N'.
- In the COPY command, backslash can now be used to escape a newline.
- Added the SANITY_CHECK pragma.
- Important bug fix: the IN operator was not working if either the
left-hand or right-hand side was derived from an INTEGER PRIMARY KEY.
- Do not escape the backslash '\' character in the output of the
sqlite command-line access program.
- The label to the right of an AS in the column list of a SELECT can now
be used as part of an expression in the WHERE, ORDER BY, GROUP BY, and/or
- Fix a bug in the -separator command-line option to the sqlite
- Fix a problem with the sort order when comparing upper-case strings against
characters greater than 'Z' but less than 'a'.
- Report an error if an ORDER BY or GROUP BY expression is constant.
- Fix warning messages in VC++ 7.0. (Patches from nicolas352001)
- Make the library thread-safe. (The code is there and appears to work
but has not been stressed.)
- Added the new sqlite_last_insert_rowid() API function.
- Bug fix: An assertion was failing when a temporary table with an index
had the same name as a permanent table created by a separate process.
- Bug fix: Updates to tables containing an INTEGER PRIMARY KEY and an
index could fail.
- Bug fix: An attempt to delete a single row of a table with a WHERE
clause of "ROWID=x" when no such rowid exists was causing an error.
- Bug fix: Passing in a NULL as the 3rd parameter to sqlite_open()
would sometimes cause a coredump.
- Bug fix: DROP TABLE followed by a CREATE TABLE with the same name all
within a single transaction was causing a coredump.
- Makefile updates from A. Rottmann
- Columns of type INTEGER PRIMARY KEY are actually used as the primary
key in underlying B-Tree representation of the table.
- Several obscure, unrelated bugs were found and fixed while
implemented the integer primary key change of the previous bullet.
- Added the ability to specify "*" as part of a larger column list in
the result section of a SELECT statement. For example:
"SELECT rowid, * FROM table1;".
- Updates to comments and documentation.
- Fix a bug in CREATE TEMPORARY TABLE which was causing the
table to be initially allocated in the main database file instead
of in the separate temporary file. This bug could cause the library
to suffer an assertion failure and it could cause "page leaks" in the
main database file.
- Fix a bug in the b-tree subsystem that could sometimes cause the first
row of a table to be repeated during a database scan.
- Fix the locking mechanism yet again to prevent
sqlite_exec() from returning SQLITE_PROTOCOL
unnecessarily. This time the bug was a race condition in
the locking code. This change affects both POSIX and Windows users.
- Fix for another problem (unrelated to the one fixed in 2.1.4)
that sometimes causes sqlite_exec() to return SQLITE_PROTOCOL
unnecessarily. This time the bug was
in the POSIX locking code and should not effect Windows users.
- Sometimes sqlite_exec() would return SQLITE_PROTOCOL when it
should have returned SQLITE_BUSY.
- The fix to the previous bug uncovered a deadlock which was also
- Add the ability to put a single .command in the second argument
of the sqlite shell
- Updates to the FAQ
- Fix the behavior of comparison operators
(ex: "<", "==", etc.)
so that they are consistent with the order of entries in an index.
- Correct handling of integers in SQL expressions that are larger than
what can be represented by the machine integer.
- Changes to support 64-bit architectures.
- Fix a bug in the locking protocol.
- Fix a bug that could (rarely) cause the database to become
unreadable after a DROP TABLE due to corruption to the SQLITE_MASTER
- Change the code so that version 2.1.1 databases that were rendered
unreadable by the above bug can be read by this version of
the library even though the SQLITE_MASTER table is (slightly)
- Bug fix: Sometimes arbitrary strings were passed to the callback
function when the actual value of a column was NULL.
- Change the format of data records so that records up to 16MB in size
can be stored.
- Change the format of indices to allow for better query optimization.
- Implement the "LIMIT ... OFFSET ..." clause on SELECT statements.
- Made selected parameters in API functions const. This should
be fully backwards compatible.
- Documentation updates
- Simplify the design of the VDBE by restricting the number of sorters
and lists to 1.
In practice, no more than one sorter and one list was ever used anyhow.
- Any UTF-8 character or ISO8859 character can be used as part of
- Patches from Christian Werner to improve ODBC compatibility and to
fix a bug in the round() function.
- Plug some memory leaks that use to occur if malloc() failed.
We have been and continue to be memory leak free as long as
- Changes to some test scripts so that they work on Windows in
addition to Unix.
- Added the EMPTY_RESULT_CALLBACKS pragma
- Support for UTF-8 and ISO8859 characters in column and table names.
- Bug fix: Compute correct table names with the FULL_COLUMN_NAMES pragma
is turned on.
- Added the COUNT_CHANGES pragma.
- Changes to the FULL_COLUMN_NAMES pragma to help out the ODBC driver.
- Bug fix: "SELECT count(*)" was returning NULL for empty tables.
Now it returns 0.
- Bug fix: an obscure and relatively harmless bug was causing one of
the tests to fail when gcc optimizations are turned on. This release
fixes the problem.
- Bug fix: the sqlite_busy_timeout() function was delaying 1000
times too long before failing.
- Bug fix: an assertion was failing if the disk holding the database
file became full or stopped accepting writes for some other reason.
New tests were added to detect similar problems in the future.
- Added new operators: & (bitwise-and)
| (bitwise-or), ~ (ones-complement),
<< (shift left), >> (shift right).
- Added new functions: round() and abs().
- Fix two bugs in the locking protocol. (One was masking the other.)
- Removed some unused "#include " that were causing problems
- Fixed sqlite.h so that it is usable from C++
- Added the FULL_COLUMN_NAMES pragma. When set to "ON", the names of
columns are reported back as TABLE.COLUMN instead of just COLUMN.
- Added the TABLE_INFO() and INDEX_INFO() pragmas to help support the
- Added support for TEMPORARY tables and indices.
- Remove some C++ style comments from btree.c so that it will compile
using compilers other than gcc.
- The ".dump" output from the shell does not work if there are embedded
newlines anywhere in the data. This is an old bug that was carried
forward from version 1.0. To fix it, the ".dump" output no longer
uses the COPY command. It instead generates INSERT statements.
- Extend the expression syntax to support "expr NOT NULL" (with a
space between the "NOT" and the "NULL") in addition to "expr NOTNULL"
(with no space).
- Automatically build binaries for Linux and Windows and put them on
- Incorporate makefile patches form A. Rottmann to use LIBTOOL
- SQLite now honors the UNIQUE keyword in CREATE UNIQUE INDEX. Primary
keys are required to be unique.
- File format changed back to what it was for alpha-1
- Fixes to the rollback and locking behavior
- Initial release of version 2.0. The idea of renaming the library
to "SQLus" was abandoned in favor of keeping the "SQLite" name and
bumping the major version number.
- The pager and btree subsystems added back. They are now the only
- The Dbbe abstraction and the GDBM and memory drivers were removed.
- Copyright on all code was disclaimed. The library is now in the
- Pager and btree subsystems removed. These will be used in a follow-on
SQL server library named "SQLus".
- Add the ability to use quoted strings as table and column names in
- Pager subsystem added but not yet used.
- More robust handling of out-of-memory errors.
- New tests added to the test suite.
- Remove the sqlite_encoding TCL variable that was introduced
in the previous version.
- Add options -encoding and -tcl-uses-utf to the
sqlite TCL command.
- Add tests to make sure that tclsqlite was compiled using Tcl header
files and libraries that match.
- The library now assumes data is stored as UTF-8 if the --enable-utf8
option is given to configure. The default behavior is to assume
iso8859-x, as it has always done. This only makes a difference for
LIKE and GLOB operators and the LENGTH and SUBSTR functions.
- If the library is not configured for UTF-8 and the Tcl library
is one of the newer ones that uses UTF-8 internally,
then a conversion from UTF-8 to iso8859 and
back again is done inside the TCL interface.
- Added limited support for transactions. At this point, transactions
will do table locking on the GDBM backend. There is no support (yet)
for rollback or atomic commit.
- Added special column names ROWID, OID, and _ROWID_ that refer to the
unique random integer key associated with every row of every table.
- Additional tests added to the regression suite to cover the new ROWID
feature and the TCL interface bugs mentioned below.
- Changes to the Lemon parser generator to help it work better when
compiled using MSVC.
- Bug fixes in the TCL interface identified by Oleg Oleinick.
- When doing DELETE and UPDATE, the library used to write the record
numbers of records to be deleted or updated into a temporary file.
This is changed so that the record numbers are held in memory.
- The DELETE command without a WHILE clause just removes the database
files from the disk, rather than going through and deleting record
- A serious bug fixed on Windows. Windows users should upgrade.
No impact to Unix.
- Modify the test scripts to identify tests that depend on system
load and processor speed and
to warn the user that a failure of one of those (rare) tests does
not necessarily mean the library is malfunctioning. No changes to
- Fix a bug which was causing
the UPDATE command to fail on systems where "malloc(0)" returns
NULL. The problem does not appear on Windows, Linux, or HPUX but does
cause the library to fail on QNX.
- An unrelated (and minor) bug from Mark Muranwski fixed. The algorithm
for figuring out where to put temporary files for a "memory:" database
was not working quite right.
- The previous fix was not quite right. This one seems to work better.
- The UPDATE statement was not working when the WHERE clause contained
some terms that could be satisfied using indices and other terms that
could not. Fixed.
- Merge development changes into the main trunk. Future work toward
using a BTree file structure will use a separate CVS source tree. This
CVS tree will continue to support the GDBM version of SQLite only.
- Fix a strange (but valid) C declaration that was causing problems
for QNX. No logical changes.
- Print the offending SQL statement when an error occurs.
- Do not require commas between constraints in CREATE TABLE statements.
- Added the "-echo" option to the shell.
- Changes to comments.
- Rewrote sqlite_complete() to make it faster.
- Minor tweaks to other code to make it run a little faster.
- Added new tests for sqlite_complete() and for memory leaks.
- Documentation updates. Mostly fixing of typos and spelling errors.
- Documentation updates
- Some sanity checking code was removed from the inner loop of vdbe.c
to help the library to run a little faster. The code is only
removed if you compile with -DNDEBUG.
- Added a "memory:" backend driver that stores its database in an
in-memory hash table.
- Break out the GDBM driver into a separate file in anticipation
to added new drivers.
- Allow the name of a database to be prefixed by the driver type.
For now, the only driver type is "gdbm:".
- Fixed an off-by-one error that was causing a coredump in
the '%q' format directive of the new
- Added the sqlite_interrupt() interface.
- In the shell, sqlite_interrupt() is invoked when the
user presses Control-C
- Fixed some instances where sqlite_exec() was
returning the wrong error code.
- Added notes on how to compile for Windows95/98.
- Removed a few variables that were not being used. Etc.
- Added the sqlite_..._printf() interface routines.
- Modified the sqlite shell program to use the new interface
- Modified the sqlite shell program to print the schema for
the built-in SQLITE_MASTER table, if explicitly requested.
- Begin writing documentation on the TCL interface.
2000-09-29 (Not Released)
- Added the sqlite_get_table() API
- Updated the documentation for due to the above change.
- Modified the sqlite shell to make use of the new
sqlite_get_table() API in order to print a list of tables
in multiple columns, similar to the way "ls" prints filenames.
- Modified the sqlite shell to print a semicolon at the
end of each CREATE statement in the output of the ".schema" command.
2000-09-21 (Not Released)
- Change the tclsqlite "eval" method to return a list of results if
no callback script is specified.
- Change tclsqlite.c to use the Tcl_Obj interface
- Add tclsqlite.c to the libsqlite.a library
- Changed the print format for floating point values from "%g" to "%.15g".
- Changed the comparison function so that numbers in exponential notation
(ex: 1.234e+05) sort in numerical order.
- Added functions length() and substr().
- Fix a bug in the sqlite shell program that was causing
a coredump when the output mode was "column" and the first row
of data contained a NULL.
- In the sqlite shell, print the "Database opened READ ONLY" message
to stderr instead of stdout.
- In the sqlite shell, now print the version number on initial startup.
- Add the sqlite_version string constant to the library
- Makefile updates
- Bug fix: incorrect VDBE code was being generated for the following
circumstance: a query on an indexed table containing a WHERE clause with
an IN operator that had a subquery on its right-hand side.
- Fix a bug in the configure script.
- Minor revisions to the website.
- Change the sqlite program so that it can read
databases for which it lacks write permission. (It used to
refuse all access if it could not write.)
- Treat carriage returns as white space.
- Added pattern matching to the ".table" command in the "sqlite"
- Documentation updates
- Added "busy" and "timeout" methods to the Tcl interface
- File format version number was being stored in sqlite_master.tcl
multiple times. This was harmless, but unnecessary. It is now fixed.
- The file format for indices was changed slightly in order to work
around an inefficiency that can sometimes come up with GDBM when
there are large indices having many entries with the same key.
** Incompatible Change **
- The parser's stack was overflowing on a very long UPDATE statement.
This is now fixed.
- Finish the VDBE tutorial.
- Added documentation on compiling to WinNT.
- Fix a configuration program for WinNT.
- Fix a configuration problem for HPUX.
- Better labels on column names of the result.
- Added the sqlite_busy_handler()
and sqlite_busy_timeout() interface.
- Begin writing the VDBE tutorial.
- Clean up comments and variable names. Changes to documentation.
No functional changes to the code.
- Column names in UPDATE statements were case sensitive.
This mistake has now been fixed.
- Added the concatenate string operator (||)
- Added the fcnt() function to the SQL interpreter. The fcnt() function
returns the number of database "Fetch" operations that have occurred.
This function is designed for use in test scripts to verify that
queries are efficient and appropriately optimized. Fcnt() has no other
useful purpose, as far as I know.
- Added a bunch more tests that take advantage of the new fcnt() function.
The new tests did not uncover any new problems.
- Added lots of new test cases
- Fix a few bugs discovered while adding test cases
- Begin adding lots of new documentation
- Added compound select operators: UNION, UNION ALL,
INTERSECT, and EXCEPT
- Added support for using (SELECT ...) within expressions
- Added support for IN and BETWEEN operators
- Added support for GROUP BY and HAVING
- NULL values are now reported to the callback as a NULL pointer
rather than an empty string.
- Added support for default values on columns of a table.
- Improved test coverage. Fixed a few obscure bugs found by the
- All database files to be modified by an UPDATE, INSERT or DELETE are
now locked before any changes are made to any files.
This makes it safe (I think) to access
the same database simultaneously from multiple processes.
- The code appears stable so we are now calling it "beta".
- Better support for file locking so that two or more processes
can access the same database simultaneously. More work needed in
this area, though.
- Added support for aggregate functions (Ex: COUNT(*), MIN(...))
to the SELECT statement.
- Added support for SELECT DISTINCT ...
- Added the LIKE operator.
- Added a GLOB operator: similar to LIKE
but it uses Unix shell globbing wildcards instead of the '%'
and '_' wildcards of SQL.
- Added the COPY command patterned after
PostgreSQL so that SQLite
can now read the output of the pg_dump database dump utility
- Added a VACUUM command that calls the
gdbm_reorganize() function on the underlying database
- And many, many bug fixes...
- Initial Public Release of Alpha code