# page_content

c2: Database File Format
c3: 1.7. Cell Payload Overflow Pages
c5: fileformat.html#cell_payload_overflow_pages
c4:
When the payload of a b-tree cell is too large for the b-tree page,
the surplus is spilled onto overflow pages.  Overflow pages form a linked
list.  The first four bytes of each overflow page are a big-endian
integer which is the page number of the next page in the chain, or zero
for the final page in the chain.  The fifth byte through the last usable
byte are used to hold overflow content.


c2: Database File Format
c3: 1.8. Pointer Map or Ptrmap Pages
c5: fileformat.html#pointer_map_or_ptrmap_pages
c4:
Pointer map or ptrmap pages are extra pages inserted into the database
to make the operation of auto_vacuum and incremental_vacuum modes
more efficient.  Other page types in the database typically have pointers
from parent to child.  For example, an interior b-tree page contains pointers
to its child b-tree pages and an overflow chain has a pointer
from earlier to later links in the chain.  A ptrmap page contains linkage
information going in the opposite direction, from child to parent.

Ptrmap pages must exist in any database file which has a non-zero
largest root b-tree page value at offset 52 in the database header.
If the largest root b-tree page value is zero, then the database must not
contain ptrmap pages.

In a database with ptrmap pages, the first ptrmap page is page 2.
A ptrmap page consists of an array of 5-byte entries.  Let J be the
number of 5-byte entries that will fit in the usable space of a page.
(In other words, J=U/5.)  The first ptrmap page will contain back pointer
information for pages 3 through J+2, inclusive.  The second pointer map
page will be on page J+3 and that ptrmap page will provide back pointer
information for pages J+4 through 2*J+3 inclusive.  And so forth for
the entire database file.

In a database that uses ptrmap pages, all pages at locations identified
by the computation in the previous paragraph must be ptrmap page and no
other page may be a ptrmap page.  Except, if the byte-lock page happens to
fall on the same page number as a ptrmap page, then the ptrmap is moved
to the following page for that one case.

Each 5-byte entry on a ptrmap page provides back-link information about 
one of the pages that immediately follow the pointer map.  If page B is a
ptrmap page then back-link information about page B+1 is provided by
the first entry on the pointer map.  Information about page B+2 is
provided by the second entry.  And so forth.

Each 5-byte ptrmap entry consists of one byte of "page type" information
followed by a 4-byte big-endian page number.  Five page types are recognized:



A b-tree root page.  The
page number should be zero.
A freelist page.  The page number should be
zero.
The first page of a
cell payload overflow chain.  The page number is the b-tree page that
contains the cell whose content has overflowed.
A page in an overflow chain
other than the first page.  The page number is the prior page of the
overflow chain.
A non-root b-tree page.  The
page number is the parent b-tree page.


In any database file that contains ptrmap pages, all b-tree root pages 
must come before any non-root b-tree page, cell payload overflow page, or
freelist page.  This restriction ensures that a root page will never
be moved during an auto-vacuum or incremental-vacuum.  The auto-vacuum
logic does not know how to update the root_page field of the sqlite_schema
table and so it is necessary to prevent root pages from being moved
during an auto-vacuum in order to preserve the integrity of the
sqlite_schema table.  Root pages are moved to the beginning of the
database file by the CREATE TABLE, CREATE INDEX, DROP TABLE, and
DROP INDEX operations.


c2: Database File Format
c3: 2. Schema Layer
c5: fileformat.html#schema_layer
c4:
The foregoing text describes low-level aspects of the SQLite file
format.  The b-tree mechanism provides a powerful and efficient means of
accessing a large data set.  This section will describe how the
low-level b-tree layer is used to implement higher-level SQL
capabilities.


c2: Database File Format
c3: 2.1. Record Format
c5: fileformat.html#record_format
c4:
The data for a table b-tree leaf page and the key
of an index b-tree page was characterized above
as an arbitrary sequence of bytes.
The prior discussion mentioned one key being less than another, but
did not define what "less than" meant.  The current section will address
these omissions.

Payload, either table b-tree data or index b-tree keys, 
is always in the "record format".
The record format defines a sequence of values corresponding
to columns in a table or index.  The record format specifies the number
of columns, the datatype of each column, and the content of each column.

The record format makes extensive use of the 
variable-length integer or varint
representation of 64-bit signed integers defined above.



A record contains a header and a body, in that order.  
The header begins with a single varint which determines the total number
of bytes in the header.  The varint value is the size of the header in
bytes including the size varint itself.  Following the size varint are
one or more additional varints, one per column.  These additional varints
are called "serial type" numbers and
determine the datatype of each column, according to the following chart:


Serial Type Codes Of The Record Format

Serial TypeContent SizeMeaning
00
Value is a NULL.
11
Value is an 8-bit twos-complement integer.
22
Value is a big-endian 16-bit twos-complement integer.
33
Value is a big-endian 24-bit twos-complement integer.
44
Value is a big-endian 32-bit twos-complement integer.
56
Value is a big-endian 48-bit twos-complement integer.
68
Value is a big-endian 64-bit twos-complement integer.
78
Value is a big-endian IEEE 754-2008 64-bit floating point number.
80
Value is the integer 0. (Only available for schema format 4 and higher.)
90
Value is the integer 1. (Only available for schema format 4 and higher.)
10,11
    variable
Reserved for internal use.  These serial type codes will
   never appear in a well-formed database file, but they
   might be used in transient and temporary database files
   that SQLite sometimes generates for its own use.
   The meanings of these codes can shift from one release
   of SQLite to the next.
N&#x2265;12 and even
    (N-12)/2
Value is a BLOB that is (N-12)/2 bytes in length.
N&#x2265;13 and odd
    (N-13)/2
Value is a string in the text encoding and (N-13)/2 bytes in length.
The nul terminator is not stored.


The header size varint
and serial type varints will usually consist of a single byte.  The
serial type varints for large strings and BLOBs might extend to two or three
byte varints, but that is the exception rather than the rule. 
The varint format is very efficient at coding the record header.

The values for each column in the record immediately follow the header.
For serial types 0, 8, 9, 12, and 13, the value is zero bytes in
length.  If all columns are of these types then the body section of the
record is empty.

A record might have fewer values than the number of columns in the
corresponding table.  This can happen, for example, after an
ALTER TABLE ... ADD COLUMN SQL statement has increased
the number of columns in the table schema without modifying preexisting rows
in the table.
Missing values at the end of the record are filled in using the
default value for the corresponding columns defined in the table schema.


c2: Database File Format
c3: 2.2. Record Sort Order
c5: fileformat.html#record_sort_order
c4:
The order of keys in an index b-tree is determined by the sort order of
the records that the keys represent.  Record comparison progresses column
by column.  Columns of a record are examined from left to right.  The
first pair of columns that are not equal determines the relative order
of the two records.  The sort order of individual columns is as
follows:


NULL values (serial type 0) sort first.
Numeric values (serial types 1 through 9) sort after NULLs
      and in numeric order.
Text values (odd serial types 13 and larger) sort after numeric
    values in the order determined by the columns collating function.
BLOB values (even serial types 12 and larger) sort last and in the order 
    determined by memcmp().


A collating function for each column is necessary in order to compute
the order of text fields.
SQLite defines three built-in collating functions:



BINARY
     The built-in BINARY collation compares strings byte by byte
        using the memcmp() function
        from the standard C library.
NOCASE
     The NOCASE collation is like BINARY except that uppercase
        ASCII characters ('A' through 'Z')
        are folded into their lowercase equivalents prior to running the
        comparison.  Only ASCII characters are case-folded.
        NOCASE
        does not implement a general purpose unicode caseless comparison.
RTRIM
     RTRIM is like BINARY except that extra spaces at the end of either
         string do not change the result.  In other words, strings will
         compare equal to one another as long as they
         differ only in the number of spaces at the end.


Additional application-specific collating functions can be added to
SQLite using the sqlite3_create_collation() interface.

The default collating function for all strings is BINARY.
Alternative collating functions for table columns can be specified in the
CREATE TABLE statement using the COLLATE clause on the column definition.
When a column is indexed, the same collating function specified in the
CREATE TABLE statement is used for the column in the index, by default,
though this can be overridden using a COLLATE clause in the 
CREATE INDEX statement.


c2: Database File Format
c3: 2.3. Representation Of SQL Tables
c5: fileformat.html#representation_of_sql_tables
c4:
Each ordinary SQL table in the database schema is represented on-disk
by a table b-tree.  Each entry in the table b-tree corresponds to a row
of the SQL table.  The rowid of the SQL table is the 64-bit signed
integer key for each entry in the table b-tree.

 The content of each SQL table row is stored in the database file by
first combining the values in the various columns into a byte array
in the record format, then storing that byte array as the payload in
an entry in the table b-tree.  The order of values in the record is
the same as the order of columns in the SQL table definition.
When an SQL table includes an
INTEGER PRIMARY KEY column (which aliases the rowid) then that
column appears in the record as a NULL value.  SQLite will always use
the table b-tree key rather than the NULL value when referencing the
INTEGER PRIMARY KEY column.

 If the affinity of a column is REAL and that column contains a
value that can be converted to an integer without loss of information
(if the value contains no fractional part and is not too large to be
represented as an integer) then the column may be stored in the record
as an integer.  SQLite will convert the value back to floating
point when extracting it from the record.


c2: Database File Format
c3: 2.4. Representation of WITHOUT ROWID Tables
c5: fileformat.html#representation_of_without_rowid_tables
c4:
If an SQL table is created using the "WITHOUT ROWID" clause at the
end of its CREATE TABLE statement, then that table is a WITHOUT ROWID
table and uses a different on-disk representation.  A WITHOUT ROWID
table uses an index b-tree rather than a table b-tree for storage.
The key for each entry in the WITHOUT ROWID b-tree is a record composed
of the columns of the PRIMARY KEY followed by all remaining columns of
the table.  The primary key columns appear in the order that they were
declared in the PRIMARY KEY clause and the remaining columns appear in
the order they occur in the CREATE TABLE statement.

Hence, the content encoding for a WITHOUT ROWID table is the same
as the content encoding for an ordinary rowid table, except that the
order of the columns is rearranged so that PRIMARY KEY columns come
first, and the content is used as the key in an index b-tree rather
than as the data in a table b-tree.
The special encoding rules for columns with REAL affinity
apply to WITHOUT ROWID tables the same as they do with rowid tables.


c2: Database File Format
c3: 2.4.1. Suppression of redundant columns in the PRIMARY KEY of WITHOUT ROWID tables
c5: fileformat.html#suppression_of_redundant_columns_in_the_primary_key_of_without_rowid_tables
c4:
If the PRIMARY KEY of a WITHOUT ROWID tables uses the same columns
with the same collating sequence more than once, then the second and
subsequent occurrences of that column in the PRIMARY KEY definition are
ignored.  For example, the following CREATE TABLE statements all specify
the same table, which will have the exact same representation on disk:


CREATE TABLE t1(a,b,c,d,PRIMARY KEY(a,c)) WITHOUT ROWID;
CREATE TABLE t1(a,b,c,d,PRIMARY KEY(a,c,a,c)) WITHOUT ROWID;
CREATE TABLE t1(a,b,c,d,PRIMARY KEY(a,A,a,C)) WITHOUT ROWID;
CREATE TABLE t1(a,b,c,d,PRIMARY KEY(a,a,a,a,c)) WITHOUT ROWID;


The first example above is the preferred definition of the table,
of course.  All of the examples create a WITHOUT ROWID table with
two PRIMARY KEY columns, "a" and "c", in that order, followed by
two data columns "b" and "d", also in that order.


c2: Database File Format
c3: 2.5. Representation Of SQL Indices
c5: fileformat.html#representation_of_sql_indices
c4:
Each SQL index, whether explicitly declared via a CREATE INDEX statement
or implied by a UNIQUE or PRIMARY KEY constraint, corresponds to an 
index b-tree in the database file.
Each entry in the index b-tree corresponds to a single row in the 
associated SQL table.
The key to an index b-tree is
a record composed of the columns that are being indexed followed by the
key of the corresponding table row.  For ordinary tables, the row key is
the rowid, and for WITHOUT ROWID tables the row key is the PRIMARY KEY.
Because every row in the table has a unique row key,
all keys in an index are unique.

In a normal index, there is a one-to-one mapping between rows in a 
table and entries in each index associated with that table.
However, in a partial index, the index b-tree only contains entries
corresponding to table rows for which the WHERE clause expression on the
CREATE INDEX statement is true.
Corresponding rows in the index and table b-trees share the same rowid
or primary key values and contain the same value for all indexed columns.


c2: Database File Format
c3: 2.5.1. Suppression of redundant columns in WITHOUT ROWID secondary indexes
c5: fileformat.html#suppression_of_redundant_columns_in_without_rowid_secondary_indexes_
c4:
In an index on a WITHOUT ROWID table, if a column of the PRIMARY KEY
is also a column in the index and has a matching collating sequence, then the
indexed column is not repeated in the table-key suffix on the
end of the index record.  As an example, consider the following SQL:


CREATE TABLE ex25(a,b,c,d,e,PRIMARY KEY(d,c,a)) WITHOUT rowid;
CREATE INDEX ex25ce ON ex25(c,e);
CREATE INDEX ex25acde ON ex25(a,c,d,e);
CREATE INDEX ex25ae ON ex25(a COLLATE nocase,e);


Each row in the ex25ce index is a record
with these columns: c, e, d, a.  The first two columns are
the columns being indexed, c and e.  The remaining columns are the primary
key of the corresponding table row.  Normally, the primary key would be
columns d, c, and a, but because column c already appears earlier in the
index, it is omitted from the key suffix.

In the extreme case where the columns being indexed cover all columns
of the PRIMARY KEY, the index will consist of only the columns being
indexed.  The ex25acde example above demonstrates this.  Each entry in
the ex25acde index consists of only the columns a, c, d, and e, in that
order.

Each row in ex25ae contains five columns: a, e, d, c, a.  The "a"
column is repeated since the first occurrence of "a" has a collating
function of "nocase" and the second has a collating sequence of "binary".
If the "a" column is not repeated and if the table contains two or more
entries with the same "e" value and where "a" differs only in case, then
all of those table entries would correspond to a single entry in the
index, which would break the one-to-one correspondence between the table
and the index.

 The suppression of redundant columns in the key suffix of an index
entry only occurs in WITHOUT ROWID tables.  In an ordinary rowid table,
the index entry always ends with the rowid even if the INTEGER PRIMARY KEY
column is one of the columns being indexed.


c2: Database File Format
c3: 2.6. Storage Of The SQL Database Schema
c5: fileformat.html#storage_of_the_sql_database_schema
c4:
Page 1 of a database file is the root page of a table b-tree that
holds a special table named "sqlite_schema".  This b-tree is known
as the "schema table" since it stores the complete
database schema.  The structure of the sqlite_schema table is as
if it had been created using the following SQL:


CREATE TABLE sqlite_schema(
  type text,
  name text,
  tbl_name text,
  rootpage integer,
  sql text
);


The sqlite_schema table contains one row for each table, index, view,
and trigger (collectively "objects") in the database schema, except there
is no entry for the sqlite_schema table itself.  The sqlite_schema table
contains entries for internal schema objects in addition to application-
and programmer-defined objects.


The sqlite_schema.type column will be one
of the following text strings:  'table', 'index', 'view', or 'trigger'
according to the type of object defined.  The 'table' string is used
for both ordinary and virtual tables.

The sqlite_schema.name column will hold the name of the object.
UNIQUE and PRIMARY KEY constraints on tables cause SQLite to create
internal indexes with names of the form "sqlite_autoindex_TABLE_N"
where TABLE is replaced by the name of the table that contains the
constraint and N is an integer beginning with 1 and increasing by one
with each constraint seen in the table definition.
In a WITHOUT ROWID table, there is no sqlite_schema entry for the
PRIMARY KEY, but the "sqlite_autoindex_TABLE_N" name is set aside
for the PRIMARY KEY as if the sqlite_schema entry did exist.  This
will affect the numbering of subsequent UNIQUE constraints.
The "sqlite_autoindex_TABLE_N" name is never allocated for an
INTEGER PRIMARY KEY, either in rowid tables or WITHOUT ROWID tables.


The sqlite_schema.tbl_name column holds the name of a table or view
that the object is associated with.  For a table or view, the
tbl_name column is a copy of the name column.  For an index, the tbl_name
is the name of the table that is indexed.  For a trigger, the tbl_name
column stores the name of the table or view that causes the trigger 
to fire.

The sqlite_schema.rootpage column stores the page number of the root
b-tree page for tables and indexes.  For rows that define views, triggers,
and virtual tables, the rootpage column is 0 or NULL.

The sqlite_schema.sql column stores SQL text that describes the
object.  This SQL text is a CREATE TABLE, CREATE VIRTUAL TABLE,
CREATE INDEX,
CREATE VIEW, or CREATE TRIGGER statement that if evaluated against
the database file when it is the main database of a database connection
would recreate the object.  The text is usually a copy of the original
statement used to create the object but with normalizations applied so
that the text conforms to the following rules:


The CREATE, TABLE, VIEW, TRIGGER, and INDEX keywords at the beginning
of the statement are converted to all upper case letters.
The TEMP or TEMPORARY keyword is removed if it occurs after the 
initial CREATE keyword.
Any database name qualifier that occurs prior to the name of the
object being created is removed.
Leading spaces are removed.
All spaces following the first two keywords are converted into a single
space.


The text in the sqlite_schema.sql column is a copy of the original
CREATE statement text that created the object, except normalized as
described above and as modified by subsequent ALTER TABLE statements.
The sqlite_schema.sql is NULL for the internal indexes that are
automatically created by UNIQUE or PRIMARY KEY constraints.


c2: Database File Format
c3: 2.6.1. Alternative Names For The Schema Table
c5: fileformat.html#alternative_names_for_the_schema_table
c4:
The name "sqlite_schema" does not appear anywhere in the file format.
That name is just a convention used by the database implementation.
Due to historical and operational considerations, the
"sqlite_schema" table can also sometimes be called by one of the
following aliases:


 sqlite_master
 sqlite_temp_schema
 sqlite_temp_master


Because the name of the schema table does not appear anywhere in
the file format, the meaning of the database file is not changed if
the application chooses to refer to the schema table by one of
these alternative names.


c2: Database File Format
c3: 2.6.2. Internal Schema Objects
c5: fileformat.html#internal_schema_objects
c4:
In addition to the tables, indexes, views, and triggers created by
the application and/or the developer using CREATE statements SQL, the
sqlite_schema table may contain zero or more entries for 
internal schema objects that are created by SQLite for its 
own internal use.  The names of internal schema objects
always begin with "sqlite_" and any table, index, view, or trigger
whose name begins with "sqlite_" is an internal schema object.
SQLite prohibits applications from creating objects whose names begin
with "sqlite_".  

Internal schema objects used by SQLite may include the following:


Indices with names of the form "sqlite_autoindex_TABLE_N" that
       are used to implement UNIQUE and PRIMARY KEY constraints on
       ordinary tables.

A table with the name "sqlite_sequence" that is used to keep track
       of the maximum historical INTEGER PRIMARY KEY for a table
       using AUTOINCREMENT.

Tables with names of the form "sqlite_statN" where N is an integer.
       Such tables store database statistics gathered by the ANALYZE
       command and used by the query planner to help determine the best
       algorithm to use for each query.


New internal schema objects names, always beginning with "sqlite_",
may be added to the SQLite file format in future releases.


c2: Database File Format
c3: 2.6.3. The sqlite_sequence table
c5: fileformat.html#the_sqlite_sequence_table
c4:
The sqlite_sequence table is an internal table used to help implement
AUTOINCREMENT.  The sqlite_sequence table is created automatically
whenever any ordinary table with an AUTOINCREMENT integer primary
key is created.  Once created, the sqlite_sequence table exists in the
sqlite_schema table forever; it cannot be dropped.
The schema for the sqlite_sequence table is:


CREATE TABLE sqlite_sequence(name,seq);


There is a single row in the sqlite_sequence table for each ordinary
table that uses AUTOINCREMENT.  The name of the table (as it appears in
sqlite_schema.name) is in the sqlite_sequence.name field and the largest
INTEGER PRIMARY KEY ever inserted into that table is 
in the sqlite_sequence.seq field.  
New automatically generated integer primary keys for AUTOINCREMENT
tables are guaranteed to be larger than the sqlite_sequence.seq field for
that table.
If the sqlite_sequence.seq field of an AUTOINCREMENT table is already at
the largest integer value (9223372036854775807) then attempts to add new
rows to that table with an automatically generated integer primary will fail
with an SQLITE_FULL error.
The sqlite_sequence.seq field is automatically updated if required when
new entries are inserted to an AUTOINCREMENT table.  
The sqlite_sequence row for an AUTOINCREMENT table is automatically deleted
when the table is dropped.
If the sqlite_sequence row for an AUTOINCREMENT table does not exist when
the AUTOINCREMENT table is updated, then a new sqlite_sequence row is created.
If the sqlite_sequence.seq value for an AUTOINCREMENT table is manually 
set to something other than an integer and there is a subsequent attempt to
insert the or update the AUTOINCREMENT table, then the behavior is undefined.

Application code is allowed to modify the sqlite_sequence table, to add
new rows, to delete rows, or to modify existing rows.  However, application
code cannot create the sqlite_sequence table if it does not already exist.
Application code can delete all entries from the sqlite_sequence table,
but application code cannot drop the sqlite_sequence table.


c2: Database File Format
c3: 2.6.4. The sqlite_stat1 table
c5: fileformat.html#the_sqlite_stat1_table
c4:
The sqlite_stat1 is an internal table created by the ANALYZE command
and used to hold supplemental information about tables and indexes that the
query planner can use to help it find better ways of performing queries.
Applications can update, delete from, insert into or drop the sqlite_stat1
table, but may not create or alter the sqlite_stat1 table.
The schema of the sqlite_stat1 table is as follows:


CREATE TABLE sqlite_stat1(tbl,idx,stat);


 There is normally one row per index, with the index identified by the
name in the sqlite_stat1.idx column.  The sqlite_stat1.tbl column is
the name of the table to which the index belongs.  In each such row, 
the sqlite_stat.stat column will be
a string consisting of a list of integers followed by zero or more 
arguments.  The first integer in this
list is the approximate number of rows in the index.  (The number of
rows in the index is the same as the number of rows in the table,
except for partial indexes.)
The second integer is the approximate number of rows in the index
that have the same value in the first column of the index.  The third 
integer is the number of rows in the index that have 
the same value for the first two columns.  The N-th integer (for N>1) 
is the estimated average number of rows in 
the index which have the same value for the first N-1 columns.  For
a K-column index, there will be K+1 integers in the stat column.  If
the index is unique, then the last integer will be 1.

The list of integers in the stat column can optionally be followed
by arguments, each of which is a sequence of non-space characters.
All arguments are preceded by a single space.
Unrecognized arguments are silently ignored.

If the "unordered" argument is present, then the query planner assumes
that the index is unordered and will not use the index for a range query
or for sorting.

The "sz=NNN" argument (where NNN represents a sequence of 1 or more digits)
means that the average row size over all records of the table or
index is NNN bytes per row.  The SQLite query planner might use the
estimated row size information provided by the "sz=NNN" token
to help it choose smaller tables and indexes that require less disk I/O.

The presence of the "noskipscan" token on the sqlite_stat1.stat field
of an index prevents that index from being used with the
skip-scan optimization.

New text tokens may be added to the end of the stat column in future
enhancements to SQLite.  For compatibility, unrecognized tokens at the end
of the stat column are silently ignored.

If the sqlite_stat1.idx column is NULL, then the sqlite_stat1.stat
column contains a single integer which is the approximate number of
rows in the table identified by sqlite_stat1.tbl.
If the sqlite_stat1.idx column is the same as the sqlite_stat1.tbl
column, then the table is a WITHOUT ROWID table and the sqlite_stat1.stat
field contains information about the index btree that implements the
WITHOUT ROWID table.


c2: Database File Format
c3: 2.6.5. The sqlite_stat2 table
c5: fileformat.html#the_sqlite_stat2_table
c4:
The sqlite_stat2 is only created and is only used if SQLite is compiled
with SQLITE_ENABLE_STAT2 and if the SQLite version number is between
3.6.18 (2009-09-11) and 3.7.8 (2011-09-19).
The sqlite_stat2 table is neither read nor written by any
version of SQLite before 3.6.18 nor after 3.7.8.
The sqlite_stat2 table contains additional information
about the distribution of keys within an index.
The schema of the sqlite_stat2 table is as follows:


CREATE TABLE sqlite_stat2(tbl,idx,sampleno,sample);


The sqlite_stat2.idx column and the sqlite_stat2.tbl column in each 
row of the sqlite_stat2 table identify an index described by that row.
There are usually 10 rows in the sqlite_stat2
table for each index.

The sqlite_stat2 entries for an index that have sqlite_stat2.sampleno
between 0 and 9 inclusive are samples of the left-most key value in the
index taken at evenly spaced points along the index.
Let C be the number of rows in the index.
Then the sampled rows are given by


     rownumber = (i*C*2 + C)/20


The variable i in the previous expression varies between 0 and 9.
Conceptually, the index space is divided into
10 uniform buckets and the samples are the middle row from each bucket.

The format for sqlite_stat2 is recorded here for legacy reference.  
Recent versions of SQLite no longer support sqlite_stat2 and the
sqlite_stat2 table, if is exists, is simply ignored.


c2: Database File Format
c3: 2.6.6. The sqlite_stat3 table
c5: fileformat.html#the_sqlite_stat3_table
c4:
The sqlite_stat3 is only used if SQLite is compiled
with SQLITE_ENABLE_STAT3 or SQLITE_ENABLE_STAT4
and if the SQLite version number is 3.7.9 (2011-11-01) or greater.
The sqlite_stat3 table is neither read nor written by any
version of SQLite before 3.7.9.
If the SQLITE_ENABLE_STAT4 compile-time option is used and the
SQLite version number is 3.8.1 (2013-10-17) or greater,
then sqlite_stat3 might be read but not written.
The sqlite_stat3 table contains additional information
about the distribution of keys within an index, information that the
query planner can use to devise better and faster query algorithms.
The schema of the sqlite_stat3 table is as follows:


CREATE TABLE sqlite_stat3(tbl,idx,nEq,nLt,nDLt,sample);


There are usually multiple entries in the sqlite_stat3 table for each index.
The sqlite_stat3.sample column holds the value of the left-most field of an
index identified by sqlite_stat3.idx and sqlite_stat3.tbl.
The sqlite_stat3.nEq column holds the approximate
number of entries in the index whose left-most column exactly matches
the sample.
The sqlite_stat3.nLt holds the approximate number of entries in the
index whose left-most column is less than the sample.
The sqlite_stat3.nDLt column holds the approximate
number of distinct left-most entries in the index that are less than
the sample.

There can be an arbitrary number of sqlite_stat3 entries per index.
The ANALYZE command will typically generate sqlite_stat3 tables
that contain between 10 and 40 samples that are distributed across
the key space and with large nEq values.

In a well-formed sqlite_stat3 table, the samples for any single
index must appear in the same order that they occur in the index.  
In other words, if the entry with left-most column S1 is earlier in
the index b-tree than the
entry with left-most column S2, then in the sqlite_stat3 table, 
sample S1 must have a smaller rowid than sample S2.


c2: Database File Format
c3: 2.6.7. The sqlite_stat4 table
c5: fileformat.html#the_sqlite_stat4_table
c4:
The sqlite_stat4 is only created and is only used if SQLite is compiled
with SQLITE_ENABLE_STAT4 and if the SQLite version number is
3.8.1 (2013-10-17) or greater.
The sqlite_stat4 table is neither read nor written by any
version of SQLite before 3.8.1.
The sqlite_stat4 table contains additional information
about the distribution of keys within an index or the distribution of
keys in the primary key of a WITHOUT ROWID table.
The query planner can sometimes use the additional information in
the sqlite_stat4 table to devise better and faster query algorithms.
The schema of the sqlite_stat4 table is as follows:


CREATE TABLE sqlite_stat4(tbl,idx,nEq,nLt,nDLt,sample);


There are typically between 10 to 40 entries in the sqlite_stat4 table for
each index for which statistics are available, however these limits are
not hard bounds.
The meanings of the columns in the sqlite_stat4 table are as follows:



tbl:
    The sqlite_stat4.tbl column holds name of the table that owns
    the index that the row describes

idx:
    The sqlite_stat4.idx column holds name of the index that the
    row describes, or in the case of
    an sqlite_stat4 entry for a WITHOUT ROWID table, the
    name of the table itself.

sample:
    The sqlite_stat4.sample column holds a BLOB
    in the record format that encodes the indexed columns followed by
    the rowid for a rowid table or by the columns of the primary key 
    for a WITHOUT ROWID table.
    The sqlite_stat4.sample BLOB for the WITHOUT ROWID table itself 
    contains just the columns of the primary key.
    Let the number of columns encoded by the sqlite_stat4.sample blob be N.
    For indexes on an ordinary rowid table, N will be one more than the number 
    of columns indexed.
    For indexes on WITHOUT ROWID tables, N will be the number of columns
    indexed plus the number of columns in the primary key.
    For a WITHOUT ROWID table, N will be the number of columns in the
    primary key.

nEq:
    The sqlite_stat4.nEq column holds a list of N integers where 
    the K-th integer is the approximate number of entries in the index
    whose left-most K columns exactly match the K left-most columns
    of the sample.

nLt:
    The sqlite_stat4.nLt column holds a list of N integers where
    the K-th integer is the approximate number of entries in the
    index whose K left-most columns are collectively less than the 
    K left-most columns of the sample.

nDLt:
    The sqlite_stat4.nDLt column holds a list of N integers where
    the K-th integer is the approximate
    number of entries in the index that are distinct in the first K columns and
    where the left-most K columns are collectively less than the left-most
    K columns of the sample.



The sqlite_stat4 is a generalization of the sqlite_stat3 table.  The
sqlite_stat3 table provides information about the left-most column of an
index whereas the sqlite_stat4 table provides information about all columns
of the index.

There can be an arbitrary number of sqlite_stat4 entries per index.
The ANALYZE command will typically generate sqlite_stat4 tables
that contain between 10 and 40 samples that are distributed across
the key space and with large nEq values.

In a well-formed sqlite_stat4 table, the samples for any single
index must appear in the same order that they occur in the index.  
In other words, if entry S1 is earlier in the index b-tree than 
entry S2, then in the sqlite_stat4 table, sample S1 must have a
smaller rowid than sample S2.


c2: Database File Format
c3: 3. The Rollback Journal
c5: fileformat.html#the_rollback_journal
c4:
The rollback journal is a file associated with each SQLite database
file that holds information used to restore the database file to its initial
state during the course of a transaction.
The rollback journal file is always located in the same 
directory as the database
file and has the same name as the database file but with the string
"-journal" appended.  There can only be a single rollback journal
associated with a give database and hence there can only be one write
transaction open against a single database at one time.

If a transaction is aborted due to an application crash, an operating
system crash, or a hardware power failure or crash, then the database may
be left in an inconsistent state.  The next time SQLite attempts to open
the database file, the presence of the rollback journal file will be 
detected and the journal will be automatically played back to restore the
database to its state at the start of the incomplete transaction.

A rollback journal is only considered to be valid if it exists and
contains a valid header.  Hence a transaction can be committed in one
of three ways:

The rollback journal file can be deleted,
The rollback journal file can be truncated to zero length, or
The header of the rollback journal can be overwritten with
invalid header text (for example, all zeros).


These three ways of committing a transaction correspond to the DELETE,
TRUNCATE, and PERSIST settings, respectively, of the journal_mode pragma.



A valid rollback journal begins with a header in the following format:


Rollback Journal Header Format

OffsetSizeDescription
0
    8
    Header string:  0xd9, 0xd5, 0x05, 0xf9, 0x20, 0xa1, 0x63, 0xd7
8
    4
    The "Page Count" - The number of pages in the next segment of the 
        journal, or -1 to
        mean all content to the end of the file
12
    4
    A random nonce for the checksum
16
    4
    Initial size of the database in pages
20
    4
    Size of a disk sector assumed by the process that wrote this
        journal.
24
    4
    Size of pages in this journal.



A rollback journal header is padded with zeros out to the size of a 
single sector (as defined by the sector size integer at offset 20).
The header is in a sector by itself so that if a power loss occurs while
writing the sector, information that follows the header will be
(hopefully) undamaged.

After the header and zero padding are zero or more page records.  Each
page record stores a copy of the content of a page from the database file
before it was changed.  The same page may not appear more than once
within a single rollback journal.
To rollback an incomplete transaction, a process
has merely to read the rollback journal from beginning to end and
write pages found in the journal back into the database file at the
appropriate location.

Let the database page size (the value of the integer at offset 24 
in the journal header) be N.
Then the format of a page record is as follows:


Rollback Journal Page Record Format

OffsetSizeDescription
0
    4
    The page number in the database file
4
    N
    Original content of the page prior to the start of the transaction
N+4
    4
    Checksum




The checksum is an unsigned 32-bit integer computed as follows:


Initialize the checksum to the checksum nonce value found in the
journal header at offset 12.
Initialize index X to be N-200 (where N is the size of a database page
in bytes.
Interpret the byte at offset X into the page as an 8-bit unsigned integer
 and add the value of that integer to the checksum.
Subtract 200 from X.
If X is greater than or equal to zero, go back to step 3.


The checksum value is used to guard against incomplete writes of
a journal page record following a power failure.  A different random nonce
is used each time a transaction is started in order to minimize the risk
that unwritten sectors might by chance contain data from the same page
that was a part of prior journals.  By changing the nonce for each
transaction, stale data on disk will still generate an incorrect checksum
and be detected with high probability.  The checksum only uses a sparse sample
of 32-bit words from the data record for performance reasons - design studies 
during the planning phases of SQLite 3.0.0 showed
a significant performance hit in checksumming the entire page.

Let the page count value at offset 8 in the journal header be M.
If M is greater than zero then after M page records the journal file
may be zero padded out to the next multiple of the sector size and another
journal header may be inserted.  All journal headers within the same
journal must contain the same database page size and sector size.

If M is -1 in the initial journal header, then the number of page records
that follow is computed by computing how many page records will fit in
the available space of the remainder of the journal file.


c2: Database File Format
c3: 4. The Write-Ahead Log
c5: fileformat.html#the_write_ahead_log
c4:
Beginning with version 3.7.0 (2010-07-21), 
SQLite supports a new transaction
control mechanism called "write-ahead log" or "WAL".
When a database is in WAL mode, all connections to that database must
use the WAL.  A particular database will use either a rollback journal
or a WAL, but not both at the same time.
The WAL is always located in the same directory as the database
file and has the same name as the database file but with the string
"-wal" appended.


c2: Database File Format
c3: 4.1. WAL File Format
c5: fileformat.html#wal_file_format
c4:
A WAL file consists of a header followed by zero or more "frames".
Each frame records the revised content of a single page from the
database file.  All changes to the database are recorded by writing
frames into the WAL.  Transactions commit when a frame is written that
contains a commit marker.  A single WAL can and usually does record 
multiple transactions.  Periodically, the content of the WAL is
transferred back into the database file in an operation called a
"checkpoint".

A single WAL file can be reused multiple times.  In other words, the
WAL can fill up with frames and then be checkpointed and then new
frames can overwrite the old ones.  A WAL always grows from beginning
toward the end.  Checksums and counters attached to each frame are
used to determine which frames within the WAL are valid and which
are leftovers from prior checkpoints.

The WAL header is 32 bytes in size and consists of the following eight
big-endian 32-bit unsigned integer values:


WAL Header Format

OffsetSizeDescription
04
    Magic number.  0x377f0682 or 0x377f0683
44
    File format version.  Currently 3007000.
84
    Database page size.  Example: 1024
124
    Checkpoint sequence number
164
    Salt-1: random integer incremented with each checkpoint
204
    Salt-2: a different random number for each checkpoint
244
    Checksum-1: First part of a checksum on the first 24 bytes of header
284
    Checksum-2: Second part of the checksum on the first 24 bytes of header



Immediately following the wal-header are zero or more frames. Each
frame consists of a 24-byte frame-header followed by a page-size bytes
of page data. The frame-header is six big-endian 32-bit unsigned 
integer values, as follows:


WAL Frame Header Format

OffsetSizeDescription
04
    Page number
44
    For commit records, the size of the database file in pages
        after the commit.  For all other records, zero.
84
    Salt-1 copied from the WAL header
124
    Salt-2 copied from the WAL header
164
    Checksum-1:  Cumulative checksum up through and including this page
204
    Checksum-2:  Second half of the cumulative checksum.



A frame is considered valid if and only if the following conditions are
true:


The salt-1 and salt-2 values in the frame-header match
       salt values in the wal-header

The checksum values in the final 8 bytes of the frame-header
       exactly match the checksum computed consecutively on the
       first 24 bytes of the WAL header and the first 8 bytes and
       the content of all frames
       up to and including the current frame.


c2: Database File Format
c3: 4.2. Checksum Algorithm
c5: fileformat.html#checksum_algorithm
c4:
The checksum is computed by interpreting the input as
an even number of unsigned 32-bit integers: x(0) through x(N).
The 32-bit integers are big-endian if the
magic number in the first 4 bytes of the WAL header is 0x377f0683 and
the integers are little-endian if the magic number is 0x377f0682.
The checksum values are always stored in the frame header in a
big-endian format regardless of which byte order is used to compute
the checksum.

The checksum algorithm only works for content which is a multiple of
8 bytes in length.  In other words, if the inputs are x(0) through x(N)
then N must be odd.
The checksum algorithm is as follows:

 
s0 = s1 = 0
for i from 0 to n-1 step 2:
   s0 += x(i) + s1;
   s1 += x(i+1) + s0;
endfor
# result in s0 and s1


The outputs s0 and s1 are both weighted checksums using Fibonacci weights
in reverse order.  (The largest Fibonacci weight occurs on the first element
of the sequence being summed.)  The s1 value spans all 32-bit integer
terms of the sequence whereas s0 omits the final term.


c2: Database File Format
c3: 4.3. Checkpoint Algorithm
c5: fileformat.html#checkpoint_algorithm
c4:
On a checkpoint, the WAL is first flushed to persistent storage using
the xSync method of the VFS. 
Then valid content of the WAL is transferred into the database file.
Finally, the database is flushed to persistent storage using another
xSync method call.
The xSync operations serve as write barriers - all writes launched
before the xSync must complete before any write that launches after the
xSync begins.

A checkpoint need not run to completion.  It might be that some
readers are still using older transactions with data that is contained
in the database file.  In that case, transferring content for newer
transactions from the WAL file into the database would delete the content
out from under readers still using the older transactions.  To avoid that,
checkpoints only run to completion if all reader are using the
last transaction in the WAL.


c2: Database File Format
c3: 4.4. WAL Reset
c5: fileformat.html#wal_reset
c4:
After a complete checkpoint, if no other connections are in transactions
that use the WAL, then subsequent write transactions can
overwrite the WAL file from the beginning.  This is called "resetting the
WAL".  At the start of the first new
write transaction, the WAL header salt-1 value is incremented
and the salt-2 value is randomized.  These changes to the salts invalidate
old frames in the WAL that have already been checkpointed but not yet
overwritten, and prevent them from being checkpointed again.

The WAL file can optionally be truncated on a reset, but it need not be.
Performance is usually a little better if the WAL is not truncated, since
filesystems generally will overwrite an existing file faster than they
will grow a file.


c2: Database File Format
c3: 4.5. Reader Algorithm
c5: fileformat.html#reader_algorithm
c4:
To read a page from the database (call it page number P), a reader
first checks the WAL to see if it contains page P.  If so, then the
last valid instance of page P that is followed by a commit frame
or is a commit frame itself becomes the value read.  If the WAL
contains no copies of page P that are valid and which are a commit
frame or are followed by a commit frame, then page P is read from
the database file.

To start a read transaction, the reader records the number of value
frames in the WAL as "mxFrame".  (More detail)
The reader uses this recorded mxFrame value
for all subsequent read operations.  New transactions can be appended
to the WAL, but as long as the reader uses its original mxFrame value
and ignores subsequently appended content, the reader will see a 
consistent snapshot of the database from a single point in time.  
This technique allows multiple concurrent readers to view different 
versions of the database content simultaneously.

The reader algorithm in the previous paragraphs works correctly, but 
because frames for page P can appear anywhere within the WAL, the
reader has to scan the entire WAL looking for page P frames.  If the
WAL is large (multiple megabytes is typical) that scan can be slow,
and read performance suffers.  To overcome this problem, a separate
data structure called the wal-index is maintained to expedite the
search for frames of a particular page.


c2: Database File Format
c3: 4.6. WAL-Index Format
c5: fileformat.html#wal_index_format
c4:
Conceptually, the wal-index is shared memory, though the current
VFS implementations use a memory-mapped file for operating-system
portability.  The memory-mapped
file is in the same directory as the database and has the same name
as the database with a "-shm" suffix appended.  Because
the wal-index is shared memory, SQLite does not support 
journal_mode=WAL 
on a network filesystem when clients are on different machines, as
all clients of the database must be able to share the same memory.

The purpose of the wal-index is to answer this question quickly:


Given a page number P and a maximum WAL frame index M,
return the largest WAL frame index for page P that does not exceed M, 
or return NULL if there are no frames for page P that do not exceed M.


The M value in the previous paragraph is the "mxFrame" value
defined in section 4.4 that is read at the start 
of a transaction and which defines the maximum frame from the WAL that 
the reader will use.

The wal-index is transient.  After a crash, the wal-index is
reconstructed from the original WAL file.  The VFS is required
to either truncate or zero the header of the wal-index when the last
connection to it closes.  Because the wal-index is transient, it can
use an architecture-specific format; it does not have to be cross-platform.
Hence, unlike the database and WAL file formats which store all values
as big endian, the wal-index stores multi-byte values in the native
byte order of the host computer.

This document is concerned with the persistent state of the database
file, and since the wal-index is a transient structure, no further 
information about the format of the wal-index will be provided here.
Additional details on the format of the wal-index are contained in
the separate WAL-index File Format document.


c2: Run-Time Loadable Extensions
c3: 1. Overview
c5: loadext.html#overview
c4:
SQLite has the ability to load extensions (including new
application-defined SQL functions,
collating sequences, virtual tables, and VFSes) at run-time.
This feature allows the code for extensions to be developed and
tested separately from the application and then loaded
on an as-needed basis.

Extensions can also be statically linked with the application.
The code template shown below will work just as well as a statically
linked extension as it does as a run-time loadable extension except that
you should give the entry point function ("sqlite3_extension_init")
a different name to avoid name collisions if your application contains
two or more extensions.


c2: Run-Time Loadable Extensions
c3: 2. Loading An Extension
c5: loadext.html#loading_an_extension
c4:
An SQLite extension is a shared library or DLL.  To load it, you
need to supply SQLite with the name of the file containing the
shared library or DLL and an entry point to initialize the extension.
In C code, this information is supplied using the
sqlite3_load_extension() API.  See the documentation on that
routine for additional information.

Note that different operating systems use different filename
suffixes for their shared libraries.  Windows uses ".dll", Mac uses
".dylib", and most unixes other than mac use ".so".  If you want to
make your code portable, you can omit the suffix from the shared
library filename and the appropriate suffix will be added automatically
by the sqlite3_load_extension() interface.

There is also an SQL function that can be used to load extensions:
load_extension(X,Y).  It works just like the sqlite3_load_extension()
C interface.

Both methods for loading an extension allow you to specify
the name of an entry point for the extension.  
You can leave this argument blank - passing in
a NULL pointer for the sqlite3_load_extension() C-language interface
or omitting the second argument for the load_extension() SQL interface -
and the extension loader logic will attempt to figure out the entry point
on its own.  It will first try the generic extension name
"sqlite3_extension_init".  If that does not work, it constructs a
entry point using the template "sqlite3_X_init" where the X is replaced
by the lowercase equivalent of every ASCII character in the filename
after the last "/" and before the first following "." omitting the
first three characters if they happen to be "lib".  So, for example,
if the filename is "/usr/lib/libmathfunc-4.8.so" the entry point name
would be "sqlite3_mathfunc_init".  Or if the filename is 
"./SpellFixExt.dll" then the entry point would be called
"sqlite3_spellfixext_init".

For security reasons, extension loading is turned off by default.
In order to use either the C-language or SQL extension loading functions,
one must first enable extension loading using the
sqlite3_db_config(db,SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION,1,NULL)
C-language API in your application.

From the command-line shell, extensions can be loaded using the
".load" dot-command.  For example:


.load ./YourCode


Note that the command-line shell program has already enabled
extension loading for you (by calling the sqlite3_enable_load_extension()
interface as part of its setup) so the command above works without
any special switches, setup, or other complications.

The ".load" command with one argument invokes sqlite3_load_extension()
with the zProc parameter set to NULL, causing SQLite to first look for
an entry point named "sqlite3_extension_init" and then "sqlite3_X_init"
where "X" is derived from the filename.  If your extension has an entry
point with a different name, simply supply that name as the second
argument.  For example:


.load ./YourCode nonstandard_entry_point


c2: Run-Time Loadable Extensions
c3: 3. Compiling A Loadable Extension
c5: loadext.html#compiling_a_loadable_extension
c4:
Loadable extensions are C-code.  To compile them on
most unix-like operating
systems, the usual command is something like this:


gcc -g -fPIC -shared YourCode.c -o YourCode.so


Macs are unix-like, but they do not follow the usual shared library
conventions.  To compile a shared library on a Mac, use a command like
this:


gcc -g -fPIC -dynamiclib YourCode.c -o YourCode.dylib


If when you try to load your library you get back an error message
that says "mach-o, but wrong architecture" then you might need to add
command-line options "-arch i386" or "arch x86_64" to gcc, depending
on how your application is built.

To compile on Windows using MSVC, a command similar to the following
will usually work:


cl YourCode.c -link -dll -out:YourCode.dll


To compile for Windows using MinGW, the command line is just like it
is for unix except that the output file suffix is changed to ".dll" and
the -fPIC argument is omitted:


gcc -g -shared YourCode.c -o YourCode.dll


c2: Run-Time Loadable Extensions
c3: 4. Programming Loadable Extensions
c5: loadext.html#programming_loadable_extensions
c4:
A template loadable extension contains the following three elements:



Use "#include &lt;sqlite3ext.h&gt;" at the top of your source
code files instead of "#include &lt;sqlite3.h&gt;".



Put the macro "SQLITE_EXTENSION_INIT1" on a line by itself 
right after the "#include &lt;sqlite3ext.h&gt;" line.



Add an extension loading entry point routine that looks like 
something the following:

#ifdef _WIN32
__declspec(dllexport)
#endif
int sqlite3_extension_init( /* &lt;== Change this name, maybe */
  sqlite3 *db, 
  char **pzErrMsg, 
  const sqlite3_api_routines *pApi
){
  int rc = SQLITE_OK;
  SQLITE_EXTENSION_INIT2(pApi);
  /* insert code to initialize your extension here */
  return rc;
}


You will do well to customize the name of your entry point to
correspond to the name of the shared library you will be generating,
rather than using the generic "sqlite3_extension_init" name.  Giving
your extension a custom entry point name will enable you to statically
link two or more extensions into the same program without a linker
conflict, if you later decide to use static linking rather than run-time
linking.
If your shared library ends up being named "YourCode.so" or
"YourCode.dll" or "YourCode.dylib" as shown in the compiler examples
above, then the correct entry point name would be
"sqlite3_yourcode_init".


Here is a complete template extension that you can copy/paste 
to get started:

/* Add your header comment here */
#include &lt;sqlite3ext.h&gt; /* Do not use &lt;sqlite3.h&gt;! */
SQLITE_EXTENSION_INIT1

/* Insert your extension code here */

#ifdef _WIN32
__declspec(dllexport)
#endif
/* TODO: Change the entry point name so that "extension" is replaced by
** text derived from the shared library filename as follows:  Copy every
** ASCII alphabetic character from the filename after the last "/" through
** the next following ".", converting each character to lowercase, and
** discarding the first three characters if they are "lib".
*/
int sqlite3_extension_init(
  sqlite3 *db, 
  char **pzErrMsg, 
  const sqlite3_api_routines *pApi
){
  int rc = SQLITE_OK;
  SQLITE_EXTENSION_INIT2(pApi);
  /* Insert here calls to
  **     sqlite3_create_function_v2(),
  **     sqlite3_create_collation_v2(),
  **     sqlite3_create_module_v2(), and/or
  **     sqlite3_vfs_register()
  ** to register the new features that your extension adds.
  */
  return rc;
}


c2: Run-Time Loadable Extensions
c3: 4.1. Example Extensions
c5: loadext.html#example_extensions
c4:
Many examples of complete and working loadable extensions can be 
seen in the SQLite source tree in the
ext/misc subdirectory.
Each file in that directory is a separate extension.  Documentation
is provided by a header comment on the file.
Here are brief notes on a few of the extensions in 
the ext/misc subdirectory:



carray.c &mdash;
Implementation of the carray table-valued function.

compress.c &mdash;
Implementation of application-defined SQL functions compress() and
uncompress() that do zLib compression of text or blob content.

json1.c &mdash;
Implementation of JSON SQL functions and table-valued functions.
This is a larger and more complex extension.

memvfs.c &mdash;
Implementation of a new VFS that stores all content in-memory.

rot13.c &mdash;
Implementation of a rot13() 
SQL function.  This is a very simple example of an extension function
and is useful as a template for creating new extensions.

series.c &mdash;
Implementation of the generate_series virtual table and
table-valued function.  This is a relatively simple example of a
virtual table implementation which can serve as a template for writing
new virtual tables.


Other and more complex extensions can be found in subfolders
under ext/ other than ext/misc/.


c2: Run-Time Loadable Extensions
c3: 5. Persistent Loadable Extensions
c5: loadext.html#persistent_loadable_extensions
c4:
The default behavior for a loadable extension is that it is unloaded
from process memory when the database connection that originally invoked
sqlite3_load_extension() closes.  (In other words, the xDlClose method
of the sqlite3_vfs object is called for all extensions when a database
connection closes.)  However, if the initialization procedure returns
SQLITE_OK_LOAD_PERMANENTLY instead of SQLITE_OK, then the extension will
not be unloaded (xDlClose will not be invoked) and the extension will remain
in process memory indefinitely.  The SQLITE_OK_LOAD_PERMANENTLY return
value is useful for extensions that want to register new VFSes.

To clarify: an extension for which the initialization function returns
SQLITE_OK_LOAD_PERMANENTLY continues to exist in memory after the database
connection closes.  However, the extension is not automatically
registered with subsequent database connections.  This makes it possible
to load extensions that implement new VFSes.
To persistently load and register an extension that implements new SQL
functions, collating sequences, and/or virtual tables, such that those
added capabilities are available to all subsequent database connections,
then the initialization routine should also invoke sqlite3_auto_extension()
on a subfunction that will register those services.

The vfsstat.c extension
show an example of a loadable extension that persistently registers both
a new VFS and a new virtual table.  The
sqlite3_vfsstat_init()
initialization routine in that extension is called only once, when the
extension is first loaded.  It registers the new "vfslog" VFS just that
one time, and it returns SQLITE_OK_LOAD_PERMANENTLY so that the code used
to implement the "vfslog" VFS will remain in memory. The initialization routine
also invokes sqlite3_auto_extension() on a pointer to the "vstatRegister()"
function so that all subsequent database connections will invoke the
"vstatRegister()" function as they start up, and hence register the
"vfsstat" virtual table.


c2: Run-Time Loadable Extensions
c3: 6. Statically Linking A Run-Time Loadable Extension
c5: loadext.html#statically_linking_a_run_time_loadable_extension
c4:
The exact same source code can be used for both a run-time loadable
shared library or DLL and as a module that is statically linked with your
application.  This provides flexibility and allows you to reuse the same
code in different ways.

To statically link your extension, simply add the -DSQLITE_CORE
compile-time option.  The SQLITE_CORE macro causes the SQLITE_EXTENSION_INIT1
and SQLITE_EXTENSION_INIT2 macros to become no-ops.  Then modify your
application to invoke the entry point directly, passing in a NULL pointer
as the third "pApi" parameter.

It is particularly important to use an entry point name that is
based on the extension filename, rather than the generic
"sqlite3_extension_init" entry point name, if you will be statically
linking two or more extensions.  If you use the generic name, there
will be multiple definitions of the same symbol and the link will fail.

If you will be opening multiple database connections in your application,
rather than invoking the extension entry points for each database
connection separately, you might want to consider using the
sqlite3_auto_extension() interface to register your extensions and
to cause them to be automatically started as each database connection
is opened.  You only have to register each extension once, and you can
do so near the beginning of your main() routine.  Using the
sqlite3_auto_extension() interface to register your extensions makes
your extensions work as if they were built into the core SQLite - they
automatically exist whenever you open a new database connection
without needing to be initialized.  Just be sure to complete any
configuration you need to accomplish using sqlite3_config() before
registering your extensions, since the sqlite3_auto_extension()
interface implicitly calls sqlite3_initialize().


c2: Run-Time Loadable Extensions
c3: 7. Implementation Details
c5: loadext.html#implementation_details
c4:
SQLite implements run-time extension loading using the
xDlOpen(), xDlError(), xDlSym(), and xDlClose() methods of the
sqlite3_vfs object.  These methods are implemented using
the dlopen() library on unix (which explains why SQLite commonly
needs to be linked against the "-ldl" library on unix systems)
and using LoadLibrary() API on Windows.  In a custom VFS for
unusual systems, these methods can all be omitted, in which case
the run-time extension loading mechanism will not work (though
you will still be able to statically link the extension code, assuming
the entry pointers are uniquely named).
SQLite can be compiled with
SQLITE_OMIT_LOAD_EXTENSION to omit the extension loading code
from the build.
This page last modified on  2023-10-20 22:32:30 UTC


c2: How To Corrupt An SQLite Database File
c3: Overview
c5: howtocorrupt.html#overview
c4:
An SQLite database is highly resistant to corruption.
If an application crash, or an operating-system crash, or even
a power failure occurs in the middle of a transaction, the partially
written transaction should be automatically rolled back the next time
the database file is accessed.  The recovery process is fully
automatic and does not require any action on the part of the user
or the application.


Though SQLite is resistant to database corruption, it is not immune.
This document describes the various ways that an SQLite database might
go corrupt.


c2: How To Corrupt An SQLite Database File
c3: 1. File overwrite by a rogue thread or process
c5: howtocorrupt.html#_file_overwrite_by_a_rogue_thread_or_process
c4:
SQLite database files are ordinary disk files.
That means that any process can open the file and 
overwrite it with garbage.  There is nothing that the SQLite
library can do to defend against this.


c2: How To Corrupt An SQLite Database File
c3: 1.1. Continuing to use a file descriptor after it has been closed
c5: howtocorrupt.html#_continuing_to_use_a_file_descriptor_after_it_has_been_closed
c4:
We have seen multiple cases where a file descriptor was open on a file,
then that file descriptor was closed and reopened on an SQLite database.
Later, some other thread continued to write into the
old file descriptor, not realizing that the original file had been closed
already.  But because the file descriptor had been reopened by SQLite,
the information that was intended to go into the original file ended up
overwriting parts of the SQLite database, leading to corruption of the
database.

One example of this occurred circa 2013-08-30 on the canonical repository
for the Fossil DVCS.  In that event,
file descriptor 2 (standard error) was being erroneously closed (by
stunnel, we suspect) prior to 
sqlite3_open_v2() so that the file descriptor used for the
repository database file was 2.  Later, an application 
bug caused an assert() statement to emit
an error message by invoking write(2,...).  But since file descriptor 2 was 
now connected to a database file, the error message
overwrote part of the database.  To guard against this kind of problem,
SQLite version 3.8.1 (2013-10-17)
and later refuse to use low-numbered file descriptors
for database files. 
(See SQLITE_MINIMUM_FILE_DESCRIPTOR for additional information.)

Another example of corruption caused by using a closed file
descriptor was 
reported by facebook engineers in a blog post on 2014-08-12.

Another example of this error was reported against
Fossil on 2019-07-11.  A file descriptor would
be opened for debugging output, but then closed and reopened by SQLite.
But the debugging logic continued to write into the original file
descriptor. See the
forum discussion
for the bug report and a link to the fix.


c2: How To Corrupt An SQLite Database File
c3: 1.2. Backup or restore while a transaction is active
c5: howtocorrupt.html#_backup_or_restore_while_a_transaction_is_active
c4:
Systems that run automatic backups in the background might try to
make a backup copy of an SQLite database file while it is in the middle
of a transaction.  The backup copy then might contain some old and some
new content, and thus be corrupt.

The best approach to make reliable backup copies of an SQLite database
is to make use of the backup API that is part of the SQLite library.
Failing that, it is safe to make a copy of an SQLite database file as long
as there are no transactions in progress by any process.  If the previous
transaction failed, then it is important that any rollback journal
(the *-journal file) or write-ahead log (the *-wal file)
be copied together with the database file itself.


c2: How To Corrupt An SQLite Database File
c3: 1.3. Deleting a hot journal
c5: howtocorrupt.html#_deleting_a_hot_journal
c4:
SQLite normally stores all content in a single disk file.  However,
while performing a transaction, information necessary to recover the
database following a crash or power failure is stored in auxiliary
journal files.  Such journal files are described as "hot".
The journal files have the same name as the
original database file with the addition
of -journal or -wal suffix.

SQLite must see the journal files in order to recover from a crash
or power failure.  If the hot journal files are moved, deleted, or renamed
after a crash or power failure, then automatic recovery will not work
and the database may go corrupt.

Another manifestation of this problem is
database corruption caused by inconsistent use of 8+3 filenames.


c2: How To Corrupt An SQLite Database File
c3: 1.4. Mispairing database files and hot journals
c5: howtocorrupt.html#_mispairing_database_files_and_hot_journals_
c4:
The previous example is a specific case of a more general problem:
The state of an SQLite database is controlled by both the
database file and the journal file.  In a quiescent state, the journal
file does not exist and only the database file matters.
But if the journal file does exist, it must be
kept together with the database to avoid corruption.  The following
actions are all likely to lead to corruption:

 Swapping journal files between two different databases.
 Overwritting a journal file with a different journal file.
 Moving a journal file from one database to another.
 Copying a database file without also copying its journal.
 Overwriting a database file with another without also
     deleting any hot journal associated with the original database.


c2: How To Corrupt An SQLite Database File
c3: 2. File locking problems
c5: howtocorrupt.html#_file_locking_problems
c4:
SQLite uses file locks on the database file, and on the 
write-ahead log or WAL file, to coordinate access between concurrent
processes.  Without coordination, two threads or processes might try
to make incompatible changes to a database file at the same time,
resulting in database corruption.


c2: How To Corrupt An SQLite Database File
c3: 2.1. Filesystems with broken or missing lock implementations
c5: howtocorrupt.html#_filesystems_with_broken_or_missing_lock_implementations
c4:
SQLite depends on the underlying filesystem to do locking as the
documentation says it will.  But some filesystems contain bugs in their
locking logic such that the locks do not always behave as advertised.
This is especially true of network filesystems and NFS in particular.
If SQLite is used on a filesystem where the locking primitives contain
bugs, and if two or more threads or processes try to access the same
database at the same time, then database corruption might result.


c2: How To Corrupt An SQLite Database File
c3: 2.2. Posix advisory locks canceled by a separate thread doing close()
c5: howtocorrupt.html#_posix_advisory_locks_canceled_by_a_separate_thread_doing_close_
c4:
The default locking mechanism used by SQLite on unix platforms is
POSIX advisory locking.  Unfortunately, POSIX advisory locking has design
quirks that make it prone to misuse and failure. In particular, any
thread in the same process with a file descriptor that is holding a POSIX
advisory lock can override that lock using a different file descriptor.
One particularly pernicious problem is that the close() system
call will cancel all POSIX advisory locks on the same file for all
threads and all file descriptors in the process.

So, for example, suppose a multi-thread process has
two or more threads with separate SQLite database connections to the
same database file.  Then a third thread comes along and wants to read
something out of that same database file on its own, without using the 
SQLite library.
The third thread does an open(), a read() and then
a close().
One would think this would be harmless.
But the close() system call caused the
locks held on the database by all the other threads to be dropped.  Those
other threads have no way of knowing that their locks have just been
trashed (POSIX does not provide any mechanism to determine this) and so
they keep on running under the assumption that their locks are still valid.
This can lead to two or more threads or processes trying to write to the
database at the same time, resulting in database corruption.

Note that it is perfectly safe for two or more threads to access the
same SQLite database file using the SQLite library.  The unix drivers for
SQLite know about the POSIX advisory locking quirks and work around them.
This problem only arises when a thread tries to bypass the SQLite library
and read the database file directly.


c2: How To Corrupt An SQLite Database File
c3: 2.2.1. Multiple copies of SQLite linked into the same application
c5: howtocorrupt.html#multiple_copies_of_sqlite_linked_into_the_same_application
c4:
As pointed out in the previous paragraph, SQLite takes steps to work
around the quirks of POSIX advisory locking.  Part of that work-around involves
keeping a global list (mutex protected) of open SQLite database files.
But, if multiple copies of SQLite are linked into the same application,
then there will be multiple instances of this global list.
Database connections opened using one copy of the SQLite library
will be unaware of database connections opened using the other copy,
and will be unable to work around the POSIX advisory locking quirks.
A close() operation on one connection might unknowingly 
clear the locks on a different database connection, leading to database
corruption.

The scenario above sounds far-fetched.
But the SQLite developers are aware of at 
least one commercial product that was released
with exactly this bug.  The vendor came to the SQLite developers seeking
help in tracking down some infrequent database corruption issues they were
seeing on Linux and Mac.  The problem was eventually traced to the
fact that the application was linking against two separate copies of SQLite.
The solution was to change the application build procedures to link against
just one copy of SQLite instead of two.


c2: How To Corrupt An SQLite Database File
c3: 2.3. Two processes using different locking protocols
c5: howtocorrupt.html#_two_processes_using_different_locking_protocols
c4:
The default locking mechanism used by SQLite on unix platforms is
POSIX advisory locking, but there are other options.  By selecting an
alternative sqlite3_vfs using the sqlite3_open_v2() interface, an
application can make use of other locking protocols that might be more
appropriate to certain filesystems.  For example, dot-file locking might
be select for use in an application that has to run on an NFS filesystem
that does not support POSIX advisory locking.

It is important that all connections to the same database file use 
the same locking protocol.
If one application is using POSIX advisory locks and another application
is using dot-file locking, then the two applications will not see each
other's locks and will not be able to coordinate database access, possibly
leading to database corruption.


c2: How To Corrupt An SQLite Database File
c3: 2.4. Unlinking or renaming a database file while in use
c5: howtocorrupt.html#_unlinking_or_renaming_a_database_file_while_in_use
c4:
If two processes have open connections to the same database file and
one process closes its connection, unlinks the file, then creates a new
database file in its place with the same name and reopens the new file,
then the two processes will be talking to different database files with 
the same name.  (Note that this is only possible on Posix and Posix-like
systems that permit a file to be unlinked while it is still open for
reading and writing.  Windows does not allow this to occur.)
Since rollback journals and WAL files are based on the name of the database
file, the two different database files will share the same rollback
journal or WAL file.  A rollback or recovery for one of the databases
might use content from the other database, resulting in corruption.
A similar problem occurs if a database file is renamed while it is
opened and a new file is created with the old name.

In other words, unlinking or renaming an open database file 
results in behavior that is undefined and probably undesirable.

Beginning with SQLite version 3.7.17 (2013-05-20),
the unix OS interface will
send SQLITE_WARNING messages to the error log if a database file is unlinked
while it is still in use.


c2: How To Corrupt An SQLite Database File
c3: 2.5. Multiple links to the same file
c5: howtocorrupt.html#_multiple_links_to_the_same_file
c4:
If a single database file has multiple links (either hard or soft links)
then that is just another way of saying that the file has multiple names.
If two or more processes open the database using different names, then
they will use different rollback journals and WAL files.  That means that
if one process crashes, the other process will be unable to recover the
transaction in progress because it will be looking in the wrong place
for the appropriate journal.

In other words, opening and using a database file that has two or
more names results in behavior that is undefined and probably undesirable.

Beginning with SQLite version 3.7.17 (2013-05-20),
the unix OS interface will
send SQLITE_WARNING messages to the error log if a database file has 
multiple hard links.

Beginning with SQLite version 3.10.0 (2016-01-06), 
the unix OS interface will
attempt to resolve symbolic links and open the database file by its
canonical name.  Prior to version 3.10.0, opening a database file 
through a symbolic link was similar to opening a database file
that had multiple hard links and resulted in undefined behavior.


c2: How To Corrupt An SQLite Database File
c3: 2.6. Carrying an open database connection across a fork()
c5: howtocorrupt.html#_carrying_an_open_database_connection_across_a_fork_
c4:
Do not open an SQLite database connection, then fork(), then try
to use that database connection in the child process.  All kinds of
locking problems will result and you can easily end up with a corrupt
database.  SQLite is not designed to support that kind of behavior.
Any database connection that is used in a child process must be opened
in the child process, not inherited from the parent.

 Do not even call sqlite3_close() on a database connection from a
child process if the connection was opened in the parent.  It is safe
to close the underlying file descriptor, but the sqlite3_close()
interface might invoke cleanup activities that will delete content out
from under the parent, leading to errors and perhaps even database
corruption.


c2: How To Corrupt An SQLite Database File
c3: 3. Failure to sync
c5: howtocorrupt.html#_failure_to_sync
c4:
In order to guarantee that database files are always consistent, SQLite
will occasionally ask the operating system to flush all pending writes to
persistent storage then wait for that flush to complete.  This is 
accomplished using the fsync() system call under unix and
FlushFileBuffers() under Windows.  We call this flush of
pending writes a "sync".

Actually, if one is only concerned with atomic and consistent writes and
is willing to forego durable writes, the sync operation does not need
to wait until the content is completely stored on persistent media.  Instead,
the sync operation can be thought of as an I/O barrier.  As long as all
writes that occur before the sync are completed before any write that happens
after the sync, no database corruption will occur.  If sync is operating as
an I/O barrier and not as a true sync, then a power failure or system crash
might cause one or more previously committed transactions to roll back
(in violation of the "durable" property of "ACID") but the database will at
least continue to be consistent, and that is what most people care about.


c2: How To Corrupt An SQLite Database File
c3: 3.1. Disk drives that do not honor sync requests
c5: howtocorrupt.html#_disk_drives_that_do_not_honor_sync_requests
c4:
Unfortunately, most consumer-grade mass storage devices lie about
syncing.  Disk drives will report that content is safely on persistent
media as soon as it reaches the track buffer and before actually being
written to oxide.  This makes the disk drives seem to operate faster
(which is vitally important to the manufacturer so that they can show
good benchmark numbers in trade magazines).  And in fairness, the lie
normally causes no harm, as long as there is no power loss or hard reset
prior to the track buffer actually being written to oxide.  But if a
power loss or hard reset does occur, and if that results in content that
was written after a sync reaching oxide while content written before
the sync is still in a track buffer, then database corruption can occur.

USB flash memory sticks seem to be especially pernicious liars 
regarding sync requests.  One can easily see this by committing a large
transaction to an SQLite database on a USB memory stick.  The COMMIT
command will return relatively quickly, indicating that the memory stick
has told the operating system and the operating system has told SQLite that
all content is safely in persistent storage, and yet the LED on the end
of the memory stick will continue flashing for several more seconds. 
Pulling out the memory stick while the LED is still flashing will frequently
result in database corruption.

Note that SQLite must believe whatever the operating system and hardware
tell it about the status of sync requests.  There is no way for SQLite to
detect that either is lying and that writes might be occurring out-of-order.
However, SQLite in WAL mode is far more forgiving of
out-of-order writes than in the default rollback journal modes.  In WAL
mode, the only time that a failed sync operation can cause database corruption
is during a checkpoint operation.  A sync failure during a COMMIT might
result in loss of durability but not in a corrupt database file.  Hence,
one line of defense against database corruption due to failed sync operations
is to use SQLite in WAL mode and to checkpoint as infrequently as possible.


c2: How To Corrupt An SQLite Database File
c3: 3.2. Disabling sync using PRAGMAs
c5: howtocorrupt.html#_disabling_sync_using_pragmas
c4:
The sync operations that SQLite performs to help ensure integrity
can be disabled at run-time using the synchronous pragma.  By setting
PRAGMA synchronous=OFF, all sync operations are omitted.  This makes
SQLite seem to run faster, but it also allows the operating system to freely
reorder writes, which could result in database corruption if a power failure
or hard reset occurs prior to all content reaching persistent storage.

For maximum reliability and for robustness against database corruption,
SQLite should always be run with its default synchronous setting of FULL.


c2: How To Corrupt An SQLite Database File
c3: 4. Disk Drive and Flash Memory Failures
c5: howtocorrupt.html#_disk_drive_and_flash_memory_failures
c4:
An SQLite database can become corrupt if the file content changes 
due to a disk drive or flash memory failure.  It is very rare, but disks 
will occasionally flip a bit in the middle of a sector.


c2: How To Corrupt An SQLite Database File
c3: 4.1. Non-powersafe flash memory controllers
c5: howtocorrupt.html#_non_powersafe_flash_memory_controllers
c4:
We are told that in some flash memory controllers the wear-leveling logic
can cause random filesystem damage if power is interrupted during a write.
This can manifest, for example, as random changes in the middle of a file
that was not even open at the time of the power loss.  So, for example,
a device would be writing content into an MP3 file in flash memory when a
power loss occurs, and that could result in an SQLite database being
corrupted even though the database was not even in use at the time of the
power loss.


c2: How To Corrupt An SQLite Database File
c3: 4.2. Fake capacity USB sticks
c5: howtocorrupt.html#_fake_capacity_usb_sticks
c4:
There are many fraudulent USB sticks in circulation that report to have
a high capacity (ex: 8GB) but are really only capable of storing a much
smaller amount (ex: 1GB).   Attempts to write on these devices will
often result in unrelated files being overwritten.  Any use of a fraudulent
flash memory device can easily lead to database corruption, therefore.
Internet searches such as "fake capacity usb" will turn up lots of
disturbing information about this problem.


c2: How To Corrupt An SQLite Database File
c3: 5. Memory corruption
c5: howtocorrupt.html#_memory_corruption
c4:
SQLite is a C-library that runs in the same address space as the 
application that it serves.  That means that stray pointers, buffer
overruns, heap corruption, or other malfunctions in the application can
corrupt internal SQLite data structure and ultimately result in a
corrupt database file.  Normally these kinds of problems manifest themselves
as segfaults prior to any database corruption occurring, but there have
been instances where application code errors have caused SQLite to
malfunction subtly so as to corrupt the database file rather than
panicking.

The memory corruption problem becomes more acute when
using memory-mapped I/O.
When all or part of the database file is mapped into the application's
address space, then a stray pointer that overwrites any part of that
mapped space will immediately corrupt the database file, without
requiring the application to do a subsequent write() system call.


c2: How To Corrupt An SQLite Database File
c3: 6. Other operating system problems
c5: howtocorrupt.html#_other_operating_system_problems
c4:
Sometimes operating systems will exhibit non-standard behavior which
can lead to problems.  Sometimes this non-standard behavior is deliberate,
and sometimes it is a mistake in the implementation.  But in any event,
if the operating performs differently from they way SQLite expects it to
perform, the possibility of database corruption exists.


c2: How To Corrupt An SQLite Database File
c3: 6.1. Linux Threads
c5: howtocorrupt.html#_linux_threads
c4:
Some older versions of Linux used the LinuxThreads library for thread
support.  LinuxThreads is similar to Pthreads, but is subtly different
with respect to handling of POSIX advisory locks.  SQLite versions
2.2.3 through 3.6.23 recognized that LinuxThreads were being used at
runtime and took appropriate action to work around the non-standard
behavior of LinuxThreads.  But most modern Linux implementations make
use of the newer, and correct, NPTL implementation of Pthreads.  Beginning
with SQLite version 3.7.0 (2010-07-21), the use of NPTL is assumed.
No checks are 
made.  Hence, recent versions of SQLite will subtly malfunction and may 
corrupt database files if used in multi-threaded application that run
on older linux systems that make use of LinuxThreads.


c2: How To Corrupt An SQLite Database File
c3: 6.2. Failures of mmap() on QNX
c5: howtocorrupt.html#_failures_of_mmap_on_qnx
c4:
There exists some subtle problem with mmap() on QNX such that making
a second mmap() call against a single file descriptor can cause
the memory obtained from the first mmap() call to be zeroed.  SQLite on
unix uses mmap() to create a shared memory region for transaction 
coordination in WAL mode, and it will call mmap() multiple times
for large transactions.  The QNX mmap() has been demonstrated to corrupt
database file under that scenario.  QNX engineers are aware of this problem
and are working on a solution; the problem may have already been fixed by
the time you read this.

When running on QNX, it is recommended that memory-mapped I/O never
be used.  Furthermore, to use WAL mode, it is recommended that applications
employ the exclusive locking mode in order to 
use WAL without shared memory.


c2: How To Corrupt An SQLite Database File
c3: 6.3. Filesystem Corruption
c5: howtocorrupt.html#_filesystem_corruption
c4:
Since SQLite databases are ordinary disk files, any malfunction in the
filesystem can corrupt the database.  Filesystems in modern operating systems
are very reliable, but errors do still occur.  For example, on 2013-10-01
the SQLite database that holds the
Wiki for Tcl/Tk went corrupt a few days
after the host computer was moved to a dodgy build of the (linux) kernel
that had issues in the filesystem layer.  In that event, the filesystem
eventually became so badly corrupted that the machine was unusable, but
the earliest symptom of trouble was the corrupted SQLite database.


c2: How To Corrupt An SQLite Database File
c3: 7. SQLite Configuration Errors
c5: howtocorrupt.html#sqlite_configuration_errors
c4:
SQLite has many built-in protections against database corruption.
But many of these protections can be disabled by configuration options.
If protections are disabled, database corruption may occur.

The following are examples of disabling the built-in protection
mechanisms of SQLite:


Setting PRAGMA synchronous=OFF can cause the database to
go corrupt if there is an operating-system crash or power failure,
though this setting is safe from damage due to application crashes.

Changing the PRAGMA schema_version while other database
connections are open.

Using PRAGMA journal_mode=OFF or PRAGMA journal_mode=MEMORY
and taking an application crash in the middle of a write transaction.

Setting PRAGMA writable_schema=ON and then changing the
database schema using DML statements can render the database completely
unreadable, if not done carefully.


c2: How To Corrupt An SQLite Database File
c3: 8. Bugs in SQLite
c5: howtocorrupt.html#_bugs_in_sqlite
c4:
SQLite is very carefully tested to help ensure that it is
as bug-free as possible.  Among the many tests that are carried out for
every SQLite version are tests that simulate power failures, I/O errors,
and out-of-memory (OOM) errors and verify that no database corruption occurs
during any of these events.  SQLite is also field-proven with approximately
two billion active deployments with no serious problems.

Nevertheless, no software is 100% perfect.  There have been a few
historical bugs in SQLite (now fixed) that could cause database corruption.
And there may be yet a few more that remain undiscovered.  Because of the
extensive testing and widespread use of SQLite, bugs that result in
database corruption tend to be very obscure.  The likelihood
of an application encountering an SQLite bug is small.  To illustrate this,
an account is given below 
of all database-corruption bugs found in SQLite during the
four-year period from 2009-04-01 to 2013-04-15.
This account should give the reader an intuitive sense of the
kinds of bugs in SQLite that manage to slip through testing procedures
and make it into a release.


c2: How To Corrupt An SQLite Database File
c3: 8.1. False corruption reports due to database shrinkage
c5: howtocorrupt.html#_false_corruption_reports_due_to_database_shrinkage
c4:
If a database is written by SQLite version 3.7.0 or later and then
written again by SQLite version 3.6.23 or earlier in such a way as to
make the size of the database file decrease, then the next time that
SQLite version 3.7.0 access the database file, it might report that the
database file is corrupt.  The database file is not really corrupt, however.
Version 3.7.0 was simply being overly zealous in its corruption detection.

The problem was fixed on 2011-02-20.  The fix first appears in
SQLite version 3.7.6 (2011-04-12).


c2: How To Corrupt An SQLite Database File
c3: 8.2. Corruption following switches between rollback and WAL modes
c5: howtocorrupt.html#_corruption_following_switches_between_rollback_and_wal_modes
c4:
Repeatedly switching an SQLite database in and out of WAL mode
and running the VACUUM command in between switches, in one process or
thread, can cause another process or thread that has the database file
open to miss the fact that the database has changed.  That second process
or thread might then try to modify the database using a stale cache and
cause database corruption.

This problem was discovered during internal testing and has never been
observed in the wild.  The problem was fixed on 2011-01-27 and in version
3.7.5.


c2: How To Corrupt An SQLite Database File
c3: 8.3. I/O error while obtaining a lock leads to corruption
c5: howtocorrupt.html#_i_o_error_while_obtaining_a_lock_leads_to_corruption
c4:
If the operating system returns an I/O error while attempting to obtain
a certain lock on shared memory in WAL mode then SQLite might fail 
to reset its cache,
which could lead to database corruption if subsequent writes are attempted.

Note that this problem only occurs if the attempt to acquire the lock
resulted in an I/O error.  If the lock is simply not granted (because some
other thread or process is already holding a conflicting lock) then no
corruption will ever occur.  We are not aware of any operating systems that
will fail with an I/O error while attempting to get a file lock on shared
memory.  So this is a theoretical problem rather than a real problem.
Needless to say, this problem has never been observed in the wild.  The
problem was discovered while doing stress testing of SQLite in a test
harness that simulates I/O errors.

This problem was fixed on 2010-09-20 for SQLite version 3.7.3.


c2: How To Corrupt An SQLite Database File
c3: 8.4. Database pages leak from the free page list
c5: howtocorrupt.html#_database_pages_leak_from_the_free_page_list
c4:
When content is deleted from an SQLite database, pages that are no
longer used are added to a free list and are reused to hold content
added by subsequent inserts.  A bug in SQLite that was present in
version 3.6.16 through 3.7.2 might cause pages to go missing out of
the free list when incremental_vacuum was used.  This would not cause
data loss.  But it would result in the database file being larger than
necessary.  And it would cause the integrity_check pragma to report
pages missing from the free list.

This problem was fixed on 2010-08-23 for SQLite version 3.7.2.


c2: How To Corrupt An SQLite Database File
c3: 8.5. Corruption following alternating writes from 3.6 and 3.7
c5: howtocorrupt.html#_corruption_following_alternating_writes_from_3_6_and_3_7
c4:
SQLite version 3.7.0 introduced a number of new enhancements to
the SQLite database file format (such as but not limited to WAL).
The 3.7.0 release was a shake-out release for these new features.
We expected to find problems and were not disappointed.

If a database were originally created using SQLite version 3.7.0,
then written by SQLite version 3.6.23.1 such that the size of the database
file increased, then written again by SQLite version 3.7.0, the database
file could go corrupt.

This problem was fixed on 2010-08-04 for SQLite version 3.7.1.


c2: How To Corrupt An SQLite Database File
c3: 8.6. Race condition in recovery on Windows systems
c5: howtocorrupt.html#_race_condition_in_recovery_on_windows_systems
c4:
SQLite version 3.7.16.2 fixes a subtle race condition in the locking
logic on Windows systems.  When a database file is in need
of recovery because the previous process writing to it crashed in the
middle of a transaction and two or more processes try to open the 
that database at the same time, then the race condition might cause
one of those processes to get a false indication that the recovery 
has already completed, allowing that process to continue using the
database file without running recovery first.  If that process writes
to the file, then the file might go corrupt.  This race condition
had apparently existed in all prior versions of SQLite for Windows going
back to 2004.  But the race was very tight.  Practically speaking, you
need a fast multi-core machine in which you launch two processes to run
recovery at the same moment on two separate cores.  This defect was
on Windows systems only and did not affect the posix OS interface.


c2: How To Corrupt An SQLite Database File
c3: 8.7. Boundary value error in the secondary journals used by nested transactions
c5: howtocorrupt.html#_boundary_value_error_in_the_secondary_journals_used_by_nested_transactions
c4:
When a nested transaction is started using SAVEPOINT, SQLite uses
a secondary rollback journal to track the changes for the nested
transaction, in case the inner transaction needs to be rolled back.  Secondary
journals are not involved in protecting the database from corruption due
to program crashes or power outages.  The secondary journals only come into
play when rolling back an inner transaction of a nested transaction.

These secondary journals can be held either in memory or as temporary
files on disk.  The default behavior is to store them on disk.  But that 
can be changed using the -DSQLITE_TEMP_STORE compile-time option,
or at run-time using the PRAGMA temp_store statement.  The bug
only arises when secondary journals are held in memory.

In SQLite version 3.35.0 (2021-03-12), a new optimization was
added so that when SQLite is holding secondary journals in memory,
less memory will be used. Unfortunately, an boundary check in
the new logic was coded incorrectly.
What should have been a "&lt;" operator was coded as "&lt;=".  This
error might cause the secondary journal to enter an inconsistent state
if it is ever rolled back.  If additional changes are made and the
outer transaction eventually commits, the database might be left in
an inconsistent state.

This problem was discovered by an 
independent researcher
who was attempting to find bugs in SQLite using a fuzzer.  The fuzzer found a
failure in an assert() statement that is used
to help verify the internal state of the secondary journal.  The bug was a
sufficiently obscure corner-case that it might have gone unnoticed for many
years, had it not been for the intensive use of assert() statements in SQLite,
the persistence and tenacity of the security researchers, and their
customized state-of-the-art fuzzer.

This problem was fixed
in version 3.37.2 (2022-01-06).


c2: The Carray() Table-Valued Function
c3: 1. Overview
c5: carray.html#overview
c4:
Carray() is a table-valued function with a single column (named
"value") and zero or more rows.
The "value" of each row in the carray() is taken from a C-language array
supplied by the application via parameter binding.
In this way, the carray() function provides a convenient mechanism to
bind C-language arrays to SQL queries.


c2: The Carray() Table-Valued Function
c3: 2. Availability
c5: carray.html#availability
c4:
The carray() function is not compiled into SQLite by default.
It is available as a loadable extension in the
ext/misc/carray.c
source file.

The carray() function was first added to SQLite in version 3.14
(2016-08-08).  The sqlite3_carray_bind() interface and the
single-argument variant of carray() was added in SQLite version 3.34.0
(2020-12-01).  The ability to bind an array of struct iovec
objects that are interpreted as BLOBs was added in SQLite version 3.41.0
(2023-02-21).


c2: The Carray() Table-Valued Function
c3: 3. Details
c5: carray.html#details
c4:
The carray() function takes one, two, or three arguments.

For the two- and three-argument versions of carray(),
the first argument is a pointer to an array.  Since pointer values cannot
be specified directly in SQL, the first argument must be a parameter that
is bound to a pointer value using the sqlite3_bind_pointer() interface
using a pointer-type of "carray".
The second argument is the number of elements in the array.  The optional
third argument is a string that determines the datatype of the elements
in the C-language array.  Allowed values for the third argument are:


 'int32'
 'int64'
 'double'
 'char*'
 'struct iovec'


The default datatype is 'int32'.

The 'struct iovec' type used for BLOB data is a standard Posix data
structure, normally declared using "#include &lt;sys/uio.h&gt;".
The format is:


struct iovec {
  void  *iov_base; /* Starting address */
  size_t iov_len;  /* Number of bytes to transfer */
};


c2: The Carray() Table-Valued Function
c3: 3.1. Single-Argument CARRAY
c5: carray.html#single_argument_carray
c4:
The single-argument form of carray() requires a special C-language
interface named "sqlite3_carray_bind()" in order to attach values:


  int sqlite3_carray_bind(
    sqlite3_stmt *pStmt,         /* Statement containing the CARRAY */
    int idx,                     /* Parameter number for CARRAY argument */
    void *aData,                 /* Data array */
    int nData,                   /* Number of entries in the array */
    int mFlags,                  /* Datatype flag */
    void (*xDestroy)(void*)      /* Destructor for aData */
  );


The mFlags parameter to sqlite3_carray_bind() must be one of:


  #define CARRAY_INT32   0
  #define CARRAY_INT64   1
  #define CARRAY_DOUBLE  2
  #define CARRAY_TEXT    3
  #define CARRAY_BLOB    4


Higher order bits of the mFlags parameter must all be zero for now,
though they may be used in future enhancements.  The definitions for the
constants that specify the datatype and a prototype for the
sqlite3_carray_bind() function are both available in the auxiliary
header file
ext/misc/carray.h.

The xDestroy argument to sqlite3_carray_bind() routine is a pointer
to a function that frees the input array.  SQLite will invoke this
function after it has finished with the data.  The xDestroy argument
may optionally be one of the following constants defined in
"sqlite3.h":



     SQLITE_STATIC &rarr;  This means that the application that invokes
     sqlite3_carray_bind() maintains ownership of the data array and that
     the application promises SQLite that it will not change or deallocate
     the data until after the prepared statement is finialized.


     SQLITE_TRANSIENT &rarr;  This special value instructs SQLite to make
     its own private copy of the data before the 
     sqlite3_carray_bind() interface returns.


c2: The Carray() Table-Valued Function
c3: 4. Usage
c5: carray.html#usage
c4:
The carray() function can be used in the FROM clause of a query.
For example, to query two entries from the OBJ table using rowids
taken from a C-language array at address $PTR.

SELECT obj.* FROM obj, carray($PTR, 10) AS x
 WHERE obj.rowid=x.value;


This query gives the same result:

SELECT * FROM obj WHERE rowid IN carray($PTR, 10);

This page last modified on  2023-02-17 13:24:09 UTC


c2: SQLite Autoincrement
c3: 1. Summary
c5: autoinc.html#summary
c4:
The AUTOINCREMENT keyword imposes extra CPU, memory, disk space,
  and disk I/O overhead and should be avoided if not strictly needed.
  It is usually not needed.

  In SQLite, a column with type INTEGER PRIMARY KEY is an alias for the ROWID
  (except in WITHOUT ROWID tables) which is always a 64-bit signed integer.

  On an INSERT, if the ROWID or INTEGER PRIMARY KEY column is not 
  explicitly given a value, then it
  will be filled automatically with an unused integer, usually
  one more than the largest ROWID currently in use.
  This is true regardless of whether or not the AUTOINCREMENT keyword is used.

  If the AUTOINCREMENT keyword appears after INTEGER PRIMARY KEY, that
  changes the automatic ROWID assignment algorithm to prevent
  the reuse of ROWIDs over the lifetime of the database.  In other words,
  the purpose of AUTOINCREMENT is to prevent the reuse of ROWIDs from
  previously deleted rows.


c2: SQLite Autoincrement
c3: 2. Background
c5: autoinc.html#background
c4:
In SQLite, table rows normally have a 64-bit signed integer ROWID
which is unique among all rows in the same table.
(WITHOUT ROWID tables are the exception.)



You can access the ROWID of an SQLite table using one of the special column
names ROWID, _ROWID_, or OID.
Except if you declare an ordinary table column to use one of those special
names, then the use of that name will refer to the declared column not
to the internal ROWID.



If a table contains a column of type INTEGER PRIMARY KEY, then that
column becomes an alias for the ROWID.  You can then access the ROWID
using any of four different names, the original three names described above
or the name given to the INTEGER PRIMARY KEY column.  All these names are
aliases for one another and work equally well in any context.



When a new row is inserted into an SQLite table, the ROWID can either
be specified as part of the INSERT statement or it can be assigned
automatically by the database engine.  To specify a ROWID manually,
just include it in the list of values to be inserted.  For example:


CREATE TABLE test1(a INT, b TEXT);
INSERT INTO test1(rowid, a, b) VALUES(123, 5, 'hello');



If no ROWID is specified on the insert, or if the specified ROWID has a value
of NULL, then an appropriate ROWID is created
automatically.  The usual algorithm is to give the newly created row
a ROWID that is one larger than the largest ROWID in the table prior
to the insert.  If the table is initially empty, then a ROWID of 1 is
used.  If the largest ROWID is equal to the largest possible integer
(9223372036854775807) then the database
engine starts picking positive candidate ROWIDs at random until it finds one
that is not previously used.
If no unused ROWID can be found after a reasonable number of attempts,
the insert operation fails with an SQLITE_FULL error.
If no negative ROWID values are inserted explicitly, then automatically 
generated ROWID values will always be greater than zero.



The normal ROWID selection algorithm described above
will generate monotonically increasing
unique ROWIDs as long as you never use the maximum ROWID value and you never
delete the entry in the table with the largest ROWID. 
If you ever delete rows or if you ever create a row with the maximum possible
ROWID, then ROWIDs from previously deleted rows might be reused when creating
new rows and newly created ROWIDs might not be in strictly ascending order.


c2: SQLite Autoincrement
c3: 3. The AUTOINCREMENT Keyword
c5: autoinc.html#the_autoincrement_keyword
c4:
If a column has the type INTEGER PRIMARY KEY AUTOINCREMENT then a slightly
different ROWID selection algorithm is used.  
The ROWID chosen for the new row is at least one larger than the largest ROWID
that has ever before existed in that same table.  If the table has never
before contained any data, then a ROWID of 1 is used.  If the largest possible
ROWID has previously been inserted, then
new INSERTs are not allowed and any attempt to insert a new row will
fail with an SQLITE_FULL error.  
Only ROWID values from previous transactions that
were committed are considered.  ROWID values that were rolled back
are ignored and can be reused.



SQLite keeps track of the largest ROWID
using an internal table named "sqlite_sequence".
The sqlite_sequence table is created
and initialized automatically whenever a normal table that contains an
AUTOINCREMENT column is created.  The content of the sqlite_sequence table
can be modified using ordinary UPDATE, INSERT, and DELETE statements.
But making modifications to this table will likely perturb the AUTOINCREMENT
key generation algorithm.  Make sure you know what you are doing before
you undertake such changes.
The sqlite_sequence table does not track ROWID changes associated with
UPDATE statement, only INSERT statements.



The behavior implemented by the AUTOINCREMENT keyword is subtly different
from the default behavior.  With AUTOINCREMENT, rows with automatically
selected ROWIDs are guaranteed to have ROWIDs that have never been used
before by the same table in the same database.  And the automatically generated
ROWIDs are guaranteed to be monotonically increasing.  These are important
properties in certain applications.  But if your application does not
need these properties, you should probably stay with the default behavior
since the use of AUTOINCREMENT requires additional work to be done
as each row is inserted and thus causes INSERTs to run a little slower.


Note that "monotonically increasing" does not imply that the ROWID always
increases by exactly one.  One is the usual increment.  However, if an
insert fails due to (for example) a uniqueness constraint, the ROWID of
the failed insertion attempt might not be reused on subsequent inserts,
resulting in gaps in the ROWID sequence.  AUTOINCREMENT guarantees that
automatically chosen ROWIDs will be increasing but not that they will be
sequential.

Because AUTOINCREMENT keyword changes the behavior of the ROWID selection
algorithm, AUTOINCREMENT is not allowed on WITHOUT ROWID tables or on any
table column other than INTEGER PRIMARY KEY.  Any attempt to use 
AUTOINCREMENT on a WITHOUT ROWID table or on a column other than the
INTEGER PRIMARY KEY column results in an error.
This page last modified on  2022-01-08 05:02:57 UTC


c2: List Of Virtual Tables
c3: 1. Introduction
c5: vtablist.html#introduction
c4:
A virtual table is an object that presents an SQL table
interface but which is not stored in the database file, at least
not directly.  The virtual table mechanism is a feature
of SQLite that allows SQLite to access and manipulate resources
other than bits in the database file using the powerful SQL
query language.


The table below lists a few of the virtual tables implementations
available for SQLite.  Developers can deploy these virtual tables
in their own applications, or use the implementations shown below
as templates for writing their own virtual tables.


The list below is not exhaustive.
Other virtual table implementation exist in the SQLite source tree
and elsewhere.
The list below tries to capture the more interesting virtual table
implementations.


c2: List Of Virtual Tables
c3: 2. Virtual Tables
c5: vtablist.html#virtual_tables
c4:
NameDescription
approximate_match
A demonstration of how to use a virtual table to implement
    approximate string matching.
bytecode
A table-valued function that shows the bytecodes of a prepared
    statement.
carray
A table-valued function that allows a C-language array of integers,
    doubles, or strings to be used as table in a query.
closure
Compute the transitive closure of a set.
completion
Suggests completions for partially-entered words during interactive
    SQL input.  Used by the CLI to help implement tab-completion.
csv
A virtual table that represents a comma-separated-value or CSV file
    (RFC 4180) as a read-only
    table so that it can be used as part of a larger query.
dbstat
Provides information about the purpose and use of each page in a
    database file.  Used in the implementation of the
    sqlite3_analyzer utility program.
files_of_checkin
Provides information about all files in a single check-in in the
    Fossil version control system.  This
    virtual table is not part of the SQLite project but is included because
    it provides an example of how to use virtual tables and because it is
    used to help version control the SQLite sources.
fsdir
A table-valued function returning one row for each file in a
    selected file hierarchy of the host computer.  Used by the
    CLI to help implement the .archive command.
FTS3
A high-performance full-text search index.
FTS5
A higher-performance full-text search index
generate_series
A table-valued function returning a sequence of
    integers, modeled after the table-valued function by the same
    name in PostgreSQL.
json_each
A table-valued function for decomposing a JSON string.
json_tree
A table-valued function for decomposing a JSON string.
OsQuery
Hundreds of virtual tables that publish various aspects of the
    host computer, such as the process table, user lists, active network
    connections, and so forth.
    OsQuery is a separate project, started by Facebook, hosted on
    GitHub, and intended for
    security analysis and intrusion detection
    OsQuery is not a part of the SQLite project, but is included in this
    list because it demonstrates how the SQL language and the
    SQLite virtual table mechanism
    can be leveraged to provide elegant solutions
    to important real-world problems.
pragma
Built-in table-valued functions that return the results of PRAGMA
    statements for use within ordinary SQL queries.
RTree
An implementation of the Guttmann R*Tree spatial index idea.
spellfix1
A virtual table that implements a spelling correction engine.
sqlite_btreeinfo
This experimental table-valued function provides information about
    a single B-tree in a database file, such as the depth, and estimated
    number of pages and number of entries, and so forth.
sqlite_dbpage
Key/value store for the raw database file content.  The key is the
    page number and the value is binary page content.
sqlite_memstat
Provides SQL access to the sqlite3_status64() and
    sqlite3_db_status() interfaces.
sqlite_stmt
A table-valued function containing one row for each
    prepared statement associated with an open database connection.
swarmvtab
An experimental module providing on-demand read-only access to
    multiple tables spread across multiple databases, via a single
    virtual table abstraction.
tables_used
A table-valued function that shows the tables and indexes that
    are accessed by a prepared statement.
tclvar
Represents the global variables of a 
    TCL Interpreter as an SQL
    table. Used as part of the SQLite test suite.
templatevtab
A template virtual table implementation useful as a starting point
    for developers who want to write their own virtual tables
unionvtab
An experimental module providing on-demand read-only access to
    multiple tables spread across multiple databases, via a single
    virtual table abstraction.
vfsstat
A table-valued function which, in combination with a
    co-packaged VFS shim provides information on the number of
    system calls performed by SQLite.
vtablog
A virtual table that prints diagnostic information
    on stdout when its key methods are invoked.  Intended for
    interactive analysis and debugging of virtual table interfaces.
wholenumber
A virtual table returns all integers between 1 and 4294967295.
zipfile
Represent a
    ZIP Archive
    as an SQL table.  Works for both reading and writing.  Used by
    the CLI to implement the ability to read and write ZIP Archives.


This page last modified on  2023-05-01 21:49:55 UTC


c2: The UINT Collating Sequence
c3: 1. Overview
c5: uintcseq.html#overview
c4:
The UINT collating sequences is a loadable extension for
SQLite that implements a new collating sequence that compares text
containing unsigned integers in numeric order.

 The UINT collating sequence is not a standard part of SQLite.
It must be loaded as a separate extension.  The source code to
UINT is in the uint.c source file
in the ext/misc/ folder of the
SQLite source tree.

 The UINT collating sequence is not included in standard builds of
the SQLite library, but it is loaded by default in the CLI.  This
is typical of the CLI which loads various extensions above and beyond
what are available in the standard SQLite library.

 The UINT collating sequence works just like the default
BINARY collating sequence for text, except that embedded strings
of digits compare in numeric order.



Leading zeros are handled properly, in the sense that
they do not mess of the maginitude comparison of embedded
strings of digits.  "x00123y" is equal to "x123y".


Only unsigned integers are recognized.  Plus and minus
signs are ignored.  Decimal points and exponential notation
are ignored.


Embedded integers can be of arbitrary length.  Comparison
is not limited to integers that can be expressed as a
64-bit machine integer.


c2: The UINT Collating Sequence
c3: 2. Example:
c5: uintcseq.html#example_
c4:
COLLATE binaryCOLLATE uint

'0000123457'
'123456'
'abc0000000010xyz'
'abc0010xyy'
'abc10xzz'
'abc674xyz'
'abc87xyz'
'abc9xyz'

'123456'
'0000123457'
'abc9xyz'
'abc0010xyy'
'abc0000000010xyz'
'abc10xzz'
'abc87xyz'
'abc674xyz'


This page last modified on  2022-01-08 05:02:57 UTC


# change_content

c0: releaselog/3_44_0.html
c1: 3.44.0
c3:
 <a href="../lang_aggfunc.html">Aggregate functions</a> can now include an ORDER BY clause after their last
     parameter.  The arguments to the function are processed in the order
     specified.  This can be important for functions like
     <a href="../lang_aggfunc.html#group_concat">string_agg()</a> and <a href="../json1.html#jgrouparray">json_group_array()</a>.


c0: releaselog/3_44_0.html
c1: 3.44.0
c3:
 Add support for the <a href="../lang_corefunc.html#concat">concat()</a> and <a href="../lang_corefunc.html#concat_ws">concat_ws()</a> scalar SQL functions,
     compatible with PostgreSQL, SQLServer, and MySQL.


c0: releaselog/3_44_0.html
c1: 3.44.0
c3:
 Add support for the <a href="../lang_aggfunc.html#group_concat">string_agg()</a> aggregate SQL function, compatible
     with PostgreSQL and SQLServer.


c0: releaselog/3_44_0.html
c1: 3.44.0
c3:
 New conversion letters on the <a href="../lang_datefunc.html#strftm">strftime() SQL function</a>: %e %F %I %k %l %p %P %R %T %u


c0: releaselog/3_44_0.html
c1: 3.44.0
c3:
 Add new C-language APIs:  <a href="../c3ref/get_clientdata.html">sqlite3_get_clientdata()</a> and <a href="../c3ref/get_clientdata.html">sqlite3_set_clientdata()</a>.


c0: releaselog/3_44_0.html
c1: 3.44.0
c3:
 Many errors associated with CREATE TABLE are now raised when the CREATE TABLE statement
     itself is run, rather than being deferred until the first time the table is actually
     used.


c0: releaselog/3_44_0.html
c1: 3.44.0
c3:
 The <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a> command now verifies the consistency of the
     content in various built-in <a href="../vtab.html">virtual tables</a> using the new <a href="../vtab.html#xintegrity">xIntegrity method</a>.
     This works for the <a href="../fts3.html">FTS3</a>, <a href="../fts3.html#fts4">FTS4</a>, <a href="../fts5.html">FTS5</a>, <a href="../rtree.html">RTREE</a>, and <a href="../geopoly.html">GEOPOLY</a> extensions.


c0: releaselog/3_44_0.html
c1: 3.44.0
c3:
 The <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigdefensive">SQLITE_DBCONFIG_DEFENSIVE</a> setting now prevents <a href="../pragma.html#pragma_writable_schema">PRAGMA writable_schema</a>
     from being turned on.  Previously writable_schema could be turned on, but would
     not actually allow the schema to be writable.  Now it simply cannot be turned on.


c0: releaselog/3_44_0.html
c1: 3.44.0
c3:
 Tag the built-in <a href="../fts3.html">FTS3</a>, <a href="../fts3.html#fts4">FTS4</a>, <a href="../fts5.html">FTS5</a>, <a href="../rtree.html">RTREE</a>, and <a href="../geopoly.html">GEOPOLY</a> virtual tables as
     <a href="../c3ref/c_vtab_constraint_support.html#sqlitevtabinnocuous">SQLITE_VTAB_INNOCUOUS</a> so that they can be used inside of triggers in
     high-security deployments.


c0: releaselog/3_44_0.html
c1: 3.44.0
c3:
 The <a href="../pragma.html#pragma_case_sensitive_like">PRAGMA case_sensitive_like</a> statement is deprecated, as its use when the
     schema contains LIKE operators can lead to reports of database corruption
     by <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a>.


c0: releaselog/3_44_0.html
c1: 3.44.0
c3:
 <a href="../compile.html#use_seh">SQLITE_USE_SEH</a> (Structured Exception Handling) is now enabled by default whenever
     SQLite is built using the Microsoft C compiler.  It can be disabled using
     -DSQLITE_USE_SEH=0


c0: releaselog/3_44_0.html
c1: 3.44.0
c3:
 Query planner optimizations:
     <ol type="a">
     <li> In partial index scans, if the WHERE clause implies a constant value for a table
          column, replace occurrences of that table column with the constant. This
          increases the likelihood of the partial index being a covering index.
     </li><li> Disable the view-scan optimization (added in <a href="../releaselog/3_42_0.html">version 3.42.0</a> - item 1c) 
          as it was causing multiple performance regressions. In its place, reduce
          the estimated row count for DISTINCT subqueries by a factor of 8.
     </li></ol>


c0: releaselog/3_44_0.html
c1: 3.44.0
c3:
 SQLite now performs run-time detection of whether or not the underlying hardware
     supports "long double" with precision greater than "double" and uses appropriate
     floating-point routines depending on what it discovered.


c0: releaselog/3_44_0.html
c1: 3.44.0
c3:
 The <a href="../cli.html">CLI</a> for Windows now defaults to using UTF-8 for both input
     and output on platforms that support it.  The --no-utf8 option is available
     to disable UTF8 support.


c0: releaselog/3_44_0.html
c1: 3.44.0
c3:
SQLITE_SOURCE_ID: 2023-11-01 11:23:50 17129ba1ff7f0daf37100ee82d507aef7827cf38de1866e2633096ae6ad8130


c0: releaselog/3_43_2.html
c1: 3.43.2
c3:
 Omit the use of the sprintf() function from the standard library
     in the <a href="../cli.html">CLI</a>, as this now generates warnings on some platforms.


c0: releaselog/3_43_2.html
c1: 3.43.2
c3:
 Avoid conversion of a double into unsigned long long integer, as
     some platforms do not do such conversions correctly.


c0: releaselog/3_43_2.html
c1: 3.43.2
c3:
SQLITE_SOURCE_ID: 2023-10-10 12:14:04 4310099cce5a487035fa535dd3002c59ac7f1d1bec68d7cf317fd3e769484790


c0: releaselog/3_43_1.html
c1: 3.43.1
c3:
 Fix a regression in the way that the <a href="../lang_aggfunc.html#sumunc">sum()</a>, <a href="../lang_aggfunc.html#avg">avg()</a>, and <a href="../lang_aggfunc.html#sumunc">total()</a>
     aggregate functions handle infinities.


c0: releaselog/3_43_1.html
c1: 3.43.1
c3:
 Fix a bug in the <a href="../json1.html#jarraylen">json_array_length()</a> function that occurs when the
     argument comes directly from <a href="../json1.html#jrm">json_remove()</a>.


c0: releaselog/3_43_1.html
c1: 3.43.1
c3:
 Fix the omit-unused-subquery-columns optimization (introduced in
     in version 3.42.0) so that it works correctly if the subquery is a
     compound where one arm is DISTINCT and the other is not.


c0: releaselog/3_43_1.html
c1: 3.43.1
c3:
SQLITE_SOURCE_ID: 2023-09-11 12:01:27 2d3a40c05c49e1a49264912b1a05bc2143ac0e7c3df588276ce80a4cbc9bd1b0


c0: releaselog/3_43_0.html
c1: 3.43.0
c3:
 Add support for <a href="../fts5.html#clssdeltab">Contentless-Delete FTS5 Indexes</a>.  This is a variety
     of <a href="../fts5.html">FTS5</a> full-text search index that omits storing the content that is being indexed
     while also allowing records to be deleted.


c0: releaselog/3_43_0.html
c1: 3.43.0
c3:
 Enhancements to the <a href="../lang_datefunc.html">date and time functions</a>:
  <ol type="a">
  <li> Added new <a href="../lang_datefunc.html#tmshf">time shift modifiers</a> of the form <tt>&plusmn;YYYY-MM-DD HH:MM:SS.SSS</tt>.
  </li><li> Added the <a href="../lang_datefunc.html#tmdif">timediff() SQL function</a>.
  </li></ol>


c0: releaselog/3_43_0.html
c1: 3.43.0
c3:
 Query planner enhancements:
  <ol type="a">
  <li> Generalize the LEFT JOIN strength reduction optimization so that it works
       for RIGHT and FULL JOINs as well.  Rename it to
       <a href="../optoverview.html#leftjoinreduction">OUTER JOIN strength reduction</a>.
  </li><li> Enhance the theorem prover in the <a href="../optoverview.html#leftjoinreduction">OUTER JOIN strength reduction</a> optimization
       so that it returns fewer false-negatives.
  </li></ol>


c0: releaselog/3_43_0.html
c1: 3.43.0
c3:
 Enhancements to the <a href="../floatingpoint.html#decext">decimal extension</a>:
  <ol type="a">
  <li> New function decimal_pow2(N) returns the N-th power of 2 for integer N
       between -20000 and +20000.
  </li><li> New function decimal_exp(X) works like decimal(X) except that it returns
       the result in exponential notation - with a "e+NN" at the end.
  </li><li> If X is a floating-point value, then the decimal(X) function now does a full
       expansion of that value into its exact decimal equivalent.
  </li></ol>


c0: releaselog/3_43_0.html
c1: 3.43.0
c3:
 Performance enhancements to <a href="../json1.html">JSON processing</a> results in a 2x performance
     improvement for some kinds of processing on large JSON strings.


c0: releaselog/3_43_0.html
c1: 3.43.0
c3:
 New makefile target "verify-source" checks to ensure that there are no
     unintentional changes in the source tree.  (Works for 
     <a href="../getthecode.html">canonical source code</a> only - 
     not for <a href="../amalgamation.html#amalgtarball">precompiled amalgamation tarballs</a>.)


c0: releaselog/3_43_0.html
c1: 3.43.0
c3:
 Added the <a href="../compile.html#use_seh">SQLITE_USE_SEH</a> compile-time option that enables Structured
     Exception Handling on Windows while working with the memory-mapped
     <a href="../walformat.html#shm">shm file</a> that is part of <a href="../wal.html">WAL mode</a> processing.  This option is enabled
     by default when building on Windows using Makefile.msc.


c0: releaselog/3_43_0.html
c1: 3.43.0
c3:
 The <a href="../vfs.html">VFS</a> for unix now assumes that the nanosleep() system call is
     available unless compiled with -DHAVE_NANOSLEEP=0.


c0: releaselog/3_43_0.html
c1: 3.43.0
c3:
SQLITE_SOURCE_ID: 2023-08-24 12:36:59 0f80b798b3f4b81a7bb4233c58294edd0f1156f36b6ecf5ab8e83631d468778c


c0: releaselog/3_42_0.html
c1: 3.42.0
c3:
 Add the <a href="../fts5.html#the_secure_delete_configuration_option">FTS5 secure-delete command</a>.  This option causes all forensic traces
     to be removed from the FTS5 inverted index when content is deleted.


c0: releaselog/3_42_0.html
c1: 3.42.0
c3:
 Enhance the <a href="../json1.html">JSON SQL functions</a> to support <a href="../json1.html#json5">JSON5 extensions</a>.


c0: releaselog/3_42_0.html
c1: 3.42.0
c3:
 The <a href="../c3ref/c_config_covering_index_scan.html#sqliteconfiglog">SQLITE_CONFIG_LOG</a> and <a href="../c3ref/c_config_covering_index_scan.html#sqliteconfigpcachehdrsz">SQLITE_CONFIG_PCACHE_HDRSZ</a> calls to <a href="../c3ref/config.html">sqlite3_config()</a>
     are now allowed to occur <i>after</i> <a href="../c3ref/initialize.html">sqlite3_initialize()</a>.


c0: releaselog/3_42_0.html
c1: 3.42.0
c3:
 New <a href="../c3ref/db_config.html">sqlite3_db_config()</a> options: <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigstmtscanstatus">SQLITE_DBCONFIG_STMT_SCANSTATUS</a> and
     <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigreversescanorder">SQLITE_DBCONFIG_REVERSE_SCANORDER</a>.


c0: releaselog/3_42_0.html
c1: 3.42.0
c3:
 Query planner improvements:
     <ol type="a">
     <li> Enable the "count-of-view" optimization by default.
     </li><li> Avoid computing unused columns in subqueries.
     </li><li> Improvements to the <a href="../optoverview.html#pushdown">push-down optimization</a>.
     </li></ol>


c0: releaselog/3_42_0.html
c1: 3.42.0
c3:
 Enhancements to the <a href="../cli.html">CLI</a>:
     <ol type="a">
     <li> Add the --unsafe-testing command-line option.  Without this option, some
          dot-commands (ex: ".testctrl") are now disabled because those commands
          that are intended for testing only and can cause malfunctions if misused.
     </li><li> Allow commands ".log on" and ".log off", even in --safe mode.
     </li><li> "--" as a command-line argument means all subsequent arguments that
          start with "-" are interpreted as normal non-option argument.
     </li><li> Magic parameters ":inf" and ":nan" bind to floating point literals
          Infinity and NaN, respectively.
     </li><li> The --utf8 command-line option omits all translation to or from
          MBCS on the Windows console for interactive sessions, and sets
          the console code page for UTF-8 I/O during such sessions.
          The --utf8 option is a no-op on all other platforms.
     </li></ol>


c0: releaselog/3_42_0.html
c1: 3.42.0
c3:
 Add the ability for <a href="../appfunc.html">application-defined SQL functions</a> to have the same name
     as join keywords: CROSS, FULL, INNER, LEFT, NATURAL, OUTER, or RIGHT.


c0: releaselog/3_42_0.html
c1: 3.42.0
c3:
 Enhancements to <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a>:
     <ol type="a">
     <li> Detect and raise an error when a NaN value is stored in a NOT NULL column.
     </li><li> Improved error message output identifies the root page of a b-tree when
          an error is found within a b-tree.
     </li></ol>


c0: releaselog/3_42_0.html
c1: 3.42.0
c3:
 Allow the <a href="../sessionintro.html">session extension</a> to be configured to capture changes from
     tables that lack an explicit ROWID.


c0: releaselog/3_42_0.html
c1: 3.42.0
c3:
 Added the <a href="../lang_datefunc.html#subsec">subsecond modifier</a> to the <a href="../lang_datefunc.html">date and time functions</a>.


c0: releaselog/3_42_0.html
c1: 3.42.0
c3:
 Negative values passed into <a href="../c3ref/sleep.html">sqlite3_sleep()</a> are henceforth interpreted as 0.


c0: releaselog/3_42_0.html
c1: 3.42.0
c3:
 Extended the <a href="../printf.html">built-in printf()</a> function so the <a href="../printf.html#comma">comma option</a> now works with
     floating-point conversions in addition to integer conversions.


c0: releaselog/3_42_0.html
c1: 3.42.0
c3:
SQLITE_SOURCE_ID: 2023-05-16 12:36:15 831d0fb2836b71c9bc51067c49fee4b8f18047814f2ff22d817d25195cf350b0


c0: releaselog/3_41_2.html
c1: 3.41.2
c3:
 Multiple fixes for reads past the end of memory buffers
     (NB: <i>reads</i> not <i>writes</i>) in the following circumstances:
     <ol type="a">
     <li> When processing a corrupt database file  using the non-standard
         <a href="../compile.html#enable_stat4">SQLITE_ENABLE_STAT4</a> compile-time option.
     </li><li> In the <a href="../cli.html">CLI</a> when the <a href="../c3ref/errcode.html">sqlite3_error_offset()</a> routine returns an out-of-range value
          (see also the fix to sqlite3_error_offset() below).
     </li><li> In the <a href="../recovery.html">recovery extension</a>.
     </li><li> In <a href="../fts3.html">FTS3</a> when processing a corrupt database file.
     </li></ol>


c0: releaselog/3_41_2.html
c1: 3.41.2
c3:
 Fix the <a href="../c3ref/errcode.html">sqlite3_error_offset()</a> so that it does not return out-of-range values when
     reporting errors associated with <a href="../gencol.html">generated columns</a>.


c0: releaselog/3_41_2.html
c1: 3.41.2
c3:
 Multiple fixes in the query optimizer for problems that cause incorrect
     results for bizarre, fuzzer-generated queries.


c0: releaselog/3_41_2.html
c1: 3.41.2
c3:
 Increase the size of the reference counter in the page cache object to 64 bits to
     ensure that the counter never overflows.


c0: releaselog/3_41_2.html
c1: 3.41.2
c3:
SQLITE_SOURCE_ID: 2023-03-22 11:56:21 0d1fc92f94cb6b76bffe3ec34d69cffde2924203304e8ffc4155597af0c191da


c0: releaselog/3_41_1.html
c1: 3.41.1
c3:
 Provide compile-time options -DHAVE_LOG2=0 and -DHAVE_LOG10=0 to enable SQLite to be
     compiled on systems that omit the standard library functions log2() and log10(), repectively.


c0: releaselog/3_41_1.html
c1: 3.41.1
c3:
 Ensure that the datatype for column t1.x in 
     "<tt>CREATE TABLE t1 AS SELECT CAST(7 AS INT) AS x;</tt>" continues to be INT and is not NUM,
     for historical compatibility.


c0: releaselog/3_41_1.html
c1: 3.41.1
c3:
 Enhance <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a> to detect when extra bytes appear at the end of an
     index record.


c0: releaselog/3_41_1.html
c1: 3.41.1
c3:
 Fix various obscure bugs reported by the user community.  See the
     <a href="https://sqlite.org/src/timeline?from=version-3.41.0&to=version-3.41.1">timeline of changes</a>
     for details.
     


c0: releaselog/3_41_1.html
c1: 3.41.1
c3:
SQLITE_SOURCE_ID: 2023-03-10 12:13:52 20399f3eda5ec249d147ba9e48da6e87f969d7966a9a896764ca437ff7e737ff


c0: releaselog/3_41_0.html
c1: 3.41.0
c3:
Query planner improvements:
    <ol type="a">
    <li> Make use of <a href="../expridx.html">indexed expressions</a> within an aggregate query that
         includes a GROUP BY clause.
    </li><li> The query planner has improved awareness of when an index is
         a <a href="../queryplanner.html#covidx">covering index</a> and adjusts predicted runtimes accordingly.
    </li><li> The query planner is more aggressive about using <a href="../optoverview.html#coroutines">co-routines</a> rather
         than materializing subqueries and views.
    </li><li> Queries against the built-in table-valued functions <a href="../json1.html#jtree">json_tree()</a> and
         <a href="../json1.html#jeach">json_each()</a> will now usually treat "ORDER BY rowid" as a no-op.
    </li><li> Enhance the ability of the query planner to use <a href="../expridx.html">indexed expressions</a>
         even if the expression has been modified by the
         <a href="../optoverview.html#constprop">constant-propagation optimization</a>.
         (See <a href="https://sqlite.org/forum/forumpost/0a539c76db3b9e29">forum thread 0a539c7</a>.)
    </li></ol>


c0: releaselog/3_41_0.html
c1: 3.41.0
c3:
Add the base64 and base85 application-defined functions as an extension and
    include that extension in the <a href="../cli.html">CLI</a>.


c0: releaselog/3_41_0.html
c1: 3.41.0
c3:
Add the <a href="../c3ref/stmt_scanstatus.html">sqlite3_stmt_scanstatus_v2()</a> interface. (This interface is only
    available if SQLite is compiled using <a href="../compile.html#enable_stmt_scanstatus">SQLITE_ENABLE_STMT_SCANSTATUS</a>.)


c0: releaselog/3_41_0.html
c1: 3.41.0
c3:
In-memory databases created using <a href="../c3ref/deserialize.html">sqlite3_deserialize()</a> now report their
    filename as an empty string, not as 'x'.


c0: releaselog/3_41_0.html
c1: 3.41.0
c3:
Changes to the <a href="../cli.html">CLI</a>:
    <ol type="a">
    <li> Add the new base64() and base85() SQL functions
    </li><li> Enhanced <a href="../eqp.html">EXPLAIN QUERY PLAN</a> output using the new <a href="../c3ref/stmt_scanstatus.html">sqlite3_stmt_scanstatus_v2()</a>
         interface when compiled using <a href="../compile.html#enable_stmt_scanstatus">SQLITE_ENABLE_STMT_SCANSTATUS</a>.
    </li><li> The "<tt>.scanstats est</tt>" command provides query planner estimates in profiles.
    </li><li> The continuation prompt indicates if the input is currently inside of a
         string literal, identifier literal, comment, trigger definition, etc.
    </li><li> Enhance the --safe command-line option to disallow dangerous SQL functions.
    </li><li> The <a href="../quirks.html#dblquote">double-quoted string misfeature</a> is now disabled by default for CLI
         builds.  Legacy use cases can reenable the misfeature at run-time using
         the "<tt>.dbconfig dqs_dml on</tt>" and "<tt>.dbconfig dqs_ddl on</tt>"
         commands.
    </li></ol>


c0: releaselog/3_41_0.html
c1: 3.41.0
c3:
Enhance the <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a> command so that it detects when text strings in
    a table are equivalent to but not byte-for-byte identical to the same strings in the index.


c0: releaselog/3_41_0.html
c1: 3.41.0
c3:
Enhance the <a href="../carray.html">carray table-valued function</a> so that it is able to bind an array of
    BLOB objects.


c0: releaselog/3_41_0.html
c1: 3.41.0
c3:
Long-running calls to <a href="../c3ref/prepare.html">sqlite3_prepare()</a> and similar now invoke the
    <a href="../c3ref/progress_handler.html">progress handler callback</a> and react to <a href="../c3ref/interrupt.html">sqlite3_interrupt()</a>.


c0: releaselog/3_41_0.html
c1: 3.41.0
c3:
The <a href="../c3ref/vtab_in_first.html">sqlite3_vtab_in_first()</a> and <a href="../c3ref/vtab_in_first.html">sqlite3_vtab_in_next()</a> functions are enhanced so that
    they reliably detect if they are invoked on a parameter that was not selected for
    multi-value IN processing using <a href="../c3ref/vtab_in.html">sqlite3_vtab_in()</a>.
    They return SQLITE_ERROR instead of SQLITE_MISUSE in this case.


c0: releaselog/3_41_0.html
c1: 3.41.0
c3:
The parser now ignores excess parentheses around a subquery on the right-hand side
    of an IN operator, so that SQLite now works the same as PostgreSQL in this regard.
    Formerly, SQLite treated the subquery as an expression with an implied "LIMIT 1".


c0: releaselog/3_41_0.html
c1: 3.41.0
c3:
Added the <a href="../c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlresetcache">SQLITE_FCNTL_RESET_CACHE</a> option to the <a href="../c3ref/file_control.html">sqlite3_file_control()</a> API.


c0: releaselog/3_41_0.html
c1: 3.41.0
c3:
Makefile improvements:
    <ol type="a">
    <li>The new makefile target "sqlite3r.c" builds an <a href="../amalgamation.html">amalgamation</a> that includes
        the <a href="../recovery.html">recovery extension</a>.
    </li><li>New makefile targets "devtest" and "releasetest" for running a
        quick developmental test prior to doing a check-in and for doing a full
        release test, respectively.
    </li></ol>


c0: releaselog/3_41_0.html
c1: 3.41.0
c3:
SQLITE_SOURCE_ID: 2023-02-21 18:09:37 05941c2a04037fc3ed2ffae11f5d2260706f89431f463518740f72ada350866d


c0: releaselog/3_40_1.html
c1: 3.40.1
c3:
 Fix the <a href="../cli.html#safemode">--safe command-line option</a> to the <a href="../cli.html">CLI</a>
     such that it correctly disallows the
     use of SQL functions like writefile() that can cause harmful side-effects.


c0: releaselog/3_40_1.html
c1: 3.40.1
c3:
 Fix a potential infinite loop in the <a href="../malloc.html#memsys5">memsys5</a> alternative memory allocator.  This
     bug was introduced by a performance optimization in version 3.39.0.


c0: releaselog/3_40_1.html
c1: 3.40.1
c3:
SQLITE_SOURCE_ID: 2022-12-28 14:03:47 df5c253c0b3dd24916e4ec7cf77d3db5294cc9fd45ae7b9c5e82ad8197f38a24


c0: releaselog/3_40_0.html
c1: 3.40.0
c3:
 Add support for compiling <a href="https://sqlite.org/wasm">SQLite to WASM</a>
     and running it in web browsers.  NB:  The WASM build and its interfaces
     are considered "beta" and are subject to minor changes if the need
     arises.  We anticipate finalizing the interface for the next release.


c0: releaselog/3_40_0.html
c1: 3.40.0
c3:
 Add the <a href="../recovery.html">recovery extension</a> that might be able to recover some content
     from a corrupt database file.


c0: releaselog/3_40_0.html
c1: 3.40.0
c3:
 Query planner enhancements:
     <ol type="a">
     <li> Recognize <a href="../queryplanner.html#covidx">covering indexes</a> on tables with more than 63 columns where
          columns beyond the 63rd column are used in the query and/or are
          referenced by the index.
     </li><li> Extract the values of expressions contained within <a href="../expridx.html">expression indexes</a>
          where practical, rather than recomputing the expression.
     </li><li> The NOT NULL and IS NULL operators (and their equivalents) avoid
          loading the content of large strings and BLOB values from disk.
     </li><li> Avoid materializing a view on which a full scan is performed
          exactly once.  Use and discard the rows of the view as they are computed.
     </li><li> Allow flattening of a subquery that is the right-hand operand of
          a LEFT JOIN in an aggregate query.
     </li></ol>


c0: releaselog/3_40_0.html
c1: 3.40.0
c3:
 A new typedef named <a href="../c3ref/filename.html">sqlite3_filename</a> is added and used to represent
     the name of a database file.  Various interfaces are
     modified to use the new typedef instead of "char*".  This interface
     change should be fully backwards compatible, though it might cause
     (harmless) compiler warnings when rebuilding some legacy applications.


c0: releaselog/3_40_0.html
c1: 3.40.0
c3:
 Security enhancement: <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigdefensive">SQLITE_DBCONFIG_DEFENSIVE</a> is augmented to prohibit
     changing the <a href="../pragma.html#pragma_schema_version">schema_version</a>.  The schema_version
     becomes read-only in defensive mode.


c0: releaselog/3_40_0.html
c1: 3.40.0
c3:
 Enhancements to the <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a> statement:
     <ol type="a">
     <li> Columns in non-STRICT tables with TEXT affinity should not contain numeric values.
     </li><li> Columns in non-STRICT tables with NUMERIC affinity should not
          contain TEXT values that could be converted into numbers.
     </li><li> Verify that the rows of a <a href="../withoutrowid.html">WITHOUT ROWID</a> table are in the correct order.
     </li></ol>


c0: releaselog/3_40_0.html
c1: 3.40.0
c3:
 Enhance the <a href="../lang_vacuum.html#vacuuminto">VACUUM INTO</a> statement so that it honors the
     <a href="../pragma.html#pragma_synchronous">PRAGMA synchronous</a> setting.


c0: releaselog/3_40_0.html
c1: 3.40.0
c3:
 Enhance the <a href="../c3ref/strglob.html">sqlite3_strglob()</a> and <a href="../c3ref/strlike.html">sqlite3_strlike()</a> APIs so that they are able
     to accept NULL pointers for their string parameters and still generate a sensible
     result.


c0: releaselog/3_40_0.html
c1: 3.40.0
c3:
 Provide the new <a href="../compile.html#max_allocation_size">SQLITE_MAX_ALLOCATION_SIZE</a> compile-time option for limiting
     the size of memory allocations.


c0: releaselog/3_40_0.html
c1: 3.40.0
c3:
 Change the algorithm used by SQLite's built-in pseudo-random number generator (PRNG)
     from RC4 to Chacha20.


c0: releaselog/3_40_0.html
c1: 3.40.0
c3:
 Miscellaneous performance optimizations result in about 1% fewer CPU cycles
     used on typical workloads.


c0: releaselog/3_40_0.html
c1: 3.40.0
c3:
SQLITE_SOURCE_ID: 2022-11-16 12:10:08 89c459e766ea7e9165d0beeb124708b955a4950d0f4792f457465d71b158d318


c0: releaselog/3_39_4.html
c1: 3.39.4
c3:
 Fix a long-standing problem in the btree balancer that might, in rare cases,
     cause database corruption if the application uses an
     <a href="../c3ref/pcache_methods2.html">application-defined page cache</a>.


c0: releaselog/3_39_4.html
c1: 3.39.4
c3:
 Enhance <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigdefensive">SQLITE_DBCONFIG_DEFENSIVE</a> so that it disallows <a href="../lang_createtrigger.html">CREATE TRIGGER</a>
     statements if one or more of the statements in the body of the trigger write
     into <a href="../vtab.html#xshadowname">shadow tables</a>.


c0: releaselog/3_39_4.html
c1: 3.39.4
c3:
 Fix a misuse of the <a href="../c3ref/get_auxdata.html">sqlite3_set_auxdata()</a> interface in the
     <a href="https://sqlite.org/src/dir/ext/icu">ICU Extension</a>.


c0: releaselog/3_39_4.html
c1: 3.39.4
c3:
SQLITE_SOURCE_ID: 2022-09-29 15:55:41 a29f9949895322123f7c38fbe94c649a9d6e6c9cd0c3b41c96d694552f26b309


c0: releaselog/3_39_3.html
c1: 3.39.3
c3:
 Use a statement journal on DML statement affecting two or more database
     rows if the statement makes use of a SQL functions that might abort.  See
     <a href="https://sqlite.org/forum/forumpost/9b9e4716c0d7bbd1">forum thread 9b9e4716c0d7bbd1</a>.


c0: releaselog/3_39_3.html
c1: 3.39.3
c3:
 Use a mutex to protect the <a href="../pragma.html#pragma_temp_store_directory">PRAGMA temp_store_directory</a> and
     <a href="../pragma.html#pragma_data_store_directory">PRAGMA data_store_directory</a> statements, even though they are deprecated and
     documented as not being threadsafe. See
     <a href="https://sqlite.org/forum/forumpost/719a11e1314d1c70">forum post 719a11e1314d1c70</a>.


c0: releaselog/3_39_3.html
c1: 3.39.3
c3:
 Other bug and warning fixes.  See the
     <a href="https://sqlite.org/src/timeline?p=version-3.39.3&bt=version-3.39.2">timeline</a>
     for details.


c0: releaselog/3_39_3.html
c1: 3.39.3
c3:
SQLITE_SOURCE_ID: 2022-09-05 11:02:23 4635f4a69c8c2a8df242b384a992aea71224e39a2ccab42d8c0b0602f1e826e8


c0: releaselog/3_39_2.html
c1: 3.39.2
c3:
 Fix a performance regression in the query planner associated with rearranging
     the order of FROM clause terms in the presences of a LEFT JOIN.


c0: releaselog/3_39_2.html
c1: 3.39.2
c3:
 Apply fixes for CVE-2022-35737,  Chromium bugs 1343348 and 1345947,
     <a href="https://sqlite.org/forum/forumpost/3607259d3c">forum post 3607259d3c</a>, and
     other minor problems discovered by internal testing.


c0: releaselog/3_39_2.html
c1: 3.39.2
c3:
SQLITE_SOURCE_ID: 2022-07-21 15:24:47 698edb77537b67c41adc68f9b892db56bcf9a55e00371a61420f3ddd668e6603


c0: releaselog/3_39_1.html
c1: 3.39.1
c3:
 Fix an incorrect result from a query that uses a view that contains a compound
     SELECT in which only one arm contains a RIGHT JOIN and where the view is not
     the first FROM clause term of the query that contains the view.
     <a href="https://sqlite.org/forum/forumpost/174afeae5734d42d">forum post 174afeae5734d42d</a>.


c0: releaselog/3_39_1.html
c1: 3.39.1
c3:
 Fix a long-standing problem with <a href="../lang_altertable.html#altertabrename">ALTER TABLE RENAME</a> that can only arise
     if the <a href="../c3ref/limit.html">sqlite3_limit</a>(<a href="../c3ref/c_limit_attached.html#sqlitelimitsqllength">SQLITE_LIMIT_SQL_LENGTH</a>) is set to a very small value.


c0: releaselog/3_39_1.html
c1: 3.39.1
c3:
 Fix a long-standing problem in <a href="../fts3.html">FTS3</a> that can only arise when compiled with
     the <a href="../compile.html#enable_fts3_parenthesis">SQLITE_ENABLE_FTS3_PARENTHESIS</a> compile-time option.


c0: releaselog/3_39_1.html
c1: 3.39.1
c3:
 Fix the build so that is works when the <a href="../compile.html#debug">SQLITE_DEBUG</a> and
     <a href="../compile.html#omit_windowfunc">SQLITE_OMIT_WINDOWFUNC</a> compile-time options are both provided at the
     same time.


c0: releaselog/3_39_1.html
c1: 3.39.1
c3:
 Fix the initial-prefix optimization for the <a href="../lang_expr.html#regexp">REGEXP</a> extension so that it works
     correctly even if the prefix contains characters that require a 3-byte UTF8
     encoding.


c0: releaselog/3_39_1.html
c1: 3.39.1
c3:
 Enhance the <a href="../stmt.html">sqlite_stmt</a> virtual table so that it buffers all of its output.


c0: releaselog/3_39_1.html
c1: 3.39.1
c3:
SQLITE_SOURCE_ID: 2022-07-13 19:41:41 7c16541a0efb3985578181171c9f2bb3fdc4bad6a2ec85c6e31ab96f3eff201f


c0: releaselog/3_39_0.html
c1: 3.39.0
c3:
 Add new binary comparison operators <a href="../lang_expr.html#isdf">IS NOT DISTINCT FROM</a> and <a href="../lang_expr.html#isdf">IS DISTINCT FROM</a>
     that are equivalent to IS and IS NOT, respective, for compatibility with
     PostgreSQL and SQL standards.


c0: releaselog/3_39_0.html
c1: 3.39.0
c3:
 Add a new return code (value "3") from the <a href="../c3ref/vtab_distinct.html">sqlite3_vtab_distinct()</a>
     interface that indicates a query that has both DISTINCT and ORDER BY
     clauses.


c0: releaselog/3_39_0.html
c1: 3.39.0
c3:
 The unix os interface resolves all symbolic links in database
     filenames to create a canonical name for the database before the
     file is opened.
     If the <a href="../c3ref/c_open_autoproxy.html">SQLITE_OPEN_NOFOLLOW</a> flag is used with <a href="../c3ref/open.html">sqlite3_open_v2()</a>
     or similar, the open will fail if any element of the path is a
     symbolic link.


c0: releaselog/3_39_0.html
c1: 3.39.0
c3:
 Defer materializing views until the materialization
     is actually needed, thus avoiding unnecessary work if the materialization turns
     out to never be used.


c0: releaselog/3_39_0.html
c1: 3.39.0
c3:
 The <a href="../lang_select.html#resultset">HAVING clause</a> of a <a href="../lang_select.html">SELECT statement</a> is now allowed on any aggregate query,
     even queries that do not have a <a href="../lang_select.html#resultset">GROUP BY clause</a>.


c0: releaselog/3_39_0.html
c1: 3.39.0
c3:
 Many <a href="../cpu.html#microopt">microoptimizations</a> collectively reduce CPU cycles by about 2.3%.


c0: releaselog/3_39_0.html
c1: 3.39.0
c3:
SQLITE_SOURCE_ID: 2022-06-25 14:57:57 14e166f40dbfa6e055543f8301525f2ca2e96a02a57269818b9e69e162e98918


c0: releaselog/3_38_5.html
c1: 3.38.5
c3:
 Fix <a href="../news.html#2022_05_06">a blunder</a> in the <a href="../cli.html">CLI</a> of the 3.38.4 release.


c0: releaselog/3_38_5.html
c1: 3.38.5
c3:
SQLITE_SOURCE_ID: 2022-05-06 15:25:27 78d9c993d404cdfaa7fdd2973fa1052e3da9f66215cff9c5540ebe55c407d9fe


c0: releaselog/3_38_4.html
c1: 3.38.4
c3:
 Fix a byte-code problem in the Bloom filter pull-down optimization added by release
     3.38.0 in which an error in the byte code causes the byte code engine to enter an
     infinite loop when the pull-down optimization encounters a NULL key.
     <a href="https://sqlite.org/forum/forumpost/2482b32700384a0f">Forum thread 2482b32700384a0f</a>.


c0: releaselog/3_38_4.html
c1: 3.38.4
c3:
 Other minor patches.  See the
     <a href="https://sqlite.org/src/timeline?p=branch-3.38&bt=version-3.38.3">timeline</a> for
     details.


c0: releaselog/3_38_4.html
c1: 3.38.4
c3:
SQLITE_SOURCE_ID: 2022-05-04 15:45:55 d402f49871152670a62f4f28cacb15d814f2c1644e9347ad7d258e562978e45e


c0: releaselog/3_38_3.html
c1: 3.38.3
c3:
 Fix a case of the query planner be overly aggressive with optimizing automatic-index
     and Bloom-filter construction, using inappropriate ON clause terms to restrict the
     size of the automatic-index or Bloom filter, and resulting in missing rows in the
     output.
     <a href="https://sqlite.org/forum/forumpost/0d3200f4f3bcd3a3">Forum thread 0d3200f4f3bcd3a3</a>.


c0: releaselog/3_38_3.html
c1: 3.38.3
c3:
 Other minor patches.  See the
     <a href="https://sqlite.org/src/timeline?p=version-3.38.3&bt=version-3.38.2">timeline</a> for
     details.


c0: releaselog/3_38_3.html
c1: 3.38.3
c3:
SQLITE_SOURCE_ID: 2022-04-27 12:03:15 9547e2c38a1c6f751a77d4d796894dec4dc5d8f5d79b1cd39e1ffc50df7b3be4


c0: releaselog/3_38_2.html
c1: 3.38.2
c3:
 Fix a user-discovered problem with the new Bloom filter optimization
     that might cause an incorrect answer when doing a LEFT JOIN with a WHERE
     clause constraint that says that one of the columns on the right table of
     the LEFT JOIN is NULL. See
     <a href="https://sqlite.org/forum/forumpost/031e262a89b6a9d2">forum thread 031e262a89b6a9d2</a>.


c0: releaselog/3_38_2.html
c1: 3.38.2
c3:
 Other minor patches.  See the
     <a href="https://sqlite.org/src/timeline?p=version-3.38.2&bt=version-3.38.1">timeline</a> for
     details.


c0: releaselog/3_38_2.html
c1: 3.38.2
c3:
SQLITE_SOURCE_ID: 2022-03-26 13:51:10 d33c709cc0af66bc5b6dc6216eba9f1f0b40960b9ae83694c986fbf4c1d6f08f


c0: releaselog/3_38_1.html
c1: 3.38.1
c3:
 Fix problems with the new Bloom filter optimization that might cause
     some obscure queries to get an incorrect answer.


c0: releaselog/3_38_1.html
c1: 3.38.1
c3:
 Fix the <a href="../lang_datefunc.html#localtime">localtime modifier</a> of the <a href="../lang_datefunc.html">date and time functions</a> so that
     it preserves fractional seconds.


c0: releaselog/3_38_1.html
c1: 3.38.1
c3:
 Fix the <a href="../lang_corefunc.html#sqlite_offset">sqlite_offset SQL function</a> so that it works correctly even
     in corner cases such as when the argument is a virtual column or the
     column of a view.


c0: releaselog/3_38_1.html
c1: 3.38.1
c3:
 Fix <a href="../rowvalue.html#rvinop">row value IN operator</a> constraints on <a href="../vtab.html">virtual tables</a> so that they
     work correctly even if the virtual table implementation relies on bytecode
     to filter rows that do not satisfy the constraint.


c0: releaselog/3_38_1.html
c1: 3.38.1
c3:
 Other minor fixes to assert() statements, test cases, and documentation.
     See the <a href="https://sqlite.org/src/timeline?p=version-3.38.1&bt=version-3.38.0">source code timeline</a>
     for details.


c0: releaselog/3_38_1.html
c1: 3.38.1
c3:
SQLITE_SOURCE_ID: 2022-03-12 13:37:29 38c210fdd258658321c85ec9c01a072fda3ada94540e3239d29b34dc547a8cbc


c0: releaselog/3_38_0.html
c1: 3.38.0
c3:
 Added <a href="../json1.html#jptr">the -> and ->> operators</a> for easier processing of JSON.
     The new operators are compatible with MySQL and PostgreSQL.


c0: releaselog/3_38_0.html
c1: 3.38.0
c3:
 The JSON functions are now built-ins.  It is no longer necessary
     to use the <a href="../compile.html#enable_json1">-DSQLITE_ENABLE_JSON1</a> compile-time option to enable JSON
     support.  JSON is on by default.  Disable the JSON interface using
     the new <a href="../compile.html#omit_json">-DSQLITE_OMIT_JSON</a> compile-time option.


c0: releaselog/3_38_0.html
c1: 3.38.0
c3:
 Enhancements to <a href="../lang_datefunc.html">date and time functions</a>:
     <ol type="a">
     <li> Added the <a href="../lang_datefunc.html#uepch">unixepoch() function</a>.
     </li><li> Added the <a href="../lang_datefunc.html#automod">auto modifier</a> and the <a href="../lang_datefunc.html#jdmod">julianday modifier</a>.
     </li></ol>


c0: releaselog/3_38_0.html
c1: 3.38.0
c3:
 Rename the <a href="../lang_corefunc.html#printf">printf() SQL function</a> to <a href="../lang_corefunc.html#format">format()</a> for better
     compatibility.  The original printf() name is retained as an alias
     for backwards compatibility.


c0: releaselog/3_38_0.html
c1: 3.38.0
c3:
 Added the <a href="../c3ref/errcode.html">sqlite3_error_offset()</a> interface, which can sometimes
     help to localize an SQL error to a specific character in the input
     SQL text, so that applications can provide better error messages.


c0: releaselog/3_38_0.html
c1: 3.38.0
c3:
 Enhanced the interface to <a href="../vtab.html">virtual tables</a> as follows:
     <ol type="a">
     <li> Added the <a href="../c3ref/vtab_distinct.html">sqlite3_vtab_distinct()</a> interface.
     </li><li> Added the <a href="../c3ref/vtab_rhs_value.html">sqlite3_vtab_rhs_value()</a> interface.
     </li><li> Added new operator types <a href="../c3ref/c_index_constraint_eq.html">SQLITE_INDEX_CONSTRAINT_LIMIT</a>
          and <a href="../c3ref/c_index_constraint_eq.html">SQLITE_INDEX_CONSTRAINT_OFFSET</a>.
     </li><li> Added the <a href="../c3ref/vtab_in.html">sqlite3_vtab_in()</a> interface (and related) to enable
          a virtual table to process <a href="../lang_expr.html#in_op">IN operator</a> constraints all at once,
          rather than processing each value of the right-hand side of the
          IN operator separately.
     </li></ol>


c0: releaselog/3_38_0.html
c1: 3.38.0
c3:
 <a href="../cli.html">CLI</a> enhancements:
     <ol type="a">
     <li> <a href="../cli.html#clmnr">Columnar output modes</a> are enhanced to correctly handle tabs
          and newlines embedded in text.
     </li><li> Added options like "--wrap N", "--wordwrap on", and "--quote"
          to the <a href="../cli.html#clmnr">columnar output modes</a>.
     </li><li> Added the <a href="../cli.html#qbox">.mode qbox</a> alias.
     </li><li> The <a href="../cli.html#csv">.import command</a> automatically disambiguates column names.
     </li><li> Use the new <a href="../c3ref/errcode.html">sqlite3_error_offset()</a> interface to provide better
          error messages.
     </li></ol>


c0: releaselog/3_38_0.html
c1: 3.38.0
c3:
 Query planner enhancements:
     <ol type="a">
     <li> Use a Bloom filter to speed up large analytic queries.
     </li><li> Use a balanced merge tree to evaluate UNION or UNION ALL
          compound SELECT statements that have an ORDER BY clause.
     </li></ol>


c0: releaselog/3_38_0.html
c1: 3.38.0
c3:
 The <a href="../lang_altertable.html">ALTER TABLE</a> statement is changed to silently ignores entries in the
     <a href="../schematab.html">sqlite_schema table</a> that do not parse when <a href="../pragma.html#pragma_writable_schema">PRAGMA writable_schema=ON</a>.


c0: releaselog/3_38_0.html
c1: 3.38.0
c3:
SQLITE_SOURCE_ID: 2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab


c0: releaselog/3_37_2.html
c1: 3.37.2
c3:
 Fix <a href="https://sqlite.org/forum/forumpost/b03d86f9516cb3a2">a bug</a> introduced
     in <a href="../releaselog/3_35_0.html">version 3.35.0</a> (2021-03-12) that
     <a href="../howtocorrupt.html#svptbug">can cause database corruption</a>
     if a <a href="../lang_savepoint.html">SAVEPOINT</a> is rolled back while in <a href="../pragma.html#pragma_temp_store">PRAGMA temp_store=MEMORY</a> mode,
     and other changes are made, and then the outer transaction commits.
     <a href="https://sqlite.org/src/info/73c2b50211d3ae26">Check-in 73c2b50211d3ae26</a>


c0: releaselog/3_37_2.html
c1: 3.37.2
c3:
 Fix a long-standing problem with ON DELETE CASCADE and ON UPDATE CASCADE
     in which a cache of the <a href="../opcode.html">bytecode</a> used to implement the cascading change
     was not being reset following a local DDL change.
     <a href="https://sqlite.org/src/info/5232c9777fe4fb13">Check-in 5232c9777fe4fb13</a>.


c0: releaselog/3_37_2.html
c1: 3.37.2
c3:
SQLITE_SOURCE_ID: 2022-01-06 13:25:41 872ba256cbf61d9290b571c0e6d82a20c224ca3ad82971edc46b29818d5d17a0


c0: releaselog/3_37_1.html
c1: 3.37.1
c3:
 Fix a bug introduced by the <a href="../lang_upsert.html">UPSERT</a> enhancements of <a href="../releaselog/3_35_0.html">version 3.35.0</a> that
     can cause incorrect byte-code to be generated for some obscure but valid
     SQL, possibly resulting in a NULL-pointer dereference.


c0: releaselog/3_37_1.html
c1: 3.37.1
c3:
 Fix an OOB read that can occur in <a href="../fts5.html">FTS5</a> when reading corrupt database files.


c0: releaselog/3_37_1.html
c1: 3.37.1
c3:
SQLITE_SOURCE_ID: 2021-12-30 15:30:28 378629bf2ea546f73eee84063c5358439a12f7300e433f18c9e1bddd948dea62


c0: releaselog/3_37_0.html
c1: 3.37.0
c3:
 <a href="../stricttables.html">STRICT tables</a> provide a prescriptive style of data type management,
     for developers who prefer that kind of thing.


c0: releaselog/3_37_0.html
c1: 3.37.0
c3:
 When adding columns that contain a
     <a href="../lang_createtable.html#ckconst">CHECK constraint</a> or a <a href="../gencol.html">generated column</a> containing a <a href="../lang_createtable.html#notnullconst">NOT NULL constraint</a>,
     the <a href="../lang_altertable.html#altertabaddcol">ALTER TABLE ADD COLUMN</a> now checks new constraints against
     preexisting rows in the database and will only proceed if no constraints
     are violated.


c0: releaselog/3_37_0.html
c1: 3.37.0
c3:
 <a href="../cli.html">CLI</a> enhancements:
     <ol type="a">
     <li> Add the <a href="../cli.html#dotconn">.connection</a> command, allowing the CLI to keep multiple database
          connections open at the same time.
     </li><li> Add the <a href="../cli.html#safemode">--safe command-line option</a> that disables
          <a href="../cli.html#dotcmd">dot-commands</a> and SQL statements that might cause side-effects that extend
          beyond the single database file named on the command-line.
     </li><li> Performance improvements when reading SQL statements
          that span many lines.
     </li></ol>


c0: releaselog/3_37_0.html
c1: 3.37.0
c3:
 The <a href="../c3ref/deserialize.html">sqlite3_deserialize()</a> does not and has never worked for the TEMP
     database.  That limitation is now noted in the documentation.


c0: releaselog/3_37_0.html
c1: 3.37.0
c3:
 The query planner now omits ORDER BY clauses on subqueries and views
     if removing those clauses does not change the semantics of the query.


c0: releaselog/3_37_0.html
c1: 3.37.0
c3:
 The <a href="../series.html">generate_series</a> table-valued function extension is modified so that
     the first parameter ("START") is now required.  This is done as a way to
     demonstrate how to write table-valued functions with required parameters.
     The legacy behavior is available using the -DZERO_ARGUMENT_GENERATE_SERIES
     compile-time option.


c0: releaselog/3_37_0.html
c1: 3.37.0
c3:
 Added new <a href="../c3ref/changes.html">sqlite3_changes64()</a> and <a href="../c3ref/total_changes.html">sqlite3_total_changes64()</a> interfaces.


c0: releaselog/3_37_0.html
c1: 3.37.0
c3:
 Added the <a href="../c3ref/c_open_autoproxy.html">SQLITE_OPEN_EXRESCODE</a> flag option to <a href="../c3ref/open.html">sqlite3_open_v2()</a>.


c0: releaselog/3_37_0.html
c1: 3.37.0
c3:
SQLITE_SOURCE_ID: 2021-11-27 14:13:22 bd41822c7424d393a30e92ff6cb254d25c26769889c1499a18a0b9339f5d6c8a


c0: releaselog/3_36_0.html
c1: 3.36.0
c3:
 Improvement to the <a href="../eqp.html">EXPLAIN QUERY PLAN</a> output to make it easier to
     understand.


c0: releaselog/3_36_0.html
c1: 3.36.0
c3:
 An error is raised on any attempt to access the <a href="../lang_createtable.html#rowid">rowid</a> of a VIEW or subquery.
     Formerly, the rowid of a VIEW would be indeterminate and often would be NULL.
     The -DSQLITE_ALLOW_ROWID_IN_VIEW compile-time option is available to restore
     the legacy behavior for applications that need it.


c0: releaselog/3_36_0.html
c1: 3.36.0
c3:
 The <a href="../c3ref/deserialize.html">sqlite3_deserialize()</a> and <a href="../c3ref/serialize.html">sqlite3_serialize()</a> interfaces are now
     enabled by default.  The -DSQLITE_ENABLE_DESERIALIZE compile-time option is
     no longer required.  Instead, there is a new <a href="../compile.html#omit_deserialize">-DSQLITE_OMIT_DESERIALIZE</a>
     compile-time option to omit those interfaces.


c0: releaselog/3_36_0.html
c1: 3.36.0
c3:
 The "memdb" VFS now allows the same in-memory database to be shared among
     multiple database connections in the same process as long as the
     database name begins with "/".


c0: releaselog/3_36_0.html
c1: 3.36.0
c3:
 Back out the EXISTS-to-IN optimization (item 8b in the
     <a href="../releaselog/3_35_0.html">SQLite 3.35.0 change log</a>)
     as it was found to slow down queries more often than speed them up.


c0: releaselog/3_36_0.html
c1: 3.36.0
c3:
 Improve the <a href="../optoverview.html#constprop">constant-propagation optimization</a> so that it works on
     non-join queries.


c0: releaselog/3_36_0.html
c1: 3.36.0
c3:
 The <a href="https://sqlite.org/src/file/ext/misc/regexp.c">REGEXP extension</a> is
     now included in <a href="../cli.html">CLI</a> builds.


c0: releaselog/3_36_0.html
c1: 3.36.0
c3:
SQLITE_SOURCE_ID: 2021-06-18 18:36:39 5c9a6c06871cb9fe42814af9c039eb6da5427a6ec28f187af7ebfb62eafa66e5


c0: releaselog/3_35_5.html
c1: 3.35.5
c3:
SQLITE_SOURCE_ID: 2021-04-19 18:32:05 1b256d97b553a9611efca188a3d995a2fff712759044ba480f9a0c9e98fae886


c0: releaselog/3_35_4.html
c1: 3.35.4
c3:
 Fix a defect in the query planner optimization identified by
     item 8b above.  Ticket
     <a href="https://sqlite.org/src/info/de7db14784a08053">de7db14784a08053</a>.


c0: releaselog/3_35_4.html
c1: 3.35.4
c3:
 Fix a defect in the new <a href="../lang_returning.html">RETURNING</a> syntax.  Ticket
     <a href="https://sqlite.org/src/info/132994c8b1063bfb">132994c8b1063bfb</a>.


c0: releaselog/3_35_4.html
c1: 3.35.4
c3:
 Fix the new <a href="../lang_returning.html">RETURNING</a> feature so that it raises an error if one of
     the terms in the RETURNING clause references a unknown table, instead
     of silently ignoring that error.


c0: releaselog/3_35_4.html
c1: 3.35.4
c3:
 Fix an assertion associated with aggregate function processing that
     was incorrectly triggered by the <a href="../optoverview.html#pushdown">push-down optimization</a>.


c0: releaselog/3_35_4.html
c1: 3.35.4
c3:
SQLITE_SOURCE_ID: 2021-04-02 15:20:15 5d4c65779dab868b285519b19e4cf9d451d50c6048f06f653aa701ec212df45e


c0: releaselog/3_35_3.html
c1: 3.35.3
c3:
 Enhance the OP_OpenDup opcode of the <a href="../opcode.html">bytecode engine</a> so that it works even if the
     cursor being duplicated itself came from OP_OpenDup.  Fix for
     <a href="https://www.sqlite.org/src/info/bb8a9fd4a9b7fce5">ticket bb8a9fd4a9b7fce5</a>.
     This problem only came to light due to the recent MATERIALIZED hint enhancement.


c0: releaselog/3_35_3.html
c1: 3.35.3
c3:
 When materializing correlated <a href="../lang_with.html">common table expressions</a>, do so separately for each
     use case, as that is required for correctness.  This fixes a problem that was
     introduced by the MATERIALIZED hint enhancement.


c0: releaselog/3_35_3.html
c1: 3.35.3
c3:
 Fix the <a href="../cli.html#dotmode">"box" output mode</a> in the <a href="../cli.html">CLI</a> so that it works with statements that
     returns one or more rows of zero columns (such as <a href="../pragma.html#pragma_incremental_vacuum">PRAGMA incremental_vacuum</a>).
     <a href="https://sqlite.org/forum/forumpost/afbbcb5b72">Forum post afbbcb5b72</a>.


c0: releaselog/3_35_3.html
c1: 3.35.3
c3:
 Improvements to error messages generated by faulty common table expressions.
     <a href="https://sqlite.org/forum/forumpost/aa5a0431c99e631">Forum post aa5a0431c99e</a>.


c0: releaselog/3_35_3.html
c1: 3.35.3
c3:
 Fix to the <a href="../syntax/select-stmt.html">SELECT statement syntax diagram</a> so that the FROM clause
     syntax is shown correctly.
     <a href="https://sqlite.org/forum/forumpost/9ed02582fe">Forum post 9ed02582fe</a>.


c0: releaselog/3_35_3.html
c1: 3.35.3
c3:
 Fix the EBCDIC character classifier so that it understands newlines as whitespace.
     <a href="https://sqlite.org/forum/forumpost/58540ce22dcd5fdcd">Forum post 58540ce22dcd</a>.


c0: releaselog/3_35_3.html
c1: 3.35.3
c3:
 Improvements the <a href="../vtab.html#xbestindex">xBestIndex</a> method in the implementation of the
     (unsupported) <a href="https://sqlite.org/src/file/ext/misc/wholenumber.c">wholenumber virtual table</a>
     extension so that it does a better job of convincing the query planner to
     avoid trying to materialize a table with an infinite number of rows.
     <a href="https://sqlite.org/forum/forumpost/b52a020ce4">Forum post b52a020ce4</a>.


c0: releaselog/3_35_3.html
c1: 3.35.3
c3:
SQLITE_SOURCE_ID: 2021-03-26 12:12:52 4c5e6c200adc8afe0814936c67a971efc516d1bd739cb620235592f18f40be2a


c0: releaselog/3_35_2.html
c1: 3.35.2
c3:
 Fix a problem in the
     <a href="https://www.sqlite.org/src/file/ext/misc/appendvfs.c">appendvfs.c</a>
     extension that was introduced into version 3.35.0.


c0: releaselog/3_35_2.html
c1: 3.35.2
c3:
 Ensure that date/time functions with no arguments (which generate
     responses that depend on the current time) are treated as
     <a href="../deterministic.html">non-deterministic functions</a>. Ticket
     <a href="https://sqlite.org/src/info/2c6c8689fb5f3d2f">2c6c8689fb5f3d2f</a>


c0: releaselog/3_35_2.html
c1: 3.35.2
c3:
 Fix a problem in the <a href="../sqldiff.html">sqldiff</a> utility program having to do with
     unusual whitespace characters in a <a href="../vtab.html">virtual table</a> definition.


c0: releaselog/3_35_2.html
c1: 3.35.2
c3:
 Limit the new UNION ALL optimization described by item 8c in the
     3.35.0 release so that it does not try to make too many new subqueries.
     See <a href="https://sqlite.org/forum/forumpost/140a67d3d2">forum thread 140a67d3d2</a>
     for details.


c0: releaselog/3_35_2.html
c1: 3.35.2
c3:
SQLITE_SOURCE_ID: 2021-03-17 19:07:21 ea80f3002f4120f5dcee76e8779dfdc88e1e096c5cdd06904c20fd26d50c3827


c0: releaselog/3_35_1.html
c1: 3.35.1
c3:
 Fix <a href="https://www.sqlite.org/src/info/1c24a659e6d7f3a1">a bug</a> in the new DROP COLUMN
     feature when used on columns that are indexed and that are quoted in the index
     definition.


c0: releaselog/3_35_1.html
c1: 3.35.1
c3:
 Improve the built-in documentation for the <a href="../cli.html#dump">.dump</a> command in the <a href="../cli.html">CLI</a>.


c0: releaselog/3_35_1.html
c1: 3.35.1
c3:
SQLITE_SOURCE_ID: 2021-03-15 16:53:57 aea12399bf1fdc76af43499d4624c3afa17c3e6c2459b71c195804bb98def66a


c0: releaselog/3_35_0.html
c1: 3.35.0
c3:
 Added <a href="../lang_mathfunc.html">built-in SQL math functions()</a>. (Requires the
     <a href="../compile.html#enable_math_functions">-DSQLITE_ENABLE_MATH_FUNCTIONS</a> compile-time option.)


c0: releaselog/3_35_0.html
c1: 3.35.0
c3:
 Generalize <a href="../lang_upsert.html">UPSERT</a>:
     <ol type="a">
     <li> Allow multiple ON CONFLICT clauses that are evaluated in order,
     </li><li> The final ON CONFLICT clause may omit the conflict target and
          yet still use DO UPDATE.
     </li></ol>


c0: releaselog/3_35_0.html
c1: 3.35.0
c3:
 Add support for the <a href="../lang_returning.html">RETURNING</a> clause on <a href="../lang_delete.html">DELETE</a>, <a href="../lang_insert.html">INSERT</a>, and
     <a href="../lang_update.html">UPDATE</a> statements.


c0: releaselog/3_35_0.html
c1: 3.35.0
c3:
 Use less memory when running <a href="../lang_vacuum.html">VACUUM</a> on databases containing very large
     TEXT or BLOB values.  It is no longer necessary to hold the entire TEXT
     or BLOB in memory all at once.


c0: releaselog/3_35_0.html
c1: 3.35.0
c3:
 Add support for the <a href="../lang_with.html#mathint">MATERIALIZED</a> and <a href="../lang_with.html#mathint">NOT MATERIALIZED</a> hints when
     specifying <a href="../lang_with.html">common table expressions</a>.  The default behavior was
     formerly NOT MATERIALIZED, but is now changed to MATERIALIZED for
     CTEs that are used more than once.


c0: releaselog/3_35_0.html
c1: 3.35.0
c3:
 The <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigenabletrigger">SQLITE_DBCONFIG_ENABLE_TRIGGER</a> and <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigenableview">SQLITE_DBCONFIG_ENABLE_VIEW</a>
     settings are modified so that they only control triggers and views
     in the main database schema or in attached database schemas and not in
     the TEMP schema. TEMP triggers and views are always allowed.


c0: releaselog/3_35_0.html
c1: 3.35.0
c3:
 Query planner/optimizer improvements:
     <ol type="a">
     <li> Enhancements to the <a href="../optoverview.html#minmax">min/max optimization</a> so that it works better
          with the IN operator and the OP_SeekScan optimization of the
          previous release.
     </li><li> Attempt to process EXISTS operators in the WHERE clause as if
          they were IN operators, in cases where this is a valid transformation
          and seems likely to improve performance.
     </li><li> Allow UNION ALL sub-queries to be <a href="../optoverview.html#flattening">flattened</a> even if the parent query is a join.
     </li><li> Use an index, if appropriate, on IS NOT NULL expressions in the WHERE clause,
          even if STAT4 is disabled.
     </li><li> Expressions of the form "x IS NULL" or "x IS NOT NULL" might be converted to simply
          FALSE or TRUE, if "x" is a column that has a "NOT NULL" constraint and is not
          involved in an outer join.
     </li><li> Avoid checking foreign key constraints on an UPDATE statement if the UPDATE does
          not modify any columns associated with the foreign key.
     </li><li> Allow WHERE terms to be <a href="../optoverview.html#pushdown">pushed down</a> into sub-queries
          that contain window functions,
          as long as the WHERE term is made up of entirely of constants and copies of expressions
          found in the PARTITION BY clauses of all window functions in the sub-query.
     </li></ol>


c0: releaselog/3_35_0.html
c1: 3.35.0
c3:
 <a href="../cli.html">CLI</a> enhancements:
     <ol type="a">
     <li> Enhance the ".stats" command to accept new arguments "stmt" and
          "vmstep", causing prepare statement statistics and only the
          virtual-machine step count to be shown, respectively.
     </li><li> Add the ".filectrl data_version" command.
     </li><li> Enhance the ".once" and ".output" commands so that if the destination argument
          begins with "|" (indicating that output is redirected into a pipe) then the
          argument does not need to be quoted.
     </li></ol>


c0: releaselog/3_35_0.html
c1: 3.35.0
c3:
 Bug fixes:
     <ol type="a">
     <li> Fix a potential NULL pointer dereference when processing a
          syntactically incorrect SELECT statement with a correlated WHERE
          clause and a "HAVING 0" clause.  (Also fixed in the 3.34.1 patch release.)
     </li><li> Fix a <a href="https://www.sqlite.org/src/info/ee51301f316c09e9">bug in the IN-operator optimization</a>
          of version 3.33.0 that can cause an incorrect answer.
     </li><li> Fix incorrect answers from the <a href="../lang_expr.html#like">LIKE operator</a> if the pattern ends with "%" and there
          is an "ESCAPE '_'" clause.
     </li></ol>


c0: releaselog/3_35_0.html
c1: 3.35.0
c3:
SQLITE_SOURCE_ID: 2021-03-12 15:10:09 acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b


c0: releaselog/3_34_1.html
c1: 3.34.1
c3:
 Fix a potential use-after-free bug when processing a a subquery with both
     a correlated WHERE clause and a "HAVING 0" clause and where the parent
     query is an aggregate.


c0: releaselog/3_34_1.html
c1: 3.34.1
c3:
SQLITE_SOURCE_ID: 2021-01-20 14:10:07 10e20c0b43500cfb9bbc0eaa061c57514f715d87238f4d835880cd846b9ebd1f


c0: releaselog/3_34_0.html
c1: 3.34.0
c3:
 Added the <a href="../c3ref/txn_state.html">sqlite3_txn_state()</a> interface for reporting on the current
     transaction state of the database connection.


c0: releaselog/3_34_0.html
c1: 3.34.0
c3:
 Enhance <a href="../lang_with.html#recursivecte">recursive common table expressions</a> to support two or more
     recursive terms as is done by SQL Server, since this helps make
     <a href="../lang_with.html#rcex3">queries against graphs</a> easier to write and faster to execute.


c0: releaselog/3_34_0.html
c1: 3.34.0
c3:
 Improved error messages on <a href="../lang_createtable.html#ckconst">CHECK constraint</a> failures.


c0: releaselog/3_34_0.html
c1: 3.34.0
c3:
 <a href="../cli.html">CLI</a> enhancements:
     <ol type="a">
     <li> The <a href="../cli.html#dotread">.read</a> dot-command now accepts a pipeline in addition to
          a filename.
     </li><li> Added options --data-only and --nosys to the <a href="../cli.html#dump">.dump</a> dot-command.
     </li><li> Added the --nosys option to the <a href="../cli.html#dschema">.schema</a> dot-command.
     </li><li> Table name quoting works correctly for the <a href="../cli.html#csv">.import</a> dot-command.
     </li><li> The <a href="../series.html">generate_series(START,END,STEP)</a> table-valued function
          extension is now built into the CLI.
     </li><li> The <a href="../cli.html#dotdatabases">.databases</a> dot-command now shows the status of each database
          file as determined by <a href="../c3ref/db_readonly.html">sqlite3_db_readonly()</a> and
          <a href="../c3ref/txn_state.html">sqlite3_txn_state()</a>.
     </li><li> Added the --tabs command-line option that sets
          <a href="../cli.html#dotmode">.mode tabs</a>.
     </li><li> The --init option reports an error if the file named as its argument
          cannot be opened.  The --init option also now honors the --bail option.
     </li></ol>


c0: releaselog/3_34_0.html
c1: 3.34.0
c3:
 Query planner improvements:
     <ol type="a">
     <li> Improved estimates for the cost of running a DISTINCT operator.
     </li><li> When doing an UPDATE or DELETE using a multi-column index where
          only a few of the earlier columns of the index are useful for the
          index lookup, postpone doing the main table seek until after all
          WHERE clause constraints have been evaluated, in case those
          constraints can be covered by unused later terms of the index,
          thus avoiding unnecessary main table seeks.
     </li><li> The new OP_SeekScan opcode is used to improve performance of
          multi-column index look-ups when later columns are constrained
          by an IN operator.
     </li></ol>


c0: releaselog/3_34_0.html
c1: 3.34.0
c3:
 The <a href="../lang_transaction.html#immediate">BEGIN IMMEDIATE</a> and <a href="../lang_transaction.html#immediate">BEGIN EXCLUSIVE</a> commands now work even
     if one or more attached database files are read-only.


c0: releaselog/3_34_0.html
c1: 3.34.0
c3:
 Enhanced <a href="../fts5.html">FTS5</a> to support <a href="../fts5.html#trigramidx">trigram indexes</a>.


c0: releaselog/3_34_0.html
c1: 3.34.0
c3:
 Improved performance of <a href="../wal.html">WAL mode</a> locking primitives in cases where
     there are hundreds of connections all accessing the same database file
     at once.


c0: releaselog/3_34_0.html
c1: 3.34.0
c3:
 Enhanced the <a href="../carray.html">carray() table-valued function</a> to include a single-argument
     form that is bound using the auxiliary <a href="../carray.html#onearg">sqlite3_carray_bind()</a> interface.


c0: releaselog/3_34_0.html
c1: 3.34.0
c3:
 The <a href="../lang_corefunc.html#substr">substr() SQL function</a> can now also be called "substring()" for
     compatibility with  SQL Server.


c0: releaselog/3_34_0.html
c1: 3.34.0
c3:
 The <a href="../syntaxdiagrams.html">syntax diagrams</a> are now implemented as
     <a href="https://pikchr.org/">Pikchr</a> scripts and rendered
     as SVG for improved legibility and ease of maintenance.


c0: releaselog/3_34_0.html
c1: 3.34.0
c3:
SQLITE_SOURCE_ID: 2020-12-01 16:14:00 a26b6597e3ae272231b96f9982c3bcc17ddec2f2b6eb4df06a224b91089fed5b


c0: releaselog/3_33_0.html
c1: 3.33.0
c3:
 Extended the <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a> statement so that it can optionally be
     limited to verifying just a single table and its indexes, rather than the
     entire database file.


c0: releaselog/3_33_0.html
c1: 3.33.0
c3:
 Added the <a href="../floatingpoint.html#decext">decimal extension</a> for doing arbitrary-precision decimal arithmetic.


c0: releaselog/3_33_0.html
c1: 3.33.0
c3:
 Enhancements to the <a href="../floatingpoint.html#ieee754ext">ieee754 extension</a> for working with IEEE 754 binary64 numbers.


c0: releaselog/3_33_0.html
c1: 3.33.0
c3:
 <a href="../cli.html">CLI</a> enhancements:
    <ol type="a">
    <li> Added four new <a href="../cli.html#dotmode">output modes</a>: "box", "json", "markdown",
         and "table".
    </li><li> The "column" output mode automatically expands columns to
         contain the longest output row and automatically turns
         ".header" on if it has not been previously set.
    </li><li> The "quote" output mode honors ".separator"
    </li><li> The <a href="../floatingpoint.html#decext">decimal extension</a> and the <a href="../floatingpoint.html#ieee754ext">ieee754 extension</a> are built-in to the CLI
    </li></ol>


c0: releaselog/3_33_0.html
c1: 3.33.0
c3:
 Query planner improvements:
     <ol type="a">
     <li> Add the ability to find a
          full-index-scan query plan for queries using <a href="../lang_indexedby.html">INDEXED BY</a>
          which previously would fail with "no query solution".
     </li><li> Do a better job of
          detecting missing, incomplete, and/or dodgy <a href="../fileformat2.html#stat1tab">sqlite_stat1</a>
          data and generates good query plans in spite of the
          misinformation.
     </li><li> Improved performance of queries like "SELECT min(x) FROM t WHERE y IN (?,?,?)"
          assuming an index on t(x,y).
     </li></ol>


c0: releaselog/3_33_0.html
c1: 3.33.0
c3:
 In <a href="../wal.html">WAL mode</a>, if a writer crashes and leaves the <a href="../walformat.html#shm">shm file</a> in an inconsistent
     state, subsequent transactions are now able to recover the shm file even if
     there are active read transactions.  Before this enhancement, shm file recovery
     that scenario would result in an <a href="../rescode.html#protocol">SQLITE_PROTOCOL</a> error.


c0: releaselog/3_33_0.html
c1: 3.33.0
c3:
SQLITE_SOURCE_ID: 2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f


c0: releaselog/3_32_3.html
c1: 3.32.3
c3:
 Various minor bug fixes including fixes for tickets
     <a href="https://www.sqlite.org/src/info/8f157e8010b22af0">8f157e8010b22af0</a>,
     <a href="https://www.sqlite.org/src/info/9fb26d37cefaba40">9fb26d37cefaba40</a>,
     <a href="https://www.sqlite.org/src/info/e367f31901ea8700">e367f31901ea8700</a>,
     <a href="https://www.sqlite.org/src/info/b706351ce2ecf59a">b706351ce2ecf59a</a>,
     <a href="https://www.sqlite.org/src/info/7c6d876f84e6e7e2">7c6d876f84e6e7e2</a>, and
     <a href="https://www.sqlite.org/src/info/c8d3b9f0a750a529">c8d3b9f0a750a529</a>.


c0: releaselog/3_32_3.html
c1: 3.32.3
c3:
SQLITE_SOURCE_ID: 2020-06-18 14:00:33 7ebdfa80be8e8e73324b8d66b3460222eb74c7e9dfd655b48d6ca7e1933cc8fd


c0: releaselog/3_32_2.html
c1: 3.32.2
c3:
 Fix a long-standing bug in the byte-code engine that can cause a
     <a href="../lang_transaction.html">COMMIT</a> command report as success when in fact it failed
     to commit.  Ticket
     <a href="https://www.sqlite.org/src/info/810dc8038872e212">810dc8038872e212</a>


c0: releaselog/3_32_2.html
c1: 3.32.2
c3:
SQLITE_SOURCE_ID: 2020-06-04 12:58:43 ec02243ea6ce33b090870ae55ab8aa2534b54d216d45c4aa2fdbb00e86861e8c


c0: releaselog/3_32_1.html
c1: 3.32.1
c3:
 Fix two long-standing bugs that allow malicious SQL statements
     to crash the process that is running SQLite.  These bugs were announced
     by a third-party approximately 24 hours after the 3.32.0 release but are
     not specific to the 3.32.0 release.


c0: releaselog/3_32_1.html
c1: 3.32.1
c3:
SQLITE_SOURCE_ID: 2020-05-25 16:19:56 0c1fcf4711a2e66c813aed38cf41cd3e2123ee8eb6db98118086764c4ba83350


c0: releaselog/3_32_0.html
c1: 3.32.0
c3:
 Added support for <a href="../lang_analyze.html#approx">approximate ANALYZE</a> using the
     <a href="../pragma.html#pragma_analysis_limit">PRAGMA analysis_limit</a> command.


c0: releaselog/3_32_0.html
c1: 3.32.0
c3:
 Add the <a href="../cksumvfs.html">checksum VFS shim</a> to the set of run-time loadable
     extensions included in the source tree.


c0: releaselog/3_32_0.html
c1: 3.32.0
c3:
 INSERT and UPDATE statements now always apply <a href="../datatype3.html#affinity">column affinity</a>
     before computing <a href="../lang_createtable.html#ckconst">CHECK constraints</a>.  This bug fix could, in
     theory, cause problems for legacy databases with unorthodox
     CHECK constraints the require the input type for an INSERT
     is different from the declared column type. See ticket
     <a href="https://sqlite.org/src/info/86ba67afafded936">86ba67afafded936</a>
     for more information.


c0: releaselog/3_32_0.html
c1: 3.32.0
c3:
 Added the <a href="../c3ref/create_filename.html">sqlite3_create_filename()</a>, <a href="../c3ref/create_filename.html">sqlite3_free_filename()</a>,
     and <a href="../c3ref/database_file_object.html">sqlite3_database_file_object()</a>
     interfaces to better support of <a href="../vfs.html#shim">VFS shim</a> implementations.


c0: releaselog/3_32_0.html
c1: 3.32.0
c3:
 Increase the <a href="../limits.html#max_variable_number">default upper bound</a>
     on the number of <a href="../lang_expr.html#varparam">parameters</a> from 999 to 32766.


c0: releaselog/3_32_0.html
c1: 3.32.0
c3:
 Added code for the <a href="../uintcseq.html">UINT collating sequence</a> as an optional
     <a href="../loadext.html">loadable extension</a>.


c0: releaselog/3_32_0.html
c1: 3.32.0
c3:
 Enhancements to the <a href="../cli.html">CLI</a>:
     <ol type="a">
     <li> Add options to the <a href="../cli.html#csv">.import</a> command: --csv, --ascii, --skip
     </li><li> The <a href="../cli.html#dump">.dump</a> command now accepts multiple LIKE-pattern arguments
          and outputs the union of all matching tables.
     </li><li> Add the .oom command in debugging builds
     </li><li> Add the --bom option to the <a href="../cli.html#dotexcel">.excel</a>, <a href="../cli.html#dotoutput">.output</a>, and <a href="../cli.html#dotoutput">.once</a>
          commands.
     </li><li> Enhance the .filectrl command to support the --schema option.
     </li><li> The <a href="../uintcseq.html">UINT collating sequence</a> extension is automatically loaded
     </li></ol>


c0: releaselog/3_32_0.html
c1: 3.32.0
c3:
 The <a href="../lang_expr.html#like">ESCAPE</a> clause of a <a href="../lang_expr.html#like">LIKE</a> operator now overrides wildcard
     characters, so that the behavior matches what PostgreSQL does.


c0: releaselog/3_32_0.html
c1: 3.32.0
c3:
SQLITE_SOURCE_ID: 2020-05-22 17:46:16 5998789c9c744bce92e4cff7636bba800a75574243d6977e1fc8281e360f8d5a


c0: releaselog/3_31_1.html
c1: 3.31.1
c3:
 Revert the data layout for an internal-use-only SQLite data structure.
     Applications that use SQLite should never reference internal SQLite
     data structures, but some do anyhow, and a change to one such
     data structure in 3.30.0 broke a popular and widely-deployed
     application.  Reverting that change in SQLite, at least temporarily,
     gives developers of misbehaving applications time to fix their code.


c0: releaselog/3_31_1.html
c1: 3.31.1
c3:
 Fix a typos in the sqlite3ext.h header file that prevented the
     <a href="../c3ref/stmt_isexplain.html">sqlite3_stmt_isexplain()</a> and <a href="../c3ref/value_blob.html">sqlite3_value_frombind()</a> interfaces
     from being called from <a href="../loadext.html">run-time loadable extensions</a>.


c0: releaselog/3_31_1.html
c1: 3.31.1
c3:
SQLITE_SOURCE_ID: 2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837bb4d6


c0: releaselog/3_31_0.html
c1: 3.31.0
c3:
Add the <a href="../c3ref/hard_heap_limit64.html">sqlite3_hard_heap_limit64()</a> interface and the corresponding
    <a href="../pragma.html#pragma_hard_heap_limit">PRAGMA hard_heap_limit</a> command.


c0: releaselog/3_31_0.html
c1: 3.31.0
c3:
Enhance the <a href="../pragma.html#pragma_function_list">function_list pragma</a> to show the number of arguments on each
    function, the type of function (scalar, aggregate, window), and the function
    property flags <a href="../c3ref/c_deterministic.html#sqlitedeterministic">SQLITE_DETERMINISTIC</a>, <a href="../c3ref/c_deterministic.html#sqlitedirectonly">SQLITE_DIRECTONLY</a>,
    <a href="../c3ref/c_deterministic.html#sqliteinnocuous">SQLITE_INNOCUOUS</a>, and/or <a href="../c3ref/c_deterministic.html#sqlitesubtype">SQLITE_SUBTYPE</a>.


c0: releaselog/3_31_0.html
c1: 3.31.0
c3:
Add the <a href="../dbstat.html#dbstatagg">aggregated mode</a> feature to the
    <a href="../dbstat.html">DBSTAT virtual table</a>.


c0: releaselog/3_31_0.html
c1: 3.31.0
c3:
Add the <a href="../c3ref/open.html#opennofollow">SQLITE_OPEN_NOFOLLOW</a> option to <a href="../c3ref/open.html">sqlite3_open_v2()</a> that
    prevents SQLite from opening symbolic links.


c0: releaselog/3_31_0.html
c1: 3.31.0
c3:
Added the "#-N" array notation for <a href="../json1.html#jsonpath">JSON function path arguments</a>.


c0: releaselog/3_31_0.html
c1: 3.31.0
c3:
Added the <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigtrustedschema">SQLITE_DBCONFIG_TRUSTED_SCHEMA</a> connection setting which is
    also controllable via the new <a href="../pragma.html#pragma_trusted_schema">trusted_schema pragma</a> and at compile-time
    using the <a href="../compile.html#trusted_schema">-DSQLITE_TRUSTED_SCHEMA</a> compile-time option.


c0: releaselog/3_31_0.html
c1: 3.31.0
c3:
Added APIs <a href="../c3ref/filename_database.html">sqlite3_filename_database()</a>, <a href="../c3ref/filename_database.html">sqlite3_filename_journal()</a>, and
    <a href="../c3ref/filename_database.html">sqlite3_filename_wal()</a> which are useful for specialized extensions.


c0: releaselog/3_31_0.html
c1: 3.31.0
c3:
Upgraded the <a href="../c3ref/uri_boolean.html">sqlite3_uri_parameter()</a> function so that it works with the
    rollback journal or WAL filename in addition to the database filename.


c0: releaselog/3_31_0.html
c1: 3.31.0
c3:
Provide the ability to tag <a href="../appfunc.html">application-defined SQL functions</a> with
    new properties <a href="../c3ref/c_deterministic.html#sqliteinnocuous">SQLITE_INNOCUOUS</a> or <a href="../c3ref/c_deterministic.html#sqlitedirectonly">SQLITE_DIRECTONLY</a>.


c0: releaselog/3_31_0.html
c1: 3.31.0
c3:
Add new verbs to <a href="../c3ref/vtab_config.html">sqlite3_vtab_config()</a> so that the <a href="../vtab.html#xconnect">xConnect</a> method
    of virtual tables can declare the virtual table as
    <a href="../c3ref/c_vtab_constraint_support.html#sqlitevtabinnocuous">SQLITE_VTAB_INNOCUOUS</a> or <a href="../c3ref/c_vtab_constraint_support.html#sqlitevtabdirectonly">SQLITE_VTAB_DIRECTONLY</a>.


c0: releaselog/3_31_0.html
c1: 3.31.0
c3:
Added the <a href="https://sqlite.org/src/file/ext/misc/uuid.c">uuid.c</a> extension module
    implementing functions for processing RFC-4122 UUIDs.


c0: releaselog/3_31_0.html
c1: 3.31.0
c3:
The <a href="../malloc.html#lookaside">lookaside memory allocator</a> is enhanced to support two separate memory
    pools with different sized allocations in each pool.  This allows more memory
    allocations to be covered by lookaside while at the same time reducing the
    heap memory usage to 48KB per connection, down from 120KB.


c0: releaselog/3_31_0.html
c1: 3.31.0
c3:
The <a href="../pragma.html#pragma_legacy_file_format">legacy_file_format pragma</a> is deactivated.  It is now a no-op.  In its place,
    the <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfiglegacyfileformat">SQLITE_DBCONFIG_LEGACY_FILE_FORMAT</a> option to <a href="../c3ref/db_config.html">sqlite3_db_config()</a> is
    provided.  The legacy_file_format pragma is deactivated because (1) it is
    rarely useful and (2) it is incompatible with <a href="../lang_vacuum.html">VACUUM</a> in schemas that have
    tables with both generated columns and descending indexes.
    Ticket <a href="https://www.sqlite.org/src/info/6484e6ce678fffab">6484e6ce678fffab</a>


c0: releaselog/3_31_0.html
c1: 3.31.0
c3:
SQLITE_SOURCE_ID: 2020-01-22 18:38:59 f6affdd41608946fcfcea914ece149038a8b25a62bbe719ed2561c649b86d824


c0: releaselog/3_30_1.html
c1: 3.30.1
c3:
 Fix a bug in the <a href="../optoverview.html#flattening">query flattener</a> that might cause a segfault
for nested queries that use the new
<a href="../lang_aggfunc.html#aggfilter">FILTER clause on aggregate functions</a>.
Ticket <a href="https://www.sqlite.org/src/info/1079ad19993d13fa">1079ad19993d13fa</a>


c0: releaselog/3_30_1.html
c1: 3.30.1
c3:
SQLITE_SOURCE_ID: 2019-10-10 20:19:45 18db032d058f1436ce3dea84081f4ee5a0f2259ad97301d43c426bc7f3df1b0b


c0: releaselog/3_30_0.html
c1: 3.30.0
c3:
 Add support for the <a href="../lang_aggfunc.html#aggfilter">FILTER clause on aggregate functions</a>.


c0: releaselog/3_30_0.html
c1: 3.30.0
c3:
 Add support for the <a href="../lang_select.html#nullslast">NULLS FIRST</a> and <a href="../lang_select.html#nullslast">NULLS LAST</a> syntax in <a href="../lang_select.html#orderby">ORDER BY</a> clauses.


c0: releaselog/3_30_0.html
c1: 3.30.0
c3:
 The <a href="../pragma.html#pragma_index_info">index_info</a> and <a href="../pragma.html#pragma_index_xinfo">index_xinfo</a> pragmas are enhanced to provide
     information about the on-disk representation of <a href="../withoutrowid.html">WITHOUT ROWID</a>
     tables.


c0: releaselog/3_30_0.html
c1: 3.30.0
c3:
 Add the <a href="../c3ref/drop_modules.html">sqlite3_drop_modules()</a> interface, allowing applications
     to disable automatically loaded virtual tables that they do not
     need.


c0: releaselog/3_30_0.html
c1: 3.30.0
c3:
 Improvements to the <a href="../cli.html#recover">.recover dot-command</a> in the <a href="../cli.html">CLI</a> so that
     it recovers more content from corrupt database files.


c0: releaselog/3_30_0.html
c1: 3.30.0
c3:
 Enhance the <a href="../rbu.html">RBU</a> extension to support <a href="../expridx.html">indexes on expressions</a>.


c0: releaselog/3_30_0.html
c1: 3.30.0
c3:
 Change the schema parser so that it will error out if any of
     the type, name, and tbl_name columns of the <a href="../schematab.html">sqlite_master table</a>
     have been corrupted and the database connection is not in
     <a href="../pragma.html#pragma_writable_schema">writable_schema</a> mode.


c0: releaselog/3_30_0.html
c1: 3.30.0
c3:
 The <a href="../pragma.html#pragma_function_list">PRAGMA function_list</a>, <a href="../pragma.html#pragma_module_list">PRAGMA module_list</a>, and
     <a href="../pragma.html#pragma_pragma_list">PRAGMA pragma_list</a> commands are now
     enabled in all builds by default.  Disable them using
     <a href="../compile.html#omit_introspection_pragmas">-DSQLITE_OMIT_INTROSPECTION_PRAGMAS</a>.


c0: releaselog/3_30_0.html
c1: 3.30.0
c3:
 Add the <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigenableview">SQLITE_DBCONFIG_ENABLE_VIEW</a> option for <a href="../c3ref/db_config.html">sqlite3_db_config()</a>.


c0: releaselog/3_30_0.html
c1: 3.30.0
c3:
 Added the <a href="../tclsqlite.html">TCL Interface</a> <a href="../tclsqlite.html#config">config method</a> in order to be able to
     disable <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigenableview">SQLITE_DBCONFIG_ENABLE_VIEW</a> as well as control other
     <a href="../c3ref/db_config.html">sqlite3_db_config()</a> options from TCL.


c0: releaselog/3_30_0.html
c1: 3.30.0
c3:
 Added the <a href="../c3ref/c_deterministic.html#sqlitedirectonly">SQLITE_DIRECTONLY</a> flag for
     <a href="../appfunc.html">application-defined SQL functions</a> to prevent those functions from
     being used inside triggers and views.


c0: releaselog/3_30_0.html
c1: 3.30.0
c3:
 The legacy <a href="../compile.html#enable_stat3">SQLITE_ENABLE_STAT3</a> compile-time option is now a no-op.


c0: releaselog/3_30_0.html
c1: 3.30.0
c3:
SQLITE_SOURCE_ID: 2019-10-04 15:03:17 c20a35336432025445f9f7e289d0cc3e4003fb17f45a4ce74c6269c407c6e09f


c0: releaselog/3_29_0.html
c1: 3.29.0
c3:
 Added the <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigdqsdml">SQLITE_DBCONFIG_DQS_DML</a> and <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigdqsddl">SQLITE_DBCONFIG_DQS_DDL</a>
     actions to <a href="../c3ref/db_config.html">sqlite3_db_config()</a> for activating and deactivating
     the <a href="../quirks.html#dblquote">double-quoted string literal</a> misfeature.  Both default to "on"
     for legacy compatibility, but developers are encouraged to turn them
     "off", perhaps using the <a href="../compile.html#dqs">-DSQLITE_DQS=0</a> compile-time option.


c0: releaselog/3_29_0.html
c1: 3.29.0
c3:
 <a href="../compile.html#dqs">-DSQLITE_DQS=0</a> is now a <a href="../compile.html#rcmd">recommended compile-time option</a>.


c0: releaselog/3_29_0.html
c1: 3.29.0
c3:
 Improvements to the <a href="../optoverview.html">query planner</a>:
<ol type="a">
  <li> Improved optimization of AND and OR operators when one or the other
       operand is a constant.
  </li><li> Enhancements to the <a href="../optoverview.html#like_opt">LIKE optimization</a> for cases when the left-hand
       side column has numeric affinity.
  </li></ol>
  


c0: releaselog/3_29_0.html
c1: 3.29.0
c3:
 Added the "<a href="https://sqlite.org/src/file/ext/misc/dbdata.c">sqlite_dbdata</a>"
       virtual table for extracting raw low-level content from an SQLite database,
       even a database that is corrupt.
  


c0: releaselog/3_29_0.html
c1: 3.29.0
c3:
 Improvements to rounding behavior, so that the results of rounding
       binary numbers using the <a href="../lang_corefunc.html#round">round()</a> function are closer to what people
       who are used to thinking in decimal actually expect.
  


c0: releaselog/3_29_0.html
c1: 3.29.0
c3:
 Enhancements to the <a href="../cli.html">CLI</a>:
<ol type="a">
  <li> Add the ".recover" command which tries to recover as much content
       as possible from a corrupt database file.
  </li><li> Add the ".filectrl" command useful for testing.
  </li><li> Add the long-standing ".testctrl" command to the ".help" menu.
  </li><li> Added the ".dbconfig" command
</li></ol>


c0: releaselog/3_29_0.html
c1: 3.29.0
c3:
SQLITE_SOURCE_ID: 2019-07-10 17:32:03 fc82b73eaac8b36950e527f12c4b5dc1e147e6f4ad2217ae43ad82882a88bfa6


c0: releaselog/3_28_0.html
c1: 3.28.0
c3:
 Enhanced <a href="../windowfunctions.html">window functions</a>:
<ol type="a">
  <li> Add support the <a href="../windowfunctions.html#wexcls">EXCLUDE clause</a>.
  </li><li> Add support for <a href="../windowfunctions.html#wchaining">window chaining</a>.
  </li><li> Add support for <a href="../windowfunctions.html#grouptype">GROUPS frames</a>.
  </li><li> Add support for "<a href="../windowfunctions.html#exprrange">&lt;expr&gt; PRECEDING</a>" and
       "<a href="../windowfunctions.html#exprrange">&lt;expr&gt; FOLLOWING</a>" boundaries
       in RANGE <a href="../windowfunctions.html#framespec">frames</a>.
</li></ol>


c0: releaselog/3_28_0.html
c1: 3.28.0
c3:
 Added the new <a href="../c3ref/stmt_isexplain.html">sqlite3_stmt_isexplain(S)</a> interface for determining
     whether or not a <a href="../c3ref/stmt.html">prepared statement</a> is an <a href="../lang_explain.html">EXPLAIN</a>.


c0: releaselog/3_28_0.html
c1: 3.28.0
c3:
 Enhanced <a href="../lang_vacuum.html#vacuuminto">VACUUM INTO</a> so that it works for read-only databases.


c0: releaselog/3_28_0.html
c1: 3.28.0
c3:
 New query optimizations:
<ol type="a">
  <li> Enable the <a href="../optoverview.html#like_opt">LIKE optimization</a> for cases when the ESCAPE keyword
       is present and <a href="../pragma.html#pragma_case_sensitive_like">PRAGMA case_sensitive_like</a> is on.
  </li><li> In queries that are driven by a <a href="../partialindex.html">partial index</a>, avoid unnecessary
       tests of the constraint named in the WHERE clause of the partial
       index, since we know that constraint must always be true.
</li></ol>


c0: releaselog/3_28_0.html
c1: 3.28.0
c3:
 Enhancements to the <a href="../tclsqlite.html">TCL Interface</a>:
<ol type="a">
  <li> Added the -returntype option to the <a href="../tclsqlite.html#function">function method</a>.
  </li><li> Added the new <a href="../tclsqlite.html#bind_fallback">bind_fallback method</a>.
</li></ol>


c0: releaselog/3_28_0.html
c1: 3.28.0
c3:
 Enhancements to the <a href="../cli.html">CLI</a>:
<ol type="a">
  <li> Added support for <a href="../lang_expr.html#varparam">bound parameters</a> and the <a href="../cli.html#param">.parameter command</a>.
  </li><li> Fix the <a href="../cli.html#fileio">readfile()</a> function so that it returns
       an empty BLOB rather than throwing an out-of-memory error when
       reading an empty file.
  </li><li> Fix the <a href="../cli.html#fileio">writefile()</a> function so that when it
       creates new directories along the path of a new file, it gives them
       umask permissions rather than the same permissions as the file.
  </li><li> Change <a href="../cli.html#arinsup">--update option</a> in the <a href="../cli.html#sqlar">.archive command</a> so that it skips
       files that are already in the archive and are unchanged.  Add the
       new --insert option that works like --update used to work.
</li></ol>


c0: releaselog/3_28_0.html
c1: 3.28.0
c3:
 Added the <a href="https://sqlite.org/src/file/ext/misc/fossildelta.c">fossildelta.c</a>
     extension that can create, apply, and deconstruct the
 <a href="https://fossil-scm.org/fossil/doc/trunk/www/delta_format.wiki">Fossil DVCS file delta format</a>
     that is used by the <a href="../rbu.html">RBU extension</a>.


c0: releaselog/3_28_0.html
c1: 3.28.0
c3:
 Added the <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigwritableschema">SQLITE_DBCONFIG_WRITABLE_SCHEMA</a> verb for the <a href="../c3ref/db_config.html">sqlite3_db_config()</a>
     interface, that does the same work as <a href="../pragma.html#pragma_writable_schema">PRAGMA writable_schema</a> without using the
     SQL parser.


c0: releaselog/3_28_0.html
c1: 3.28.0
c3:
 Added the <a href="../c3ref/value_blob.html">sqlite3_value_frombind()</a> API for determining if the argument
     to an SQL function is from a <a href="../lang_expr.html#varparam">bound parameter</a>.


c0: releaselog/3_28_0.html
c1: 3.28.0
c3:
 Security and compatibilities enhancements to <a href="../fts3.html#f3tknzr">fts3_tokenizer()</a>:
<ol type="a">
  <li> The <a href="../fts3.html#f3tknzr">fts3_tokenizer()</a> function always returns NULL
       unless either the legacy application-defined FTS3 tokenizers interface
       are enabled using
       the <a href="../c3ref/db_config.html">sqlite3_db_config</a>(<a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigenablefts3tokenizer">SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</a>)
       setting, or unless the first argument to fts3_tokenizer() is a <a href="../lang_expr.html#varparam">bound parameter</a>.
  </li><li> The two-argument version of <a href="../fts3.html#f3tknzr">fts3_tokenizer()</a> accepts a pointer to the
       tokenizer method object even without
       the <a href="../c3ref/db_config.html">sqlite3_db_config</a>(<a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigenablefts3tokenizer">SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</a>) setting
       if the second argument is a <a href="../lang_expr.html#varparam">bound parameter</a>
</li></ol>


c0: releaselog/3_28_0.html
c1: 3.28.0
c3:
 Established a Git mirror of the offical SQLite source tree.
     The canonical sources for SQLite are maintained using the
     <a href="https://fossil-scm.org/">Fossil DVCS</a> at <a href="https://sqlite.org/src">https://sqlite.org/src</a>.
     The Git mirror can be seen at <a href="https://github.com/sqlite/sqlite">https://github.com/sqlite/sqlite</a>.


c0: releaselog/3_28_0.html
c1: 3.28.0
c3:
SQLITE_SOURCE_ID: 2019-04-16 19:49:53 884b4b7e502b4e991677b53971277adfaf0a04a284f8e483e2553d0f83156b50


c0: releaselog/3_27_2.html
c1: 3.27.2
c3:
 Fix a bug in the IN operator that was introduced by an
     attempted optimization in version 3.27.0. Ticket
     <a href="https://www.sqlite.org/src/info/df46dfb631f75694">df46dfb631f75694</a>


c0: releaselog/3_27_2.html
c1: 3.27.2
c3:
 Fix a bug causing a crash when a <a href="../windowfunctions.html">window function</a> is misused.  Ticket
     <a href="https://www.sqlite.org/src/info/4feb3159c6bc3f7e33959">4feb3159c6bc3f7e33959</a>.


c0: releaselog/3_27_1.html
c1: 3.27.1
c3:
 Fix a bug in the query optimizer: an adverse interaction between
the <a href="../optoverview.html#or_opt">OR optimization</a> and the optimization that tries to use values
read directly from an <a href="../expridx.html">expression index</a> instead of recomputing the
expression.
Ticket <a href="https://www.sqlite.org/src/info/4e8e4857d32d401f">4e8e4857d32d401f</a>


c0: releaselog/3_27_1.html
c1: 3.27.1
c3:
SQLITE_SOURCE_ID: 2019-02-08 13:17:39 0eca3dd3d38b31c92b49ca2d311128b74584714d9e7de895b1a6286ef959a1dd


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
Issue an SQLITE_WARNING message on the <a href="../errlog.html">error log</a> if a
<a href="../quirks.html#dblquote">double-quoted string literal</a> is used.


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
The <a href="../c3ref/expanded_sql.html">sqlite3_normalized_sql()</a> interface works on any prepared statement
created using <a href="../c3ref/prepare.html">sqlite3_prepare_v2()</a> or <a href="../c3ref/prepare.html">sqlite3_prepare_v3()</a>.  It is no
longer necessary to use <a href="../c3ref/prepare.html">sqlite3_prepare_v3()</a> with <a href="../c3ref/c_prepare_normalize.html#sqlitepreparenormalize">SQLITE_PREPARE_NORMALIZE</a>
in order to use <a href="../c3ref/expanded_sql.html">sqlite3_normalized_sql()</a>.


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
Added the remove_diacritics=2 option to <a href="../fts3.html">FTS3</a> and <a href="../fts5.html">FTS5</a>.


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
Added the <a href="../c3ref/c_prepare_normalize.html#sqlitepreparenovtab">SQLITE_PREPARE_NO_VTAB</a> option to <a href="../c3ref/prepare.html">sqlite3_prepare_v3()</a>.
Use that option to prevent circular references to <a href="../vtab.html#xshadowname">shadow tables</a> from
causing resource leaks.


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
Enhancements to the <a href="../c3ref/deserialize.html">sqlite3_deserialize()</a> interface:
<ol type="a">
  <li> Add the <a href="../c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlsizelimit">SQLITE_FCNTL_SIZE_LIMIT</a> <a href="../c3ref/file_control.html">file-control</a> for
       setting an upper bound on the size of the in-memory database created
       by sqlite3_deserialize.  The default upper bound is 1GiB, or whatever
       alternative value is specified by
       <a href="../c3ref/config.html">sqlite3_config</a>(<a href="../c3ref/c_config_covering_index_scan.html#sqliteconfigmemdbmaxsize">SQLITE_CONFIG_MEMDB_MAXSIZE</a>)
       and/or <a href="../compile.html#memdb_default_maxsize">SQLITE_MEMDB_DEFAULT_MAXSIZE</a>.
  </li><li> Honor the <a href="../c3ref/c_deserialize_freeonclose.html">SQLITE_DESERIALIZE_READONLY</a> flag, which was previously described
       in the documentation, but was previously a no-op.
  </li><li> Enhance the "deserialize" command of the <a href="../tclsqlite.html">TCL Interface</a> to give it
       new "--maxsize N" and "--readonly BOOLEAN" options.
</li></ol>


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
Enhancements to the <a href="../cli.html">CLI</a>, mostly to support testing and debugging
of the SQLite library itself:
<ol type="a">
  <li> Add support for ".open --hexdb". The
       "<a href="https://sqlite.org/src/doc/trunk/tool/dbtotxt.md">dbtotxt</a>" utility
       program used to generate the text for the "hexdb" is added to the
       source tree.
  </li><li> Add support for the "--maxsize N" option on ".open --deserialize".
  </li><li> Add the "--memtrace" command-line option, to show all memory allocations
       and deallocations.
  </li><li> Add the ".eqp trace" option on builds with SQLITE_DEBUG, to enable
       bytecode program listing with indentation and
       <a href="../pragma.html#pragma_vdbe_trace">PRAGMA vdbe_trace</a> all in one step.
  </li><li> Add the ".progress" command for accessing
       the <a href="../c3ref/progress_handler.html">sqlite3_progress_handler()</a> interface.
  </li><li> Add the "--async" option to the ".backup" command.
  </li><li> Add options "--expanded", "--normalized", "--plain", "--profile", "--row",
       "--stmt", and "--close" to the ".trace" command.
</li></ol>


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
 Increased robustness against malicious SQL that is run against a
     maliciously corrupted database.
 


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
Do not use a partial index to do a table scan on an IN operator.
Ticket <a href="https://www.sqlite.org/src/info/1d958d90596593a774">1d958d90596593a774</a>.


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
Fix the <a href="../optoverview.html#flattening">query flattener</a> so that it works on queries that contain
subqueries that use <a href="../windowfunctions.html">window functions</a>.
Ticket <a href="https://www.sqlite.org/src/info/f09fcd17810f65f717">709fcd17810f65f717</a>


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
Ensure that ALTER TABLE modifies table and column names embedded in WITH
clauses that are part of views and triggers.


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
Fix a problem with the <a href="../optoverview.html#or_opt">OR optimization</a> on <a href="../expridx.html">indexes on expressions</a>.
Ticket <a href="https://www.sqlite.org/src/info/d96eba87698a428c1d">d96eba87698a428c1d</a>.


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
Fix a problem with the
<a href="../optoverview.html#leftjoinreduction">LEFT JOIN strength reduction optimization</a> in which the optimization
was being applied inappropriately due to an IS NOT NULL operator.
Ticket <a href="https://www.sqlite.org/src/info/5948e09b8c415bc45d">5948e09b8c415bc45d</a>.


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
Fix the <a href="../lang_replace.html">REPLACE</a> command so that it is no longer able to sneak a
NULL value into a NOT NULL column even if the NOT NULL column has a default
value of NULL.
Ticket <a href="https://www.sqlite.org/src/info/e6f1f2e34dceeb1ed6">e6f1f2e34dceeb1ed6</a>


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
Fix a problem with the use of <a href="../windowfunctions.html">window functions</a> used within
<a href="../lang_expr.html#cosub">correlated subqueries</a>.
Ticket <a href="https://www.sqlite.org/src/info/d0866b26f83e9c55e3">d0866b26f83e9c55e3</a>


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
Fix the <a href="../lang_altertable.html#altertabmvcol">ALTER TABLE RENAME COLUMN</a> command so that it works for tables
that have redundant UNIQUE constraints.
Ticket <a href="https://www.sqlite.org/src/info/bc8d94f0fbd633fd9a">bc8d94f0fbd633fd9a</a>


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
Fix a bug that caused <a href="../lang_corefunc.html#zeroblob">zeroblob</a> values to be truncated when inserted into
a table that uses an <a href="../expridx.html">expression index</a>.
Ticket <a href="https://www.sqlite.org/src/info/bb4bdb9f7f654b0bb9">bb4bdb9f7f654b0bb9</a>


c0: releaselog/3_27_0.html
c1: 3.27.0
c3:
SQLITE_SOURCE_ID: "2019-02-07 17:02:52 97744701c3bd414e6c9d7182639d8c2ce7cf124c4fce625071ae65658ac61713
"


c0: releaselog/3_26_0.html
c1: 3.26.0
c3:
Optimization: When doing an <a href="../lang_update.html">UPDATE</a> on a table with <a href="../expridx.html">indexes on expressions</a>,
    do not update the expression indexes if they do not refer to any of the columns
    of the table being updated.


c0: releaselog/3_26_0.html
c1: 3.26.0
c3:
Allow the <a href="../vtab.html#xbestindex">xBestIndex()</a> method of <a href="../vtab.html">virtual table</a> implementations to return
    <a href="../rescode.html#constraint">SQLITE_CONSTRAINT</a> to indicate that the proposed query plan is unusable and
    should not be given further consideration.


c0: releaselog/3_26_0.html
c1: 3.26.0
c3:
Added the <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigdefensive">SQLITE_DBCONFIG_DEFENSIVE</a> option which disables the ability to
    create corrupt database files using ordinary SQL.


c0: releaselog/3_26_0.html
c1: 3.26.0
c3:
Added support for read-only <a href="../vtab.html#xshadowname">shadow tables</a> when the <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigdefensive">SQLITE_DBCONFIG_DEFENSIVE</a>
    option is enabled.


c0: releaselog/3_26_0.html
c1: 3.26.0
c3:
Added the <a href="../pragma.html#pragma_legacy_alter_table">PRAGMA legacy_alter_table</a> command, which if enabled causes the
    <a href="../lang_altertable.html">ALTER TABLE</a> command to behave like older version of SQLite (prior to
    version 3.25.0) for compatibility.


c0: releaselog/3_26_0.html
c1: 3.26.0
c3:
Added <a href="../pragma.html#pragma_table_xinfo">PRAGMA table_xinfo</a> that works just like <a href="../pragma.html#pragma_table_info">PRAGMA table_info</a>
    except that it also shows <a href="../vtab.html#hiddencol">hidden columns</a> in virtual tables.


c0: releaselog/3_26_0.html
c1: 3.26.0
c3:
Added the <a href="https://sqlite.org/src/file/ext/misc/explain.c">explain virtual table</a>
    as a run-time loadable extension.


c0: releaselog/3_26_0.html
c1: 3.26.0
c3:
Add a limit counter to the query planner to prevent excessive
    <a href="../c3ref/prepare.html">sqlite3_prepare()</a> times for certain pathological SQL inputs.


c0: releaselog/3_26_0.html
c1: 3.26.0
c3:
Added support for the <a href="../c3ref/expanded_sql.html">sqlite3_normalized_sql()</a> interface, when compiling
    with SQLITE_ENABLE_NORMALIZE.


c0: releaselog/3_26_0.html
c1: 3.26.0
c3:
Enhanced triggers so that they can use <a href="../vtab.html#tabfunc2">table-valued functions</a> that
    exist in schemas other than the schema where the trigger is defined.


c0: releaselog/3_26_0.html
c1: 3.26.0
c3:
Enhancements to the <a href="../cli.html">CLI</a>:
<ol type="a">
  <li>Improvements to the ".help" command.
  </li><li>The SQLITE_HISTORY environment variable, if it exists,
      specifies the name of the command-line editing history file
  </li><li>The --deserialize option associated with opening a new database cause the
      database file to be read into memory and accessed using the
      <a href="../c3ref/deserialize.html">sqlite3_deserialize()</a> API. This simplifies running tests on a database
      without modifying the file on disk.
</li></ol>


c0: releaselog/3_26_0.html
c1: 3.26.0
c3:
Enhancements to the <a href="../geopoly.html">geopoly</a> extension:
<ol type="a">
  <li>Always stores polygons
      using the binary format, which is faster and uses less space.
  </li><li>Added the <a href="../geopoly.html#regpoly">geopoly_regular()</a> function.
  </li><li>Added the <a href="../geopoly.html#ccw">geopoly_ccw()</a> function.
</li></ol>


c0: releaselog/3_26_0.html
c1: 3.26.0
c3:
Enhancements to the <a href="../sessionintro.html">session</a> extension:
<ol type="a">
  <li>Added the <a href="../session/c_changesetapply_fknoaction.html">SQLITE_CHANGESETAPPLY_INVERT</a> flag
  </li><li>Added the <a href="../session/sqlite3changeset_start.html">sqlite3changeset_start_v2()</a> interface and the
      <a href="../session/c_changesetstart_invert.html">SQLITE_CHANGESETSTART_INVERT</a> flag.
  </li><li>Added the
      <a href="https://sqlite.org/src/file/ext/session/changesetfuzz.c">changesetfuzz.c</a>
      test-case generator utility.
</li></ol>


c0: releaselog/3_26_0.html
c1: 3.26.0
c3:
SQLITE_SOURCE_ID: "2018-12-01 12:34:55 bf8c1b2b7a5960c282e543b9c293686dccff272512d08865f4600fb58238b4f9"


c0: releaselog/3_25_3.html
c1: 3.25.3
c3:
 Disallow the use of <a href="../windowfunctions.html">window functions</a> in the recursive part of
     a CTE. Ticket <a href="https://sqlite.org/src/info/e8275b415a2f03bee">e8275b415a2f03bee</a>


c0: releaselog/3_25_3.html
c1: 3.25.3
c3:
 Fix the behavior of typeof() and length() on virtual tables.  Ticket
     <a href="https://sqlite.org/src/info/69d642332d25aa3b7315a6d385">69d642332d25aa3b7315a6d385</a>


c0: releaselog/3_25_3.html
c1: 3.25.3
c3:
 Fix a problem in the query planner that results when a row-value expression
     is used with a PRIMARY KEY with redundant columns.  Ticket
     <a href="https://sqlite.org/src/info/1a84668dcfdebaf12415d">1a84668dcfdebaf12415d</a>


c0: releaselog/3_25_3.html
c1: 3.25.3
c3:
 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.
     <a href="https://sqlite.org/src/info/65eb38f6e46de8c75e188a17ec">65eb38f6e46de8c75e188a17ec</a>


c0: releaselog/3_25_3.html
c1: 3.25.3
c3:
SQLITE_SOURCE_ID: "2018-11-05 20:37:38 89e099fbe5e13c33e683bef07361231ca525b88f7907be7092058007b75036f2"


c0: releaselog/3_25_2.html
c1: 3.25.2
c3:
 Add the <a href="../pragma.html#pragma_legacy_alter_table">PRAGMA legacy_alter_table=ON</a> 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.


c0: releaselog/3_25_2.html
c1: 3.25.2
c3:
 Fix a problem with the new <a href="../windowfunctions.html">window functions</a> implementation that caused
     a malfunction when complicated expressions involving window functions were used
     inside of a view.


c0: releaselog/3_25_2.html
c1: 3.25.2
c3:
 Fixes for various other compiler warnings and minor problems associated
     with obscure configurations.


c0: releaselog/3_25_2.html
c1: 3.25.2
c3:
SQLITE_SOURCE_ID: "2018-09-25 19:08:10 fb90e7189ae6d62e77ba3a308ca5d683f90bbe633cf681865365b8e92792d1c7"


c0: releaselog/3_25_1.html
c1: 3.25.1
c3:
 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.
     Ticket <a href="https://sqlite.org/src/info/b41031ea2b537237">b41031ea2b537237</a>.


c0: releaselog/3_25_1.html
c1: 3.25.1
c3:
 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
     <a href="https://sqlite.org/src/info/510cde277783b5fb">510cde277783b5fb</a>


c0: releaselog/3_25_1.html
c1: 3.25.1
c3:
SQLITE_SOURCE_ID: "2018-09-18 20:20:44 2ac9003de44da7dafa3fbb1915ac5725a9275c86bf2f3b7aa19321bf1460b386"


c0: releaselog/3_25_0.html
c1: 3.25.0
c3:
 Enhancements the <a href="../lang_altertable.html">ALTER TABLE</a> command:
<ol type="a">
  <li> Add support for renaming columns within a table using
       ALTER TABLE <i>table</i> RENAME COLUMN <i>oldname</i> TO <i>newname</i>.
  </li><li> Fix table rename feature so that it also updates references
       to the renamed table in <a href="../lang_createtrigger.html">triggers</a> and <a href="../lang_createview.html">views</a>.
</li></ol>


c0: releaselog/3_25_0.html
c1: 3.25.0
c3:
 Query optimizer improvements:
<ol type="a">
  <li> 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.
  </li><li> 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.
  </li><li> 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".
</li></ol>


c0: releaselog/3_25_0.html
c1: 3.25.0
c3:
 Use a separate mutex on every inode in the unix <a href="../vfs.html">VFS</a>, rather than
     a single mutex shared among them all, for slightly better concurrency
     in multi-threaded environments.


c0: releaselog/3_25_0.html
c1: 3.25.0
c3:
 Enhance the <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a> command for improved detection
     of problems on the page freelist.


c0: releaselog/3_25_0.html
c1: 3.25.0
c3:
 Output infinity as 1e999 in the ".dump" command of the
     <a href="../cli.html">command-line shell</a>.


c0: releaselog/3_25_0.html
c1: 3.25.0
c3:
 Added the <a href="../c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntldataversion">SQLITE_FCNTL_DATA_VERSION</a> file-control.


c0: releaselog/3_25_0.html
c1: 3.25.0
c3:
 The ORDER BY LIMIT optimization might have caused an infinite loop
     in the byte code of the prepared statement under very obscure
     circumstances,
     due to a confluence of minor defects in the query optimizer.
     Fix for ticket
     <a href="https://www.sqlite.org/src/info/9936b2fa443fec03ff25">9936b2fa443fec03ff25</a>


c0: releaselog/3_25_0.html
c1: 3.25.0
c3:
 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
     <a href="https://www.sqlite.org/src/info/79cad5e4b2e219dd197242e9e">79cad5e4b2e219dd197242e9e</a>.


c0: releaselog/3_25_0.html
c1: 3.25.0
c3:
 Avoid using a prepared statement for ".stats on" command of the
     <a href="../cli.html">CLI</a> after it has been closed by the ".eqp full" logicc. Fix for ticket
     <a href="https://www.sqlite.org/src/info/7be932dfa60a8a6b3b26bcf76">7be932dfa60a8a6b3b26bcf76</a>.


c0: releaselog/3_25_0.html
c1: 3.25.0
c3:
 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
     <a href="https://www.sqlite.org/src/info/c94369cae9b561b1f996d0054b">c94369cae9b561b1f996d0054b</a>


c0: releaselog/3_25_0.html
c1: 3.25.0
c3:
SQLITE_SOURCE_ID: "2018-09-15 04:01:47 b63af6c3bd33152742648d5d2e8dc5d5fcbcdd27df409272b6aea00a6f761760"


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 Add C-language APIs for discovering SQL keywords used by
     SQLite: <a href="../c3ref/keyword_check.html">sqlite3_keyword_count()</a>, <a href="../c3ref/keyword_check.html">sqlite3_keyword_name()</a>, and
     <a href="../c3ref/keyword_check.html">sqlite3_keyword_check()</a>.


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 Add C-language APIs for dynamic strings based on the
     <a href="../c3ref/str.html">sqlite3_str</a> object.


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 Enhance <a href="../lang_altertable.html">ALTER TABLE</a> so that it recognizes "true" and "false" as
     valid arguments to DEFAULT.


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 Add the sorter-reference optimization as a compile-time option.
     Only available if compiled with SQLITE_ENABLE_SORTER_REFERENCES.


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 Improve the format of the <a href="../eqp.html">EXPLAIN QUERY PLAN</a> raw output, so that
     it gives better information about the query plan and about the
     relationships between the various components of the plan.


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 Added the <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigresetdatabase">SQLITE_DBCONFIG_RESET_DATABASE</a> option to the
     <a href="../c3ref/db_config.html">sqlite3_db_config()</a> API.


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 Automatically intercepts the raw <a href="../eqp.html">EXPLAIN QUERY PLAN</a>
     output and reformats it into an ASCII-art graph.


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 Lines that begin with "#" and that are not in the middle of an
     SQL statement are interpreted as comments.


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 <a href="../lang_update.html">UPDATE</a> 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 <a href="../lang_update.html">UPDATE</a> 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
     structures.


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 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.


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 The <a href="../optoverview.html#or_opt">OR optimization</a> 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
     <a href="../eqp.html#or-opt">more clearly shown</a> in the <a href="../eqp.html">EXPLAIN QUERY PLAN</a> output.


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 The query planner is more aggressive about using
     <a href="../optoverview.html#autoindex">automatic indexes</a> for views and subqueries for which it is
     not possible to create a persistent index.


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 Make use of the one-pass UPDATE and DELETE query plans in the
     <a href="../rtree.html">R-Tree extension</a> where appropriate.


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 For the right-hand table of a LEFT JOIN, compute the values
     of expressions directly rather than loading precomputed values
     out of an <a href="../expridx.html">expression index</a> as the expression index might
     not contain the correct value.  Ticket
     <a href="https://sqlite.org/src/info/7fa8049685b50b5aeb0c2">7fa8049685b50b5aeb0c2</a>


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 Do not attempt to use terms from the WHERE clause to enable
     indexed lookup of the right-hand table of a LEFT JOIN.  Ticket
     <a href="https://sqlite.org/src/info/4ba5abf65c5b0f9a96a7a">4ba5abf65c5b0f9a96a7a</a>


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 Fix a memory leak that can occur following a failure to open error
     in the <a href="../csv.html">CSV virtual table</a>


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 Fix a long-standing problem wherein a corrupt schema on the
     <a href="../fileformat2.html#seqtab">sqlite_sequence</a> table used by <a href="../autoinc.html">AUTOINCREMENT</a> can lead to
     a crash. Ticket
     <a href="https://www.sqlite.org/src/info/d8dc2b3a58cd5dc29">d8dc2b3a58cd5dc2918a1</a>


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
 Fix the <a href="../json1.html#jeach">json_each()</a> function so that it returns
     valid results on its "fullkey" column when the input is a simple value
     rather than an array or object.


c0: releaselog/3_24_0.html
c1: 3.24.0
c3:
SQLITE_SOURCE_ID: "2018-06-04 19:24:41 c7ee0833225bfd8c5ec2f9bf62b97c4e04d03bd9566366d5221ac8fb199a87ca"


c0: releaselog/3_23_1.html
c1: 3.23.1
c3:
 Fix two problems in the new <a href="../optoverview.html#leftjoinreduction">LEFT JOIN strength reduction optimization</a>.
     Tickets <a href="https://sqlite.org/src/info/1e39b966ae9ee739">1e39b966ae9ee739</a>
     and <a href="https://sqlite.org/src/info/fac496b61722daf2">fac496b61722daf2</a>.


c0: releaselog/3_23_1.html
c1: 3.23.1
c3:
 Fix misbehavior of the FTS5 xBestIndex method.  Ticket
     <a href="https://sqlite.org/src/info/2b8aed9f7c9e61e8">2b8aed9f7c9e61e8</a>.


c0: releaselog/3_23_1.html
c1: 3.23.1
c3:
 Fix a harmless reference to an uninitialized virtual machine register.
     Ticket <a href="https://sqlite.org/src/info/093420fc0eb7cba7">093420fc0eb7cba7</a>.


c0: releaselog/3_23_1.html
c1: 3.23.1
c3:
 Fix the <a href="https://sqlite.org/src/file/ext/misc/eval.c">eval.c</a> extension
     so that it works with <a href="../pragma.html#pragma_empty_result_callbacks">PRAGMA empty_result_callbacks=ON</a>.


c0: releaselog/3_23_1.html
c1: 3.23.1
c3:
 Fix the <a href="../series.html">generate_series</a> virtual table so that it correctly returns
     no rows if any of its constraints are NULL.


c0: releaselog/3_23_1.html
c1: 3.23.1
c3:
SQLITE_SOURCE_ID: "2018-04-10 17:39:29 4bb2294022060e61de7da5c227a69ccd846ba330e31626ebcd59a94efd148b3b"


c0: releaselog/3_23_0.html
c1: 3.23.0
c3:
 Add the <a href="../c3ref/serialize.html">sqlite3_serialize()</a> and <a href="../c3ref/deserialize.html">sqlite3_deserialize()</a> interfaces when
     the <a href="../compile.html#enable_deserialize">SQLITE_ENABLE_DESERIALIZE</a> compile-time option is used.


c0: releaselog/3_23_0.html
c1: 3.23.0
c3:
 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.)


c0: releaselog/3_23_0.html
c1: 3.23.0
c3:
 Added the <a href="../c3ref/c_dbstatus_options.html#sqlitedbstatuscachespill">SQLITE_DBSTATUS_CACHE_SPILL</a> option to <a href="../c3ref/db_status.html">sqlite3_db_status()</a> for
     reporting the number of cache spills that have occurred.


c0: releaselog/3_23_0.html
c1: 3.23.0
c3:
 The "alternate-form-2" flag ("!") on the <a href="../printf.html">built-in printf</a> implementation
     now causes string substitutions to measure the width and precision in
     characters instead of bytes.


c0: releaselog/3_23_0.html
c1: 3.23.0
c3:
 If the <a href="../vtab.html#xcolumn">xColumn</a> method in a <a href="../vtab.html">virtual table</a> implementation returns
     an error message using <a href="../c3ref/result_blob.html">sqlite3_result_error()</a> then give that error
     message preference over internally-generated messages.


c0: releaselog/3_23_0.html
c1: 3.23.0
c3:
 Added the -A command-line option to the <a href="../cli.html">CLI</a> to make it easier to manage
     <a href="../sqlar.html">SQLite Archive files</a>.


c0: releaselog/3_23_0.html
c1: 3.23.0
c3:
 Add support for INSERT OR REPLACE, INSERT OR IGNORE, and UPDATE OR REPLACE
     in the <a href="../zipfile.html">Zipfile virtual table</a>.


c0: releaselog/3_23_0.html
c1: 3.23.0
c3:
 Enhance the <a href="../session/sqlite3changeset_apply.html">sqlite3changeset_apply()</a> interface so that it is hardened
     against attacks from deliberately corrupted <a href="../sessionintro.html#changeset">changeset</a> objects.


c0: releaselog/3_23_0.html
c1: 3.23.0
c3:
 Added the <a href="https://sqlite.org/src/file/ext/misc/normalize.c">sqlite3_normalize()</a>
     extension function.


c0: releaselog/3_23_0.html
c1: 3.23.0
c3:
 Query optimizer enhancements:
<ol type="a">
  <li> Improve the <a href="../optoverview.html#omitnoopjoin">omit-left-join optimization</a> so that it works in cases where
       the right-hand table is UNIQUE but not necessarily NOT NULL.
  </li><li> Improve the <a href="../optoverview.html#pushdown">push-down optimization</a> so that it works for many LEFT JOINs.
  </li><li> Add the <a href="../optoverview.html#leftjoinreduction">LEFT JOIN strength reduction optimization</a> 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.
  </li><li> Avoid unnecessary writes to the sqlite_sequence table when an
       <a href="../autoinc.html">AUTOINCREMENT</a> table is updated with an rowid that is less than the
       maximum.
</li></ol>


c0: releaselog/3_23_0.html
c1: 3.23.0
c3:
 Bug fixes:
<ol type="a">
  <li> Fix the parser to accept valid <a href="../rowvalue.html">row value</a> syntax.
       Ticket <a href="https://www.sqlite.org/src/info/7310e2fb3d046a5">7310e2fb3d046a5</a>
  </li><li> Fix the query planner so that it takes into account dependencies in
       the arguments to table-valued functions in subexpressions in
       the WHERE clause.
       Ticket <a href="https://www.sqlite.org/src/info/80177f0c226ff54">80177f0c226ff54</a>
  </li><li> Fix incorrect result with complex OR-connected WHERE and STAT4.
       Ticket <a href="https://www.sqlite.org/src/info/ec32177c99ccac2">ec32177c99ccac2</a>
  </li><li> Fix potential corruption in <a href="../expridx.html">indexes on expressions</a> due to automatic
       datatype conversions.
       Ticket <a href="https://www.sqlite.org/src/info/343634942dd54ab">343634942dd54ab</a>
  </li><li> Assertion fault in FTS4.
       Ticket <a href="https://www.sqlite.org/src/info/d6ec09eccf68cfc">d6ec09eccf68cfc</a>
  </li><li> Incorrect result on the less-than operator in <a href="../rowvalue.html">row values</a>.
       Ticket <a href="https://www.sqlite.org/src/info/f484b65f3d62305">f484b65f3d62305</a>
  </li><li> Always interpret non-zero floating-point values as TRUE, even if
       the integer part is zero.
       Ticket <a href="https://www.sqlite.org/src/info/36fae083b450e3a">36fae083b450e3a</a>
  </li><li> Fix an issue in the fsdir(PATH) <a href="../vtab.html#tabfunc2">table-valued function</a> to the
       <a href="https://sqlite.org/src/file/ext/misc/fileio.c">fileio.c</a> extension,
       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
       <a href="https://www.sqlite.org/src/info/7ce4e71c1b7251be">7ce4e71c1b7251be</a>
  </li><li> 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
       <a href="https://www.sqlite.org/src/info/525deb7a67fbd647">525deb7a67fbd647</a>
  </li><li> Fix the <a href="../lang_analyze.html">ANALYZE</a> command so that it computes statistics on tables
       whose names begin with "sqlite".  Check-in
       <a href="https://sqlite.org/src/info/0249d9aecf69948d">0249d9aecf69948d</a>
</li></ol>


c0: releaselog/3_23_0.html
c1: 3.23.0
c3:
 Additional fixes for issues detected by
     <a href="https://github.com/google/oss-fuzz">OSSFuzz</a>:
<ol type="a">
  <li> Fix a possible infinite loop on VACUUM for corrupt database files.
       Check-in <a href="https://www.sqlite.org/src/info/27754b74ddf64">27754b74ddf64</a>
  </li><li> Disallow <a href="../lang_expr.html#varparam">parameters</a> in the <a href="../lang_with.html">WITH clause</a> of triggers and views.
       Check-in <a href="https://www.sqlite.org/src/info/b918d4b4e546d">b918d4b4e546d</a>
  </li><li> Fix a potential memory leak in <a href="../rowvalue.html">row value</a> processing.
       Check-in <a href="https://www.sqlite.org/src/info/2df6bbf1b8ca8">2df6bbf1b8ca8</a>
  </li><li> Improve the performance of the <a href="../lang_corefunc.html#replace">replace() SQL function</a> for cases where
       there are many substitutions on megabyte-sized strings, in an attempt
       to avoid OSSFuzz timeouts during testing.
       Check-in <a href="https://www.sqlite.org/src/info/fab2c2b07b5d3">fab2c2b07b5d3</a>
  </li><li> 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
       <a href="https://www.sqlite.org/src/info/d75e67654aa96">d75e67654aa96</a>
  </li><li> Incorrect assert() statement removed. Check-in
       <a href="https://www.sqlite.org/src/info/823779d31eb09cda">823779d31eb09cda</a>.
  </li><li> Fix a problem with using the <a href="../optoverview.html#like_opt">LIKE optimization</a> on an
       <a href="../lang_createtable.html#rowid">INTEGER PRIMARY KEY</a>.  Check-in
       <a href="https://www.sqlite.org/src/info/b850dd159918af56">b850dd159918af56</a>.
</li></ol>


c0: releaselog/3_23_0.html
c1: 3.23.0
c3:
SQLITE_SOURCE_ID: "2018-04-02 11:04:16 736b53f57f70b23172c30880186dce7ad9baa3b74e3838cae5847cffb98f5cd2"


c0: releaselog/3_22_0.html
c1: 3.22.0
c3:
 The output of <a href="../c3ref/trace_v2.html">sqlite3_trace_v2()</a> now shows each individual SQL statement
     run within a trigger.


c0: releaselog/3_22_0.html
c1: 3.22.0
c3:
 Add the ability to read from <a href="../wal.html">WAL mode</a> 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.


c0: releaselog/3_22_0.html
c1: 3.22.0
c3:
 Added the <a href="../rtree.html#rtreecheck">rtreecheck()</a> scalar SQL function to the <a href="../rtree.html">R-Tree extension</a>.


c0: releaselog/3_22_0.html
c1: 3.22.0
c3:
 Added the <a href="../c3ref/vtab_nochange.html">sqlite3_vtab_nochange()</a> and <a href="../c3ref/value_blob.html">sqlite3_value_nochange()</a> interfaces
     to help virtual table implementations optimize UPDATE operations.


c0: releaselog/3_22_0.html
c1: 3.22.0
c3:
 New extensions:
<ol type="a">
  <li> The <a href="../zipfile.html">Zipfile virtual table</a> can read and write a
       <a href="https://en.wikipedia.org/wiki/Zip_(file_format)">ZIP Archive</a>.
  </li><li> Added the fsdir(PATH) <a href="../vtab.html#tabfunc2">table-valued function</a> to the
       <a href="https://sqlite.org/src/file/ext/misc/fileio.c">fileio.c</a> extension,
       for listing the files in a directory.
  </li><li> The <a href="https://sqlite.org/src/file/ext/misc/btreeinfo.c">sqlite_btreeinfo</a>
       eponymous virtual table for introspecting and estimating the sizes of
       the btrees in a database.
  </li><li> The <a href="https://sqlite.org/src/file/ext/misc/appendvfs.c">Append VFS</a> is a
       <a href="../vfs.html#shim">VFS shim</a> 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.
</li></ol>


c0: releaselog/3_22_0.html
c1: 3.22.0
c3:
 Query planner enhancements:
<ol type="a">
  <li> The optimization that uses an index to quickly compute an
       aggregate min() or max() is extended to work with
       <a href="../expridx.html">indexes on expressions</a>.
  </li><li> The decision of whether to implement a FROM-clause subquery
       as a co-routine or using <a href="../optoverview.html#flattening">query flattening</a>
       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.
  </li><li> The planner avoids query plans that use indexes with unknown
       collating functions.
  </li><li> The planner omits unused LEFT JOINs even if they are not the
       right-most joins of a query.
</li></ol>


c0: releaselog/3_22_0.html
c1: 3.22.0
c3:
 Other performance optimizations:
<ol type="a">
  <li> A smaller and faster implementation of text to floating-point
       conversion subroutine: sqlite3AtoF().
  </li><li> The <a href="../lemon.html">Lemon parser generator</a> creates a faster parser.
  </li><li> Use the strcspn() C-library routine to speed up the LIKE and
       GLOB operators.
</li></ol>


c0: releaselog/3_22_0.html
c1: 3.22.0
c3:
 Improvements to the <a href="../cli.html">command-line shell</a>:
<ol type="a">
  <li> The ".schema" command shows the structure of virtual tables.
  </li><li> Added support for reading and writing
       <a href="../sqlar.html">SQLite Archive</a> files using
       the <a href="../cli.html#sqlar">.archive command</a>.
  </li><li> Added the experimental <a href="../cli.html#expert">.expert command</a>
  </li><li> Added the ".eqp trigger" variant of the ".eqp" command
  </li><li> Enhance the ".lint fkey-indexes" command so that it works with
       <a href="../withoutrowid.html">WITHOUT ROWID</a> tables.
  </li><li> 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 <a href="../zipfile.html">Zipfile virtual table</a>.
  </li><li> Added the <a href="../cli.html#editfunc">edit() SQL function</a>.
  </li><li> Added the <a href="../cli.html#exexcel*">.excel command</a> to simplify exporting
       database content to a spreadsheet.
  </li><li> Databases are opened using
       <a href="https://sqlite.org/src/file/ext/misc/appendvfs.c">Append VFS</a> when
       the --append flag is used on the command line or with the
       .open command.
</li></ol>


c0: releaselog/3_22_0.html
c1: 3.22.0
c3:
 Enhance the <a href="../compile.html#enable_update_delete_limit">SQLITE_ENABLE_UPDATE_DELETE_LIMIT</a> compile-time option so
     that it works for <a href="../withoutrowid.html">WITHOUT ROWID</a> tables.


c0: releaselog/3_22_0.html
c1: 3.22.0
c3:
 Provide the <a href="../lang_corefunc.html#sqlite_offset">sqlite_offset(X)</a> SQL function that returns
     the byte offset into the database file to the beginning of the record
     holding value X, when compiling with <a href="../compile.html#enable_offset_sql_func">-DSQLITE_ENABLE_OFFSET_SQL_FUNC</a>.


c0: releaselog/3_22_0.html
c1: 3.22.0
c3:
 Bug fixes:
<ol type="a">
  <li> 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
       <a href="https://www.sqlite.org/src/info/47b2581aa9bfecec">47b2581aa9bfecec</a>.
  </li><li> Incorrect query results when the skip-ahead-distinct optimization is
       used.
       Ticket <a href="https://sqlite.org/src/info/ef9318757b152e3a">ef9318757b152e3a</a>.
  </li><li> Incorrect query results on a join with a ORDER BY DESC.  Ticket
       <a href="https://sqlite.org/src/info/123c9ba32130a6c9">123c9ba32130a6c9</a>.
  </li><li> Inconsistent result set column names between CREATE TABLE AS
       and a simple SELECT.  Ticket
       <a href="https://sqlite.org/src/info/3b4450072511e621">3b4450072511e621</a>
  </li><li> Assertion fault when doing REPLACE on an index on an expression.
       Ticket <a href="https://sqlite.org/src/info/dc3f932f5a147771">dc3f932f5a147771</a>
  </li><li> Assertion fault when doing an IN operator on a constant index.
       Ticket <a href="https://sqlite.org/src/info/aa98619ad08ddcab">aa98619ad08ddcab</a>
</li></ol>


c0: releaselog/3_22_0.html
c1: 3.22.0
c3:
SQLITE_SOURCE_ID: "2018-01-22 18:45:57 0c55d179733b46d8d0ba4d88e01a25e10677046ee3da1d5b1581e86726f2171d"


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 Take advantage of the atomic-write capabilities in the
     <a href="https://en.wikipedia.org/wiki/F2FS">F2FS filesystem</a> when available, for
     greatly reduced transaction overhead.  This currently requires the
     <a href="../compile.html#enable_batch_atomic_write">SQLITE_ENABLE_BATCH_ATOMIC_WRITE</a> compile-time option.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 Allow <a href="../lang_attach.html">ATTACH</a> and <a href="../lang_detach.html">DETACH</a> commands to work inside of a transaction.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 Allow <a href="../vtab.html#worid">WITHOUT ROWID virtual tables</a> to be writable if the PRIMARY KEY
     contains exactly one column.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 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 <a href="../pragma.html#pragma_checkpoint_fullfsync">PRAGMA checkpoint_fullfsync</a> set on.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 The <a href="../c3ref/libversion.html">sqlite3_sourceid()</a> 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.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 Improved de-quoting of column names for <a href="../lang_createtable.html#createtabas">CREATE TABLE AS</a> statements with
     an aggregate query on the right-hand side.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 Enhanced the <a href="../optoverview.html#like_opt">LIKE optimization</a> so that it works with an <a href="../lang_expr.html#like">ESCAPE</a> clause.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 Enhanced <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a> and <a href="../pragma.html#pragma_quick_check">PRAGMA quick_check</a> 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 <a href="../fileformat2.html#record_format">records</a>.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 The query planner now prefers to implement FROM-clause subqueries using
     <a href="../optoverview.html#coroutines">co-routines</a> rather using the <a href="../optoverview.html#flattening">query flattener</a> optimization.  Support for
     the use of co-routines for subqueries may no longer be disabled.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 Pass information about !=, IS, IS NOT, NOT NULL, and IS NULL constraints
     into the <a href="../vtab.html#xbestindex">xBestIndex</a> method of virtual tables.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 Enhanced the <a href="../csv.html">CSV virtual table</a> so that it accepts the last row of
     input if the final new-line character is missing.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 Remove the rarely-used "scratch" memory allocator.  Replace it with the
     <a href="../c3ref/c_config_covering_index_scan.html#sqliteconfigsmallmalloc">SQLITE_CONFIG_SMALL_MALLOC</a> configuration setting that gives SQLite
     a hint that large memory allocations should be avoided when possible.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 Added the
     <a href="https://sqlite.org/src/file/ext/misc/unionvtab.c">swarm virtual table</a>
     to the existing union virtual table extension.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 Added the
     <a href="https://sqlite.org/src/file/src/dbpage.c">sqlite_dbpage virtual table</a>
     for providing direct access to pages
     of the database file.  The source code is built into the <a href="../amalgamation.html">amalgamation</a> and
     is activated using the <a href="../compile.html#enable_dbpage_vtab">-DSQLITE_ENABLE_DBPAGE_VTAB</a> compile-time option.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 Add a new type of fts5vocab virtual table - "instance" - that provides
     direct access to an FTS5 full-text index at the lowest possible level.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 Remove a call to rand_s() in the Windows VFS since it was causing problems
     in Firefox on some older laptops.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 The <a href="https://sqlite.org/src/finfo?name=src/shell.c">src/shell.c</a> source code
     to the <a href="../cli.html">command-line shell</a> is no longer under version control.  That file
     is now generated as part of the build process.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 Miscellaneous <a href="../cpu.html#microopt">microoptimizations</a> reduce CPU usage by about 2.1%.


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
 Bug fixes:
<ol type="a">
  <li> Fix a faulty assert() statement discovered by OSSFuzz.
       Ticket <a href="https://sqlite.org/src/info/cb91bf4290c211d">cb91bf4290c211d</a>
  </li><li> Fix an obscure memory leak in <a href="../c3ref/result_blob.html">sqlite3_result_pointer()</a>.
       Ticket <a href="https://sqlite.org/src/info/7486aa54b968e9b">7486aa54b968e9b</a>
  </li><li> Avoid a possible use-after-free error by deferring schema resets until
       after the query planner has finished running.
       Ticket <a href="https://sqlite.org/src/info/be436a7f4587ce5">be436a7f4587ce5</a>
  </li><li> Only use indexes-on-expressions to optimize ORDER BY or GROUP BY if
       the COLLATE is correct.
       Ticket <a href="https://sqlite.org/src/info/e20dd54ab0e4383">e20dd54ab0e4383</a>
  </li><li> Fix an assertion fault that was coming up when the expression in an
       index-on-expressions is really a constant.
       Ticket <a href="https://sqlite.org/src/info/aa98619ad08ddca">aa98619ad08ddca</a>
  </li><li> Fix an assertion fault that could occur following
       <a href="../pragma.html#pragma_reverse_unordered_selects">PRAGMA reverse_unordered_selects</a>.
       Ticket <a href="https://sqlite.org/src/info/cb91bf4290c211d">cb91bf4290c211d</a>
  </li><li> Fix a segfault that can occur for queries that use table-valued functions
       in an IN or EXISTS subquery.
       Ticket <a href="https://sqlite.org/src/info/b899b6042f97f5">b899b6042f97f5</a>
  </li><li> Fix a potential integer overflow problem when compiling a particular
       horrendous common table expression.  This was another problem discovered
       by OSSFuzz.  Check-in <a href="https://sqlite.org/src/info/6ee8cb6ae5">6ee8cb6ae5</a>.
  </li><li> Fix a potential out-of-bound read when querying a corrupt database file,
       a problem detected by Natalie Silvanovich of Google Project Zero.
       Check-in <a href="https://sqlite.org/src/info/04925dee41a21f">04925dee41a21f</a>.
</li></ol>


c0: releaselog/3_21_0.html
c1: 3.21.0
c3:
SQLITE_SOURCE_ID: "2017-10-24 18:55:49 1a584e499906b5c87ec7d43d4abce641fdf017c42125b083109bc77c4de48827"


c0: releaselog/3_20_1.html
c1: 3.20.1
c3:
 Fix a potential memory leak in the new <a href="../c3ref/result_blob.html">sqlite3_result_pointer()</a> interface.
     Ticket <a href="https://sqlite.org/src/info/7486aa54b968e9b5">7486aa54b968e9b5</a>.


c0: releaselog/3_20_1.html
c1: 3.20.1
c3:
SQLITE_SOURCE_ID: "2017-08-24 16:21:36 8d3a7ea6c5690d6b7c3767558f4f01b511c55463e3f9e64506801fe9b74dce34"


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Update the text of error messages returned by <a href="../c3ref/errcode.html">sqlite3_errmsg()</a> for some
     error codes.


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Backwards-incompatible changes to some extensions in order to take
     advantage of the improved security offered by the new
     <a href="../bindptr.html">pointer passing interfaces</a>:
     <ol type="a">
     <li> <a href="../fts5.html#extending_fts5">Extending FTS5</a> &rarr; requires <a href="../c3ref/bind_blob.html">sqlite3_bind_pointer()</a> to find
          the fts5_api pointer.
     </li><li> <a href="../carray.html">carray(PTR,N)</a> &rarr; requires <a href="../c3ref/bind_blob.html">sqlite3_bind_pointer()</a> to set the PTR parameter.
     </li><li> <a href="https://www.sqlite.org/src/file/ext/misc/remember.c">remember(V,PTR)</a>
          &rarr; requires <a href="../c3ref/bind_blob.html">sqlite3_bind_pointer()</a> to set the PTR parameter.
     </li></ol>


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Added the <a href="../completion.html">COMPLETION extension</a> - designed to suggest
     tab-completions for interactive user interfaces.  This is a work in progress.
     Expect further enhancements in future releases.


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 The built-in <a href="../lang_datefunc.html">date and time functions</a> have been enhanced so that they can be
     used in <a href="../lang_createtable.html#ckconst">CHECK constraints</a>, in <a href="../expridx.html">indexes on expressions</a>, and in the WHERE clauses
     of <a href="../partialindex.html">partial indexes</a>, provided that they do not use the 'now', 'localtime', or
     'utc' keywords.  <a href="../deterministic.html#dtexception">More information</a>.


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Added the <a href="../c3ref/prepare.html">sqlite3_prepare_v3()</a> and <a href="../c3ref/prepare.html">sqlite3_prepare16_v3()</a> interfaces
     with the extra "prepFlags" parameters.


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Provide the <a href="../c3ref/c_prepare_normalize.html#sqlitepreparepersistent">SQLITE_PREPARE_PERSISTENT</a> flag for <a href="../c3ref/prepare.html">sqlite3_prepare_v3()</a> and
     use it to limit <a href="../malloc.html#lookaside">lookaside memory</a> misuse by <a href="../fts3.html">FTS3</a>, <a href="../fts5.html">FTS5</a>, and the
     <a href="../rtree.html">R-Tree extension</a>.


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Added the <a href="../pragma.html#pragma_secure_delete">PRAGMA secure_delete=FAST</a> 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 <a href="../fileformat2.html#freelist">free-page list</a> but will be purged from all b-tree pages.


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Enhancements to the <a href="../cli.html">command-line shell</a>:
<ol type="a">
  <li> Add support for tab-completion using the <a href="../completion.html">COMPLETION extension</a>, for
       both readline and linenoise.
  </li><li> Add the ".cd" command.
  </li><li> Enhance the "<a href="../cli.html#dschema">.schema</a>" command to show the schema of all attached
       databases.
  </li><li> Enhance "<a href="../cli.html#dtables">.tables</a>" so that it shows the schema names for all attached
       if the name is anything other than "main".
  </li><li> The "<a href="../cli.html#csv">.import</a>" command ignores an initial UTF-8 BOM.
  </li><li> Added the "--newlines" option to the "<a href="../cli.html#dump">.dump</a>" command to cause U+000a and
       U+000d characters to be output literally rather than escaped using the
       <a href="../lang_corefunc.html#replace">replace()</a> function.
</li></ol>


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Query planner enhancements:
<ol type="a">
  <li> 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.
  </li><li> The query planner examines the values of bound parameters to help
       determine if a partial index is usable.
  </li><li> When deciding between two plans with the same estimated cost, bias
       the selection toward the one that does not use the sorter.
  </li><li> Evaluate WHERE clause constraints involving correlated subqueries
       last, in the hope that they never have be evaluated at all.
  </li><li> Do not use the <a href="../optoverview.html#flattening">flattening optimization</a> for a sub-query on the RHS
       of a LEFT JOIN if that subquery reads data from a <a href="../vtab.html">virtual table</a> as
       doing so prevents the query planner from creating <a href="../optoverview.html#autoindex">automatic indexes</a>
       on the results of the sub-query, which can slow down the query.
</li></ol>


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Add <a href="../c3ref/c_stmtstatus_counter.html#sqlitestmtstatusreprepare">SQLITE_STMTSTATUS_REPREPARE</a>, <a href="../c3ref/c_stmtstatus_counter.html#sqlitestmtstatusrun">SQLITE_STMTSTATUS_RUN</a>,
     and <a href="../c3ref/c_stmtstatus_counter.html#sqlitestmtstatusmemused">SQLITE_STMTSTATUS_MEMUSED</a> options for the
     <a href="../c3ref/stmt_status.html">sqlite3_stmt_status()</a> interface.


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Provide <a href="../pragma.html#pragfunc">PRAGMA functions</a> for
     <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a>, <a href="../pragma.html#pragma_quick_check">PRAGMA quick_check</a>, and
     <a href="../pragma.html#pragma_foreign_key_check">PRAGMA foreign_key_check</a>.


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Add the -withoutnulls option to the <a href="../tclsqlite.html#eval">TCL interface eval method</a>.


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Enhance the <a href="../sqlanalyze.html">sqlite3_analyzer.exe</a> utility program so that it shows
     the number of bytes of metadata on btree pages.


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 The <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigenableqpsg">SQLITE_DBCONFIG_ENABLE_QPSG</a> run-time option and the
     <a href="../compile.html#enable_qpsg">SQLITE_ENABLE_QPSG</a> compile-time option enable the
     <a href="../queryplanner-ng.html#qpstab">query planner stability guarantee</a>.  See also ticket
     <a href="https://www.sqlite.org/src/info/892fc34f173e99d8">892fc34f173e99d8</a>


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Miscellaneous optimizations result in a 2% reduction in <a href="../cpu.html">CPU cycles used</a>.


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Fix the behavior of <a href="../c3ref/column_name.html">sqlite3_column_name()</a> for queries that use the
     <a href="../optoverview.html#flattening">flattening optimization</a> so that the result is consistent with other
     queries that do not use that optimization, and with PostgreSQL, MySQL,
     and SQLServer.  Ticket <a href="https://sqlite.org/src/info/de3403bf5ae">de3403bf5ae</a>.


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Fix the query planner so that it knows not to use <a href="../optoverview.html#autoindex">automatic indexes</a>
     on the right table of LEFT JOIN if the WHERE clause uses the <a href="../lang_expr.html#isisnot">IS operator</a>.
     Fix for <a href="https://sqlite.org/src/info/ce68383bf6aba">ce68383bf6aba</a>.


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Ensure that the query planner knows that any column of a
     <a href="../optoverview.html#flattening">flattened</a> LEFT JOIN can be NULL even
     if that column is labeled with "NOT NULL". Fix for ticket
     <a href="https://sqlite.org/src/info/892fc34f173e99d8">892fc34f173e99d8</a>.


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Fix rare false-positives in <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a> when run on a database connection
     with <a href="../lang_attach.html">attached databases</a>. Ticket
     <a href="https://sqlite.org/src/info/a4e06e75a9ab61a12">a4e06e75a9ab61a12</a>


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
 Fix a bug (discovered by OSSFuzz) that causes an assertion fault if certain
     dodgy CREATE TABLE declarations are used.  Ticket
     <a href="https://sqlite.org/src/info/bc115541132dad136">bc115541132dad136</a>


c0: releaselog/3_20_0.html
c1: 3.20.0
c3:
SQLITE_SOURCE_ID: "2017-08-01 13:24:15 9501e22dfeebdcefa783575e47c60b514d7c2e0cad73b2a496c0bc4b680900a8"


c0: releaselog/3_19_3.html
c1: 3.19.3
c3:
Fix a bug associated with <a href="../pragma.html#pragma_auto_vacuum">auto_vacuum</a> that can lead to database
    corruption.  The bug was introduced in <a href="../releaselog/3_16_0.html">version 3.16.0</a> (2017-01-02).
    Ticket <a href="https://sqlite.org/src/info/fda22108">fda22108</a>.


c0: releaselog/3_19_3.html
c1: 3.19.3
c3:
SQLITE_SOURCE_ID: "2017-06-08 14:26:16 0ee482a1e0eae22e08edc8978c9733a96603d4509645f348ebf55b579e89636b"


c0: releaselog/3_19_2.html
c1: 3.19.2
c3:
Fix more bugs in the LEFT JOIN <a href="../optoverview.html#flattening">flattening optimization</a>. Ticket
    <a href="https://www.sqlite.org/src/info/7fde638e94287d2c">7fde638e94287d2c</a>.


c0: releaselog/3_19_2.html
c1: 3.19.2
c3:
SQLITE_SOURCE_ID: "2017-05-25 16:50:27 edb4e819b0c058c7d74d27ebd14cc5ceb2bad6a6144a486a970182b7afe3f8b9"


c0: releaselog/3_19_1.html
c1: 3.19.1
c3:
Fix a bug in the LEFT JOIN <a href="../optoverview.html#flattening">flattening optimization</a>. Ticket
    <a href="https://www.sqlite.org/src/info/cad1ab4cb7b0fc">cad1ab4cb7b0fc</a>.


c0: releaselog/3_19_1.html
c1: 3.19.1
c3:
SQLITE_SOURCE_ID: "2017-05-24 13:08:33 f6d7b988f40217821a382bc298180e9e6794f3ed79a83c6ef5cae048989b3f86"


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 The <a href="../c3ref/c_alter_table.html">SQLITE_READ</a> <a href="../c3ref/set_authorizer.html">authorizer callback</a> 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.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 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
     the expression.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 Enhance the <a href="../optoverview.html#flattening">flattening optimization</a> so that it is able to flatten views
     on the right-hand side of a LEFT JOIN.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 Use <a href="../lang_corefunc.html#replace">replace()</a> instead of <a href="../lang_corefunc.html#char">char()</a> for escaping newline and carriage-return
     characters embedded in strings in the .dump output from the <a href="../cli.html">command-line shell</a>.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 Avoid unnecessary foreign key processing in UPDATE statements that do not
     touch the columns that are constrained by the foreign keys.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 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.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 Avoid unnecessary invalidation of <a href="../c3ref/blob.html">sqlite3_blob</a> handles when making
     changes to unrelated tables.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 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.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 Reuse the same materialization of a VIEW if that VIEW appears more than
     once in the same query.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 Enhance <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a> so that it identifies tables that have two
     or more rows with the same <a href="../lang_createtable.html#rowid">rowid</a>.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 Enhance the <a href="../fts5.html">FTS5</a> query syntax so that <a href="../fts5.html#fts5_column_filters">column filters</a>
     may be applied to arbitrary expressions.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 Enhance the <a href="../json1.html#jex">json_extract()</a> function to cache and reuse parses of JSON
     input text.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 Added the <a href="https://sqlite.org/src/file/ext/misc/anycollseq.c">anycollseq.c</a>
     <a href="../loadext.html">loadable extension</a> that allows a generic SQLite database connection to
     read a schema that contains unknown and/or
     application-specific <a href="../datatype3.html#collation">collating sequences</a>.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 Fix a problem in <a href="../lang_replace.html">REPLACE</a> that can result in a corrupt database containing
     two or more rows with the same <a href="../lang_createtable.html#rowid">rowid</a>.  Fix for ticket
     <a href="https://www.sqlite.org/src/info/f68dc596c4e6018d">f68dc596c4e6018d</a>.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 Fix a problem in <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a> that was causing a subsequent
     <a href="../lang_vacuum.html">VACUUM</a> to behave suboptimally.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 Fix the <a href="../pragma.html#pragma_foreign_key_check">PRAGMA foreign_key_check</a> command so that it works correctly with
     foreign keys on <a href="../withoutrowid.html">WITHOUT ROWID</a> tables.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 Fix a bug in the b-tree logic that can result in incorrect duplicate answers
     for IN operator queries.  Ticket
     <a href="https://sqlite.org/src/info/61fe9745">61fe9745</a>


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 Disallow leading zeros in numeric constants in JSON.  Fix for ticket
     <a href="https://www.sqlite.org/src/info/b93be8729a895a528e2">b93be8729a895a528e2</a>.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 Disallow control characters inside of strings in JSON.  Fix for ticket
     <a href="https://www.sqlite.org/src/info/6c9b5514077fed34551">6c9b5514077fed34551</a>.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
 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
     <a href="https://www.sqlite.org/src/info/981329adeef51011052">981329adeef51011052</a>.


c0: releaselog/3_19_0.html
c1: 3.19.0
c3:
SQLITE_SOURCE_ID: "2017-05-22 13:58:13 28a94eb282822cad1d1420f2dad6bf65e4b8b9062eda4a0b9ee8270b2c608e40"


c0: releaselog/3_18_2.html
c1: 3.18.2
c3:
Fix a bug that might cause duplicate output rows when an IN operator is
    used in the WHERE clause.
    Ticket <a href="https://sqlite.org/src/info/61fe9745">61fe9745</a>.


c0: releaselog/3_18_2.html
c1: 3.18.2
c3:
SQLITE_SOURCE_ID: "2017-06-17 09:59:36 036ebf729e4b21035d7f4f8e35a6f705e6bf99887889e2dc14ebf2242e7930dd"


c0: releaselog/3_18_1.html
c1: 3.18.1
c3:
SQLITE_SOURCE_ID: "2017-06-16 13:41:15 77bb46233db03a3338bacf7e56f439be3dfd1926ea0c44d252eeafa7a7b31c06"


c0: releaselog/3_18_0.html
c1: 3.18.0
c3:
The SQLite version identifier returned by the <a href="../lang_corefunc.html#sqlite_source_id">sqlite_source_id()</a> SQL function
    and the <a href="../c3ref/libversion.html">sqlite3_sourceid()</a> C API and found in the <a href="../c3ref/c_source_id.html">SQLITE_SOURCE_ID</a> macro is
    now a 64-digit SHA3-256 hash instead of a 40-digit SHA1 hash.


c0: releaselog/3_18_0.html
c1: 3.18.0
c3:
Added the <a href="../json1.html#jpatch">json_patch()</a> SQL function to the <a href="../json1.html">JSON1 extension</a>.


c0: releaselog/3_18_0.html
c1: 3.18.0
c3:
Enhance the <a href="../optoverview.html#like_opt">LIKE optimization</a> 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.


c0: releaselog/3_18_0.html
c1: 3.18.0
c3:
Added the <a href="../c3ref/set_last_insert_rowid.html">sqlite3_set_last_insert_rowid()</a> interface and use the new interface in
    the <a href="../fts3.html">FTS3</a>, <a href="../fts3.html#fts4">FTS4</a>, and <a href="../fts5.html">FTS5</a> extensions to ensure that the <a href="../c3ref/last_insert_rowid.html">sqlite3_last_insert_rowid()</a>
    interface always returns reasonable values.


c0: releaselog/3_18_0.html
c1: 3.18.0
c3:
Enhance <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a> and <a href="../pragma.html#pragma_quick_check">PRAGMA quick_check</a> so that they verify
    <a href="../lang_createtable.html#ckconst">CHECK constraints</a>.


c0: releaselog/3_18_0.html
c1: 3.18.0
c3:
Enhance the query plans for joins to detect empty tables early and
    halt without doing unnecessary work.


c0: releaselog/3_18_0.html
c1: 3.18.0
c3:
Enhance the <a href="../c3ref/mprintf.html">sqlite3_mprintf()</a> family of interfaces and the <a href="../lang_corefunc.html#printf">printf SQL function</a>
    to put comma separators at the thousands marks for integers, if the "," format modifier
    is used in between the "%" and the "d" (example: "%,d").


c0: releaselog/3_18_0.html
c1: 3.18.0
c3:
Added the -D<a href="../compile.html#max_memory">SQLITE_MAX_MEMORY</a>=<i>N</i> compile-time option.


c0: releaselog/3_18_0.html
c1: 3.18.0
c3:
Added the <a href="../cli.html#sha3sum">.sha3sum dot-command</a> and the <a href="../cli.html#selftest">.selftest dot-command</a>
    to the <a href="../cli.html">command-line shell</a>


c0: releaselog/3_18_0.html
c1: 3.18.0
c3:
Begin enforcing <a href="../c3ref/c_limit_attached.html#sqlitelimitvdbeop">SQLITE_LIMIT_VDBE_OP</a>. This can be used, for example, to prevent
    excessively large prepared statements in systems that accept SQL queries from
    untrusted users.


c0: releaselog/3_18_0.html
c1: 3.18.0
c3:
Ensure that indexed expressions with collating sequences are handled correctly.
    Fix for ticket <a href="https://www.sqlite.org/src/info/eb703ba7b50c1a5">eb703ba7b50c1a5</a>.


c0: releaselog/3_18_0.html
c1: 3.18.0
c3:
Fix a bug in the 'start of ...' modifiers for the <a href="../lang_datefunc.html">date and time functions</a>.
    Ticket <a href="https://www.sqlite.org/src/info/6097cb92745327a1">6097cb92745327a1</a>


c0: releaselog/3_18_0.html
c1: 3.18.0
c3:
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
    version 3.15.0.
    Ticket <a href="https://www.sqlite.org/src/info/06796225f59c057c">06796225f59c057c</a>


c0: releaselog/3_18_0.html
c1: 3.18.0
c3:
In the <a href="../rbu.html">RBU extension</a>, add extra sync operations to avoid the possibility of
    corruption following a power failure.


c0: releaselog/3_18_0.html
c1: 3.18.0
c3:
The <a href="../c3ref/trace_v2.html">sqlite3_trace_v2()</a> output for nested SQL statements should always begin
    with a "--" comment marker.


c0: releaselog/3_18_0.html
c1: 3.18.0
c3:
SQLITE_SOURCE_ID: "2017-03-28 18:48:43 424a0d380332858ee55bdebc4af3789f74e70a2b3ba1cf29d84b9b4bcf3e2e37"


c0: releaselog/3_17_0.html
c1: 3.17.0
c3:
Approximately 25% better performance from the <a href="../rtree.html">R-Tree extension</a>.
    <ol type="a">
    <li> Uses compiler built-ins (ex: __builtin_bswap32() or _byteswap_ulong())
         for byteswapping when available.
    </li><li> Uses the <a href="../c3ref/blob.html">sqlite3_blob</a> key/value access object instead of SQL
         for pulling content out of R-Tree nodes
    </li><li> Other miscellaneous enhancements such as loop unrolling.
    </li></ol>


c0: releaselog/3_17_0.html
c1: 3.17.0
c3:
Add the <a href="../compile.html#default_lookaside">SQLITE_DEFAULT_LOOKASIDE</a> compile-time option.


c0: releaselog/3_17_0.html
c1: 3.17.0
c3:
Increase the default <a href="../malloc.html#lookaside">lookaside</a>
    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.


c0: releaselog/3_17_0.html
c1: 3.17.0
c3:
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 <a href="../compile.html#disable_intrinsic">SQLITE_DISABLE_INTRINSIC</a> compile-time
    option.)


c0: releaselog/3_17_0.html
c1: 3.17.0
c3:
Added the <a href="../compile.html#enable_null_trim">SQLITE_ENABLE_NULL_TRIM</a> 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.


c0: releaselog/3_17_0.html
c1: 3.17.0
c3:
Change <a href="../compile.html#default_pcache_initsz">SQLITE_DEFAULT_PCACHE_INITSZ</a> from 100 to 20, for
    improved performance.


c0: releaselog/3_17_0.html
c1: 3.17.0
c3:
Perform some <a href="../lang_update.html">UPDATE</a> operations in a single pass instead of
    in two passes.


c0: releaselog/3_17_0.html
c1: 3.17.0
c3:
Enhance the <a href="../sessionintro.html">session extension</a> to support <a href="../withoutrowid.html">WITHOUT ROWID</a>
    tables.


c0: releaselog/3_17_0.html
c1: 3.17.0
c3:
Fixed performance problems and potential stack overflows
    when creating <a href="../lang_createview.html">views</a> from multi-row VALUES clauses with
    hundreds of thousands of rows.


c0: releaselog/3_17_0.html
c1: 3.17.0
c3:
In the <a href="../cli.html">command-line shell</a>, enhance the ".mode" command so that it
    restores the default column and row separators for modes "line",
    "list", "column", and "tcl".


c0: releaselog/3_17_0.html
c1: 3.17.0
c3:
Enhance the <a href="../compile.html#direct_overflow_read">SQLITE_DIRECT_OVERFLOW_READ</a> option so that it works
    in <a href="../wal.html">WAL mode</a> as long as the pages being read are not in the WAL file.


c0: releaselog/3_17_0.html
c1: 3.17.0
c3:
Enhance the
    <a href="../lemon.html">Lemon parser generator</a>
    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
    the <a href="../amalgamation.html">amalgamation</a>.


c0: releaselog/3_17_0.html
c1: 3.17.0
c3:
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
    <a href="https://www.sqlite.org/src/info/25e335f802dd">25e335f802dd</a>.


c0: releaselog/3_17_0.html
c1: 3.17.0
c3:
Use the correct affinity for columns of automatic indexes. Ticket
    <a href="https://www.sqlite.org/src/info/7ffd1ca1d2ad4ec">7ffd1ca1d2ad4ec</a>.


c0: releaselog/3_17_0.html
c1: 3.17.0
c3:
Ensure that the <a href="../c3ref/blob_reopen.html">sqlite3_blob_reopen()</a> interface can correctly
    handle short rows.  Fix for ticket
    <a href="https://www.sqlite.org/src/info/e6e962d6b0f06f46e">e6e962d6b0f06f46e</a>.


c0: releaselog/3_16_2.html
c1: 3.16.2
c3:
Fix the <a href="../lang_replace.html">REPLACE</a> statement for
    <a href="../withoutrowid.html">WITHOUT ROWID</a> tables that lack secondary indexes so that
    it works correctly with triggers and foreign keys.  This was a new bug
    caused by performance optimizations added in version 3.16.0.
    Ticket <a href="https://www.sqlite.org/src/info/30027b613b4">30027b613b4</a>


c0: releaselog/3_16_2.html
c1: 3.16.2
c3:
Fix the <a href="../c3ref/value_blob.html">sqlite3_value_text()</a> interface so that it correctly
    translates content generated by <a href="../lang_corefunc.html#zeroblob">zeroblob()</a> into a string of all
    0x00 characters.  This is a long-standing issue discovered after the
    3.16.1 release by <a href="https://github.com/google/oss-fuzz">OSS-Fuzz</a>


c0: releaselog/3_16_2.html
c1: 3.16.2
c3:
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
    <a href="https://www.sqlite.org/src/info/190c2507">190c2507</a>.


c0: releaselog/3_16_2.html
c1: 3.16.2
c3:
Adjust the <a href="../c3ref/column_count.html">sqlite3_column_count()</a> API so it more often returns the same
    values for <a href="../pragma.html#syntax">PRAGMA</a> statements as it did in prior releases, to
    minimize disruption to applications that might be using that
    interface in unexpected ways.


c0: releaselog/3_16_1.html
c1: 3.16.1
c3:
Fix a bug concerning the use of <a href="../rowvalue.html">row values</a> within <a href="../lang_createtrigger.html">triggers</a>
    (see ticket <a href="https://www.sqlite.org/src/info/8c9458e7">8c9458e7</a>)
    that was in version 3.15.0 but was not reported until moments after the 3.16.0
    release was published.


c0: releaselog/3_16_0.html
c1: 3.16.0
c3:
Uses 9% fewer CPU cycles. (See the <a href="../cpu.html">CPU performance measurement</a> report for
    details on how this performance increase was computed.)


c0: releaselog/3_16_0.html
c1: 3.16.0
c3:
Added the <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfignockptonclose">SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE</a> option to <a href="../c3ref/db_config.html">sqlite3_db_config()</a>.


c0: releaselog/3_16_0.html
c1: 3.16.0
c3:
Enhance the <a href="../lang_datefunc.html">date and time functions</a> so that the 'unixepoch' modifier works
    for the full span of supported dates.


c0: releaselog/3_16_0.html
c1: 3.16.0
c3:
Changed the default configuration of the <a href="../malloc.html#lookaside">lookaside memory allocator</a> from
    500 slots of 128 bytes each into 125 slots of 512 bytes each.


c0: releaselog/3_16_0.html
c1: 3.16.0
c3:
Enhanced "WHERE x NOT NULL" <a href="../partialindex.html">partial indexes</a> so that they are usable if
    the "x" column appears in a LIKE or GLOB operator.


c0: releaselog/3_16_0.html
c1: 3.16.0
c3:
Enhanced <a href="../c3ref/interrupt.html">sqlite3_interrupt()</a> so that it interrupts <a href="../wal.html#ckpt">checkpoint</a> operations that
    are in process.


c0: releaselog/3_16_0.html
c1: 3.16.0
c3:
Enhanced the <a href="../lang_expr.html#like">LIKE</a> and <a href="../lang_expr.html#glob">GLOB</a> matching algorithm to be faster
    for cases when the pattern contains multiple wildcards.


c0: releaselog/3_16_0.html
c1: 3.16.0
c3:
Added the <a href="../c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlwin32gethandle">SQLITE_FCNTL_WIN32_GET_HANDLE</a> file control opcode.


c0: releaselog/3_16_0.html
c1: 3.16.0
c3:
Added the <a href="../imposter.html#dotimposter">.imposter dot-command</a> to the <a href="../cli.html">command-line shell</a>.


c0: releaselog/3_16_0.html
c1: 3.16.0
c3:
Added the <a href="https://www.sqlite.org/src/file/ext/misc/remember.c">remember(V,PTR)</a>
    SQL function as a <a href="../loadext.html">loadable extension</a>.


c0: releaselog/3_16_0.html
c1: 3.16.0
c3:
Rename the <a href="../compile.html#omit_builtin_test">SQLITE_OMIT_BUILTIN_TEST</a> compile-time option to
    <a href="../compile.html#untestable">SQLITE_UNTESTABLE</a> to better reflect the implications of using it.


c0: releaselog/3_16_0.html
c1: 3.16.0
c3:
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
    <a href="https://www.sqlite.org/src/info/2df0107b">2df0107b</a>.


c0: releaselog/3_15_2.html
c1: 3.15.2
c3:
 Multiple bug fixes to the <a href="../rowvalue.html">row value</a> logic that was introduced in version 3.15.0.


c0: releaselog/3_15_2.html
c1: 3.15.2
c3:
 Fix a NULL pointer dereference in ATTACH/DETACH following a maliciously constructed
     syntax error.  Ticket
     <a href="https://www.sqlite.org/src/info/2f1b168ab4d4844">2f1b168ab4d4844</a>.


c0: releaselog/3_15_2.html
c1: 3.15.2
c3:
 Fix a crash that can occur following an out-of-memory condition
     in the built-in <a href="../lang_corefunc.html#instr">instr()</a> function.


c0: releaselog/3_15_2.html
c1: 3.15.2
c3:
 In the <a href="../json1.html">JSON extension</a>, fix the JSON validator so that it correctly rejects
     invalid backslash escapes within strings.


c0: releaselog/3_15_1.html
c1: 3.15.1
c3:
 Added <a href="../c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlwin32gethandle">SQLITE_FCNTL_WIN32_GET_HANDLE</a> file control opcode.


c0: releaselog/3_15_1.html
c1: 3.15.1
c3:
 Fix the <a href="../lang_vacuum.html">VACUUM</a> 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
     version 3.15.0.


c0: releaselog/3_15_1.html
c1: 3.15.1
c3:
 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
     <a href="https://www.sqlite.org/src/info/34a579141b2c5ac">34a579141b2c5ac</a>.


c0: releaselog/3_15_1.html
c1: 3.15.1
c3:
 Fix a case where the use of <a href="../rowvalue.html">row values</a> in the ON clause of a LEFT JOIN
     might cause incorrect results.  Ticket
     <a href="https://www.sqlite.org/src/info/fef4bb4bd9185ec8f">fef4bb4bd9185ec8f</a>.


c0: releaselog/3_15_0.html
c1: 3.15.0
c3:
 Allow <a href="../deterministic.html">deterministic SQL functions</a> in the WHERE clause of a <a href="../partialindex.html">partial index</a>.


c0: releaselog/3_15_0.html
c1: 3.15.0
c3:
 Added the "<a href="../uri.html#urimodeof">modeof=<i>filename</i></a>" URI parameter on the unix VFS


c0: releaselog/3_15_0.html
c1: 3.15.0
c3:
 Added support for <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigmaindbname">SQLITE_DBCONFIG_MAINDBNAME</a>.


c0: releaselog/3_15_0.html
c1: 3.15.0
c3:
 Added the ability to <a href="../lang_vacuum.html">VACUUM</a> an <a href="../lang_attach.html">ATTACH-ed</a> database.


c0: releaselog/3_15_0.html
c1: 3.15.0
c3:
 Enhancements to the <a href="../cli.html">command-line shell</a>:
     <ol type="a">
     <li> Add the ".testcase" and ".check" <a href="../cli.html#dotcmd">dot-commands</a>.
     </li><li> Added the --new option to the ".open" dot-command, causing
          any prior content in the database to be purged prior to
          opening.
     </li></ol>


c0: releaselog/3_15_0.html
c1: 3.15.0
c3:
 Enhance the <a href="../fts5.html#the_fts5vocab_virtual_table_module">fts5vocab</a> virtual table to handle "ORDER BY term" efficiently.


c0: releaselog/3_15_0.html
c1: 3.15.0
c3:
 Miscellaneous micro-optimizations reduce CPU usage by more than 7%
     on common workloads.  Most optimization in this release has been on the
     front-end (<a href="../c3ref/prepare.html">sqlite3_prepare_v2()</a>).


c0: releaselog/3_15_0.html
c1: 3.15.0
c3:
 The multiply operator now correctly detects 64-bit integer overflow
     and promotes to floating point in all corner-cases.  Fix for ticket
     <a href="https://www.sqlite.org/src/info/1ec41379c9c1e400">1ec41379c9c1e400</a>.


c0: releaselog/3_15_0.html
c1: 3.15.0
c3:
 Correct handling of columns with redundant unique indexes when those
     columns are used on the LHS of an <a href="../lang_expr.html#in_op">IN operator</a>.  Fix for ticket
     <a href="https://www.sqlite.org/src/info/0eab1ac759">0eab1ac759</a>.


c0: releaselog/3_15_0.html
c1: 3.15.0
c3:
 Skip NULL entries on range queries in <a href="../expridx.html">indexes on expressions</a>.
     Fix for ticket
     <a href="https://www.sqlite.org/src/tktview/4baa46491212947">4baa46491212947</a>.


c0: releaselog/3_15_0.html
c1: 3.15.0
c3:
 Ensure that the <a href="../autoinc.html">AUTOINCREMENT</a> counters in the sqlite_sequence
     table are initialized doing "Xfer Optimization" on "INSERT ... SELECT"
     statements.  Fix for ticket
     <a href="https://www.sqlite.org/src/info/7b3328086a5c116c">7b3328086a5c116c</a>.


c0: releaselog/3_15_0.html
c1: 3.15.0
c3:
 Make sure the ORDER BY LIMIT optimization
     (from check-in <a href="https://www.sqlite.org/src/info/559733b09e9630fa">559733b09e</a>)
     works with IN operators on INTEGER PRIMARY KEYs.  Fix for ticket
     <a href="https://www.sqlite.org/src/info/96c1454cbfd9509">96c1454c</a>


c0: releaselog/3_14_2.html
c1: 3.14.2
c3:
 Fix the <a href="../c3ref/trace_v2.html">sqlite3_trace_v2()</a> interface so that it is disabled if either the
callback or the mask arguments are zero, in accordance with the documentation.


c0: releaselog/3_14_2.html
c1: 3.14.2
c3:
 Fix commenting errors and improve the comments generated on <a href="../lang_explain.html">EXPLAIN</a> listings
when the <a href="../compile.html#enable_explain_comments">-DSQLITE_ENABLE_EXPLAIN_COMMENTS</a> compile-time option is used.


c0: releaselog/3_14_2.html
c1: 3.14.2
c3:
 Fix the ".read" command in the <a href="../cli.html">command-line shell</a> so that it understands
that its input is not interactive.


c0: releaselog/3_14_2.html
c1: 3.14.2
c3:
 Correct affinity computations for a SELECT on the RHS of an IN operator.
Fix for ticket <a href="https://sqlite.org/src/info/199df4168c">199df4168c</a>.


c0: releaselog/3_14_2.html
c1: 3.14.2
c3:
 The ORDER BY LIMIT optimization is not valid unless the inner-most IN operator
loop is actually used by the query plan. Fix for
ticket <a href="https://sqlite.org/src/info/0c4df46116e90f92">0c4df46116e90f92</a>.


c0: releaselog/3_14_2.html
c1: 3.14.2
c3:
 Fix an internal code generator problem that was causing some <a href="../lang_delete.html">DELETE</a> operations
to no-op.  Ticket <a href="https://sqlite.org/src/info/ef360601">ef360601</a>


c0: releaselog/3_14_1.html
c1: 3.14.1
c3:
A performance enhancement to the page-cache "truncate" operation
    reduces <a href="../lang_transaction.html">COMMIT</a> time by dozens of milliseconds on systems with a
    large <a href="../pragma.html#pragma_cache_size">page cache</a>.


c0: releaselog/3_14.html
c1: 3.14
c3:
Improved the query planner so that the <a href="../optoverview.html#or_opt">OR optimization</a> can
    be used on <a href="../vtab.html">virtual tables</a> even if one or more of the disjuncts
    use the <a href="../lang_expr.html#like">LIKE</a>, <a href="../lang_expr.html#glob">GLOB</a>, <a href="../lang_expr.html#regexp">REGEXP</a>, <a href="../lang_expr.html#match">MATCH</a> operators.


c0: releaselog/3_14.html
c1: 3.14
c3:
Added the <a href="../csv.html">CSV virtual table</a> for reading
    <a href="https://www.ietf.org/rfc/rfc4180.txt">RFC 4180</a> formatted comma-separated
    value files.


c0: releaselog/3_14.html
c1: 3.14
c3:
Enabled <a href="../loadext.html#persist">persistent loadable extensions</a> using the new
    <a href="../rescode.html#ok_load_permanently">SQLITE_OK_LOAD_PERMANENTLY</a> return code from the extension
    entry point.


c0: releaselog/3_14.html
c1: 3.14
c3:
Added the <a href="../c3ref/c_dbstatus_options.html#sqlitedbstatuscacheusedshared">SQLITE_DBSTATUS_CACHE_USED_SHARED</a> option to <a href="../c3ref/db_status.html">sqlite3_db_status()</a>.


c0: releaselog/3_14.html
c1: 3.14
c3:
Add the
    <a href="https://www.sqlite.org/src/artifact?ci=trunk&filename=ext/misc/vfsstat.c">vfsstat.c</a>
    loadable extension - a VFS shim that measures I/O
    together with an <a href="../vtab.html#epovtab">eponymous virtual table</a> that provides access to the measurements.


c0: releaselog/3_14.html
c1: 3.14
c3:
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.


c0: releaselog/3_14.html
c1: 3.14
c3:
Enhancements to <a href="../lemon.html">Lemon parser generator</a>, so that it generates a
    faster parser.


c0: releaselog/3_14.html
c1: 3.14
c3:
The <a href="../pragma.html#pragma_compile_options">PRAGMA compile_options</a> command now attempts to show the version number
    of the compiler that generated the library.


c0: releaselog/3_14.html
c1: 3.14
c3:
Enhance <a href="../pragma.html#pragma_table_info">PRAGMA table_info</a> so that it provides information about
    <a href="../vtab.html#epovtab">eponymous virtual tables</a>.


c0: releaselog/3_14.html
c1: 3.14
c3:
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.


c0: releaselog/3_14.html
c1: 3.14
c3:
The query planner uses a full scan of a <a href="../partialindex.html">partial index</a> instead of a
    full scan of the main table, in cases where that makes sense.


c0: releaselog/3_14.html
c1: 3.14
c3:
Allow <a href="../vtab.html#tabfunc2">table-valued functions</a> to appear on the right-hand side of an <a href="../lang_expr.html#in_op">IN operator</a>.


c0: releaselog/3_14.html
c1: 3.14
c3:
Added two new C-language interfaces: <a href="../c3ref/expanded_sql.html">sqlite3_expanded_sql()</a> and
    <a href="../c3ref/trace_v2.html">sqlite3_trace_v2()</a>.  These new interfaces subsume the functions of
    <a href="../c3ref/profile.html">sqlite3_trace()</a> and <a href="../c3ref/profile.html">sqlite3_profile()</a> which are now deprecated.


c0: releaselog/3_14.html
c1: 3.14
c3:
Added the <a href="../json1.html#jquote">json_quote()</a> SQL function to <a href="../json1.html">the json1 extension</a>.


c0: releaselog/3_14.html
c1: 3.14
c3:
Disable the <a href="../c3ref/set_authorizer.html">authorizer callback</a> while reparsing the schema.


c0: releaselog/3_14.html
c1: 3.14
c3:
Added the <a href="../compile.html#enable_unknown_sql_function">SQLITE_ENABLE_UNKNOWN_SQL_FUNCTION</a> compile-time option and turned that
    option on by default when building the <a href="../cli.html">command-line shell</a>.


c0: releaselog/3_14.html
c1: 3.14
c3:
Fix the <a href="../lang_altertable.html">ALTER TABLE</a> command so that it does not corrupt <a href="../lang_createindex.html#descidx">descending indexes</a>
    when adding a column to a <a href="../pragma.html#pragma_legacy_file_format">legacy file format</a> database.  Ticket
    <a href="https://www.sqlite.org/src/info/f68bf68513a1c15f">f68bf68513a1c15f</a>


c0: releaselog/3_14.html
c1: 3.14
c3:
Fix a NULL-pointer dereference/crash that could occurs when a transitive WHERE
    clause references a non-existent collating sequence.  Ticket
    <a href="https://www.sqlite.org/src/info/e8d439c77685eca6">e8d439c77685eca6</a>.


c0: releaselog/3_14.html
c1: 3.14
c3:
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 <a href="../releaselog/3_12_0.html">version 3.12.0</a>.


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
Postpone I/O associated with TEMP files for as long as possible, with the hope
    that the I/O can ultimately be avoided completely.


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
Added the "--indent" option to the ".schema" and ".fullschema" commands of
    the <a href="../cli.html">command-line shell</a>, to turn on pretty-printing.


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
Added the ".eqp full" option to the <a href="../cli.html">command-line shell</a>, that does both <a href="../lang_explain.html">EXPLAIN</a>
    and <a href="../eqp.html">EXPLAIN QUERY PLAN</a> on each statement that is evaluated.


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
Improved resistance against goofy query planner decisions caused by
    incomplete or incorrect modifications to the <a href="../fileformat2.html#stat1tab">sqlite_stat1</a>
    table by the application.


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
Added the <a href="../c3ref/db_config.html">sqlite3_db_config</a>(db,<a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigenableloadextension">SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION</a>) interface
    which allows the <a href="../c3ref/load_extension.html">sqlite3_load_extension()</a> C-API to be enabled while keeping the
    <a href="../lang_corefunc.html#load_extension">load_extension()</a> SQL function disabled for security.


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
Change the <a href="../tempfiles.html#tempdir">temporary directory search algorithm</a> 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.


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
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
    <a href="https://www.sqlite.org/src/info/dc6ebeda9396087">dc6ebeda9396087</a>


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
Fix a possible segfault with DELETE when table is a <a href="../rowidtable.html">rowid table</a> with an
    <a href="../lang_createtable.html#rowid">INTEGER PRIMARY KEY</a> 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.
    Ticket <a href="https://www.sqlite.org/src/info/16c9801ceba49">16c9801ceba49</a>.


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
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
    <a href="https://www.sqlite.org/src/info/f7f8c97e97597">f7f8c97e97597</a>.


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
Fix a locking race condition in Windows that can occur when two or more processes
    attempt to recover the same <a href="../fileformat2.html#hotjrnl">hot journal</a> at the same time.


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
Fix a backwards compatibility problem in version 3.12.0 and 3.12.1:
    Columns declared as <tt>"INTEGER" PRIMARY KEY</tt> (with quotes around
    the datatype keyword) were not being recognized as an
    <a href="../lang_createtable.html#rowid">INTEGER PRIMARY KEY</a>, which resulted in an incompatible database file.
    Ticket <a href="https://www.sqlite.org/src/info/7d7525cb01b68">7d7525cb01b68</a>


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
Fix a bug (present since <a href="../releaselog/3_9_0.html">version 3.9.0</a>) that can cause the <a href="../lang_delete.html">DELETE</a>
    operation to miss rows if <a href="../pragma.html#pragma_reverse_unordered_selects">PRAGMA reverse_unordered_selects</a> is turned on.
    Ticket <a href="https://www.sqlite.org/src/info/a306e56ff68b8fa5">a306e56ff68b8fa5</a>


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
Fix a bug in the code generator that can cause incorrect results if
    two or more <a href="../vtab.html">virtual tables</a> are joined and the virtual table used in
    outer loop of the join has an <a href="../lang_expr.html#in_op">IN operator</a> constraint.


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
Correctly interpret negative "PRAGMA cache_size" values when determining
    the cache size used for sorting large amounts of data.


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
Fix a boundary condition error introduced by version 3.12.0
    that can result in a crash during heavy <a href="../lang_savepoint.html">SAVEPOINT</a> usage.
    Ticket <a href="https://www.sqlite.org/src/info/7f7f8026eda38">7f7f8026eda38</a>.


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
Fix <a href="../lang_createview.html">views</a> so that they inherit column datatypes from the
    table that they are defined against, when possible.


c0: releaselog/3_13_0.html
c1: 3.13.0
c3:
Fix the query planner so that IS and IS NULL operators are able
    to drive an index on a LEFT OUTER JOIN.


c0: releaselog/3_12_2.html
c1: 3.12.2
c3:
Correctly interpret negative "PRAGMA cache_size" values when determining
    the cache size used for sorting large amounts of data.


c0: releaselog/3_12_1.html
c1: 3.12.1
c3:
Fix the query planner so that IS and IS NULL operators are able
    to drive an index on a LEFT OUTER JOIN.


c0: releaselog/3_12_0.html
c1: 3.12.0
c3:
The <a href="../compile.html#default_page_size">SQLITE_DEFAULT_PAGE_SIZE</a> is increased from 1024 to 4096.
    The <a href="../compile.html#default_cache_size">SQLITE_DEFAULT_CACHE_SIZE</a> is changed from 2000 to -2000 so
    the same amount of cache memory is used by default.
    See the application note on the
    <a href="../pgszchng2016.html">version 3.12.0 page size change</a> for further information.


c0: releaselog/3_12_0.html
c1: 3.12.0
c3:
Enhancements to the <a href="../lemon.html">Lemon parser generator</a>
    so that it creates a smaller and faster SQL parser.


c0: releaselog/3_12_0.html
c1: 3.12.0
c3:
Only create <a href="../tempfiles.html#superjrnl">master journal</a> files if two or more attached databases are all
    modified, do not have <a href="../pragma.html#pragma_synchronous">PRAGMA synchronous</a> set to OFF, and
    do not have the <a href="../pragma.html#pragma_journal_mode">journal_mode</a> set to OFF, MEMORY, or WAL.


c0: releaselog/3_12_0.html
c1: 3.12.0
c3:
Only create <a href="../tempfiles.html#stmtjrnl">statement journal</a> 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 <a href="../compile.html#stmtjrnl_spill">SQLITE_STMTJRNL_SPILL</a> or at
    start-time using <a href="../c3ref/config.html">sqlite3_config</a>(<a href="../c3ref/c_config_covering_index_scan.html#sqliteconfigstmtjrnlspill">SQLITE_CONFIG_STMTJRNL_SPILL</a>).


c0: releaselog/3_12_0.html
c1: 3.12.0
c3:
The query planner is able to optimize IN operators on <a href="../vtab.html">virtual tables</a>
    even if the <a href="../vtab.html#xbestindex">xBestIndex</a> method does not set the
    sqlite3_index_constraint_usage.omit flag of the
    virtual table column to the left of the IN operator.


c0: releaselog/3_12_0.html
c1: 3.12.0
c3:
The query planner now does a better job of optimizing <a href="../vtab.html">virtual table</a>
    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.


c0: releaselog/3_12_0.html
c1: 3.12.0
c3:
More efficient handling of <a href="../appfunc.html">application-defined SQL functions</a>, especially
    in cases where the application defines hundreds or thousands of
    custom functions.


c0: releaselog/3_12_0.html
c1: 3.12.0
c3:
The configure script (on unix) automatically detects
    pread() and pwrite() and sets compile-time options to use those OS
    interfaces if they are available.


c0: releaselog/3_12_0.html
c1: 3.12.0
c3:
Added the <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigenablefts3tokenizer">SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</a> option to <a href="../c3ref/db_config.html">sqlite3_db_config()</a>
    which allows the two-argument version of the <a href="../fts3.html#f3tknzr">fts3_tokenizer()</a> SQL function to
    be enabled or disabled at run-time.


c0: releaselog/3_12_0.html
c1: 3.12.0
c3:
Added the <a href="https://www.sqlite.org/src/artifact/d7cc99350?ln=403-443">sqlite3rbu_bp_progress()</a>
    interface to the <a href="../rbu.html">RBU</a> extension.


c0: releaselog/3_12_0.html
c1: 3.12.0
c3:
The <a href="../pragma.html#pragma_defer_foreign_keys">PRAGMA defer_foreign_keys=ON</a> statement now also disables
    <a href="../foreignkeys.html#fk_actions">RESTRICT actions</a> on foreign key.


c0: releaselog/3_12_0.html
c1: 3.12.0
c3:
Added the <a href="../compile.html#default_synchronous">SQLITE_DEFAULT_SYNCHRONOUS</a> and <a href="../compile.html#default_wal_synchronous">SQLITE_DEFAULT_WAL_SYNCHRONOUS</a>
    compile-time options.  The <a href="../compile.html#default_synchronous">SQLITE_DEFAULT_SYNCHRONOUS</a> compile-time option
    replaces the <a href="../compile.html#extra_durable">SQLITE_EXTRA_DURABLE</a> option, which is no longer supported.


c0: releaselog/3_12_0.html
c1: 3.12.0
c3:
Enhanced the ".stats" command in the <a href="../cli.html">command-line shell</a> to show more
    information about I/O performance obtained from /proc, when available.


c0: releaselog/3_12_0.html
c1: 3.12.0
c3:
Make sure the <a href="../c3ref/get_auxdata.html">sqlite3_set_auxdata()</a> values from multiple triggers
    within a single statement do not interfere with one another.
    Ticket <a href="https://www.sqlite.org/src/info/dc9b1c91">dc9b1c91</a>.


c0: releaselog/3_12_0.html
c1: 3.12.0
c3:
Fix the code generator for expressions of the form "x IN (SELECT...)" where
    the SELECT statement on the RHS is a correlated subquery.
    Ticket <a href="https://www.sqlite.org/src/info/5e3c886796e5512e">5e3c886796e5512e</a>.


c0: releaselog/3_12_0.html
c1: 3.12.0
c3:
Fix a harmless TSAN warning associated with the <a href="../c3ref/db_readonly.html">sqlite3_db_readonly()</a> interface.


c0: releaselog/3_11_1.html
c1: 3.11.1
c3:
Fix an <a href="../fts5.html">FTS5</a> issue in which the 'optimize' command could cause index corruption.


c0: releaselog/3_11_1.html
c1: 3.11.1
c3:
Fix a buffer overread that might occur if <a href="../fts5.html">FTS5</a> is used to query a corrupt
    database file.


c0: releaselog/3_11_1.html
c1: 3.11.1
c3:
Increase the maximum "scope" value for the <a href="../spellfix1.html">spellfix1</a> extension from 6 to 30.


c0: releaselog/3_11_0.html
c1: 3.11.0
c3:
Enhanced <a href="../wal.html">WAL mode</a> so that it works efficiently with transactions that are
    larger than the <a href="../pragma.html#pragma_cache_size">cache_size</a>.


c0: releaselog/3_11_0.html
c1: 3.11.0
c3:
Added the "EXTRA" option to <a href="../pragma.html#pragma_synchronous">PRAGMA synchronous</a> that does a sync of the
    containing directory when a rollback journal is unlinked in DELETE mode,
    for better durability.  The <a href="../compile.html#extra_durable">SQLITE_EXTRA_DURABLE</a> compile-time option enables
    <a href="../pragma.html#pragma_synchronous">PRAGMA synchronous=EXTRA</a> by default.


c0: releaselog/3_11_0.html
c1: 3.11.0
c3:
Enhanced the <a href="../optoverview.html">query planner</a> so that it is able to use
    a <a href="../queryplanner.html#covidx">covering index</a> as part of the <a href="../optoverview.html#or_opt">OR optimization</a>.


c0: releaselog/3_11_0.html
c1: 3.11.0
c3:
Avoid recomputing <a href="../lang_createtable.html#notnullconst">NOT NULL</a> and <a href="../lang_createtable.html#ckconst">CHECK constraints</a> on unchanged
    columns in <a href="../lang_update.html">UPDATE</a> statement.


c0: releaselog/3_11_0.html
c1: 3.11.0
c3:
By default, the shell is now in "auto-explain" mode.  The output of
    <a href="../lang_explain.html">EXPLAIN</a> commands is automatically formatted.


c0: releaselog/3_11_0.html
c1: 3.11.0
c3:
The <a href="../compile.html#enable_explain_comments">SQLITE_ENABLE_EXPLAIN_COMMENTS</a> compile-time option is now turned
    on by default in the standard builds.


c0: releaselog/3_11_0.html
c1: 3.11.0
c3:
If a database connection is opened with the "-uri 1" option, then
    <a href="../uri.html">URI filenames</a> are honored by the "backup" and "restore" commands.


c0: releaselog/3_11_0.html
c1: 3.11.0
c3:
Add the ability to do MSVC Windows builds from the <a href="../download.html">amalgamation tarball</a>.


c0: releaselog/3_11_0.html
c1: 3.11.0
c3:
Fix an issue with incorrect sharing of VDBE temporary registers between
    co-routines that could cause incorrect query results in obscure cases.  Ticket
    <a href="https://www.sqlite.org/src/info/d06a25c84454a">d06a25c84454a</a>.


c0: releaselog/3_11_0.html
c1: 3.11.0
c3:
Fix a problem in the <a href="../c3ref/result_subtype.html">sqlite3_result_subtype()</a> interface that could
    cause problems for the <a href="../json1.html">json1</a> extension under obscure circumstances.
    Fix for ticket
    <a href="https://www.sqlite.org/src/info/f45ac567eaa9f9">f45ac567eaa9f9</a>.


c0: releaselog/3_11_0.html
c1: 3.11.0
c3:
Escape control characters in JSON strings.  Fix for ticket
    <a href="https://www.sqlite.org/src/info/ad2559db380abf8">ad2559db380abf8</a>.


c0: releaselog/3_11_0.html
c1: 3.11.0
c3:
Reenable the xCurrentTime and xGetLastError methods in the built-in
    unix <a href="../vfs.html">VFSes</a> as long as <a href="../compile.html#omit_deprecated">SQLITE_OMIT_DEPRECATED</a> is not defined.


c0: releaselog/3_11_0.html
c1: 3.11.0
c3:
Because of continuing security concerns, the two-argument version
    of the seldom-used and little-known <a href="../fts3.html#f3tknzr">fts3_tokenizer()</a> function is
    disabled unless SQLite is compiled with the <a href="../compile.html#enable_fts3_tokenizer">SQLITE_ENABLE_FTS3_TOKENIZER</a>.


c0: releaselog/3_10_2.html
c1: 3.10.2
c3:
Version 3.10.0 introduced a case-folding bug in the <a href="../lang_expr.html#like">LIKE</a> operator which is fixed
    by this patch release.  Ticket
    <a href="https://www.sqlite.org/src/info/80369eddd5c94">80369eddd5c94</a>.


c0: releaselog/3_10_2.html
c1: 3.10.2
c3:
Fix the configure script for the amalgamation so that the --readline option works again
    on Raspberry PIs.


c0: releaselog/3_10_1.html
c1: 3.10.1
c3:
Add the <a href="../c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntljournalpointer">SQLITE_FCNTL_JOURNAL_POINTER</a> file control.


c0: releaselog/3_10_1.html
c1: 3.10.1
c3:
Fix a 16-month-old bug in the query planner that could generate incorrect results
    when a scalar subquery attempts to use the <a href="../queryplanner.html#partialsort">block sorting</a> optimization.  Ticket
    <a href="https://www.sqlite.org/src/info/cb3aa0641d9a4">cb3aa0641d9a4</a>.


c0: releaselog/3_10_0.html
c1: 3.10.0
c3:
Added support for <a href="../lang_expr.html#like">LIKE</a>, <a href="../lang_expr.html#glob">GLOB</a>, and <a href="../lang_expr.html#regexp">REGEXP</a> operators on <a href="../vtab.html">virtual tables</a>.


c0: releaselog/3_10_0.html
c1: 3.10.0
c3:
Added the <a href="../vtab.html#colUsed">colUsed field</a> to <a href="../c3ref/index_info.html">sqlite3_index_info</a> for use by
    the <a href="../vtab.html#xbestindex">sqlite3_module.xBestIndex</a> method.


c0: releaselog/3_10_0.html
c1: 3.10.0
c3:
Enhance the <a href="../pragma.html#pragma_cache_spill">PRAGMA cache_spill</a> statement to accept a 32-bit integer
    parameter which is the threshold below which cache spilling is prohibited.


c0: releaselog/3_10_0.html
c1: 3.10.0
c3:
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.


c0: releaselog/3_10_0.html
c1: 3.10.0
c3:
When using <a href="../mmap.html">memory-mapped I/O</a> map the database file read-only so that stray pointers
    and/or array overruns in the application cannot accidentally modify the database file.


c0: releaselog/3_10_0.html
c1: 3.10.0
c3:
Added the <em>experimental</em> <a href="../c3ref/snapshot_get.html">sqlite3_snapshot_get()</a>, <a href="../c3ref/snapshot_open.html">sqlite3_snapshot_open()</a>,
    and <a href="../c3ref/snapshot_free.html">sqlite3_snapshot_free()</a> interfaces.  These are subject to change or removal in
    a subsequent release.


c0: releaselog/3_10_0.html
c1: 3.10.0
c3:
Enhance the <a href="../lang_datefunc.html#localtime">'utc' modifier</a> in the <a href="../lang_datefunc.html">date and time functions</a> 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.)


c0: releaselog/3_10_0.html
c1: 3.10.0
c3:
Added the <a href="../json1.html#jgrouparray">json_group_array()</a> and <a href="../json1.html#jgroupobject">json_group_object()</a> SQL functions in the
    <a href="../json1.html#jmini">json</a> extension.


c0: releaselog/3_10_0.html
c1: 3.10.0
c3:
Added the <a href="../compile.html#like_doesnt_match_blobs">SQLITE_LIKE_DOESNT_MATCH_BLOBS</a> compile-time option.


c0: releaselog/3_10_0.html
c1: 3.10.0
c3:
Work around a sign-extension bug in the optimizer of the HP C compiler on HP/UX.
    <a href="https://www.sqlite.org/src/fdiff?sbs=1&v1=869c95b0fc73026d&v2=232c242a0ccb3d67">(details)</a>


c0: releaselog/3_10_0.html
c1: 3.10.0
c3:
Translate between MBCS and UTF8 when
    running in <a href="https://en.wikipedia.org/wiki/Cmd.exe">cmd.exe</a> on Windows.


c0: releaselog/3_10_0.html
c1: 3.10.0
c3:
Added the --enable-editline and --enable-static-shell options
    to the various autoconf-generated configure scripts.


c0: releaselog/3_10_0.html
c1: 3.10.0
c3:
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
    <a href="https://www.sqlite.org/src/tktview?name=38a97a87a6">38a97a87a6</a>.


c0: releaselog/3_10_0.html
c1: 3.10.0
c3:
Fix an infinite-loop in the query planner that could occur on
    malformed <a href="../lang_with.html">common table expressions</a>.


c0: releaselog/3_9_3.html
c1: 3.9.3
c3:
Backport a
    <a href="https://www.sqlite.org/src/info/c648539b52ca28c0">simple query planner optimization</a>
    that allows the IS operator
    to drive an index on a LEFT OUTER JOIN.  No other changes from the
    <a href="../releaselog/3_9_2.html">version 3.9.2</a> baseline.


c0: releaselog/3_9_2.html
c1: 3.9.2
c3:
Fix the schema parser so that it interprets certain
    (obscure and ill-formed)
    CREATE TABLE statements the same as legacy.  Fix for ticket
    <a href="https://www.sqlite.org/src/info/ac661962a2aeab3c331">ac661962a2aeab3c331</a>


c0: releaselog/3_9_2.html
c1: 3.9.2
c3:
Fix a query planner problem that could result in an incorrect
    answer due to the use of <a href="../optoverview.html#autoindex">automatic indexing</a> in subqueries in
    the FROM clause of a correlated scalar subqueries.  Fix for ticket
    <a href="https://www.sqlite.org/src/info/8a2adec1">8a2adec1</a>.


c0: releaselog/3_9_1.html
c1: 3.9.1
c3:
Fix <a href="../json1.html">the json1 extension</a> so that it does <u>not</u> recognize ASCII form-feed as a
    whitespace character, in order to comply with RFC-7159.  Fix for ticket
    <a href="https://www.sqlite.org/src/info/57eec374ae1d0a1d">57eec374ae1d0a1d</a>


c0: releaselog/3_9_1.html
c1: 3.9.1
c3:
Add a few #ifdef and build script changes to address compilation issues that
    appeared after the 3.9.0 release.


c0: releaselog/3_9_0.html
c1: 3.9.0
c3:
The <a href="../versionnumbers.html">version numbering conventions</a> for SQLite are revised to use the
    emerging standard of <a href="http://semver.org/">semantic versioning</a>.


c0: releaselog/3_9_0.html
c1: 3.9.0
c3:
Added <a href="../json1.html">the json1 extension</a> module in the source tree, and in the <a href="../amalgamation.html">amalgamation</a>.
    Enable support using the <a href="../compile.html#enable_json1">SQLITE_ENABLE_JSON1</a> compile-time option.


c0: releaselog/3_9_0.html
c1: 3.9.0
c3:
Added <a href="../fts5.html">Full Text Search version 5 (FTS5)</a> to the <a href="../amalgamation.html">amalgamation</a>, enabled
    using <a href="../compile.html#enable_fts5">SQLITE_ENABLE_FTS5</a>.  FTS5 will be considered "experimental" (subject
    to incompatible changes) for at least one more release cycle.


c0: releaselog/3_9_0.html
c1: 3.9.0
c3:
The <a href="../lang_createview.html">CREATE VIEW</a> statement now accepts an optional list of
    column names following the view name.


c0: releaselog/3_9_0.html
c1: 3.9.0
c3:
Added support for <a href="../vtab.html#tabfunc2">table-valued functions</a> in the FROM clause of a
    <a href="../lang_select.html">SELECT</a> statement.


c0: releaselog/3_9_0.html
c1: 3.9.0
c3:
A <a href="../lang_createview.html">VIEW</a> may now reference undefined tables and functions when
    initially created.  Missing tables and functions are reported when
    the VIEW is used in a query.


c0: releaselog/3_9_0.html
c1: 3.9.0
c3:
Added the <a href="../c3ref/value_subtype.html">sqlite3_value_subtype()</a> and <a href="../c3ref/result_subtype.html">sqlite3_result_subtype()</a>
    interfaced (used by <a href="../json1.html">the json1 extension</a>).


c0: releaselog/3_9_0.html
c1: 3.9.0
c3:
The query planner is now able to use <a href="../partialindex.html">partial indexes</a> that contain
    AND-connected terms in the WHERE clause.


c0: releaselog/3_9_0.html
c1: 3.9.0
c3:
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.


c0: releaselog/3_9_0.html
c1: 3.9.0
c3:
Enhanced the <a href="../dbstat.html">dbstat virtual table</a> so that it can be used as a
    <a href="../vtab.html#tabfunc2">table-valued function</a> where the argument is the schema to be
    analyzed.


c0: releaselog/3_9_0.html
c1: 3.9.0
c3:
The <a href="../c3ref/aggregate_count.html">sqlite3_memory_alarm()</a> interface, which has been deprecated and
    undocumented for 8 years, is changed into a no-op.


c0: releaselog/3_9_0.html
c1: 3.9.0
c3:
Fixed a critical bug in the
    <a href="https://www.sqlite.org/see/doc/trunk/www/readme.wiki">SQLite Encryption Extension</a> that
    could cause the database to become unreadable and unrecoverable if a <a href="../lang_vacuum.html">VACUUM</a> command
    changed the size of the encryption nonce.


c0: releaselog/3_9_0.html
c1: 3.9.0
c3:
Added a memory barrier in the implementation of
    <a href="../c3ref/initialize.html">sqlite3_initialize()</a> to help ensure that it is thread-safe.


c0: releaselog/3_9_0.html
c1: 3.9.0
c3:
Fix the <a href="../optoverview.html#or_opt">OR optimization</a> so that it always ignores subplans that
    do not use an index.


c0: releaselog/3_9_0.html
c1: 3.9.0
c3:
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
    <a href="https://www.sqlite.org/src/info/c2a19d81652f40568c">c2a19d81652f40568c</a>.


c0: releaselog/3_8_11_1.html
c1: 3.8.11.1
c3:
Restore an undocumented side-effect of <a href="../pragma.html#pragma_cache_size">PRAGMA cache_size</a>: force
    the database schema to be parsed if the database has not been previously accessed.


c0: releaselog/3_8_11_1.html
c1: 3.8.11.1
c3:
Fix a long-standing problem in <a href="../c3ref/changes.html">sqlite3_changes()</a> for <a href="../withoutrowid.html">WITHOUT ROWID</a>
    tables that was reported a few hours after the 3.8.11 release.


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
Added the experimental <a href="../rbu.html">RBU</a> extension.  Note that this extension is experimental
    and subject to change in incompatible ways.


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
Added the experimental <a href="../fts5.html">FTS5</a> extension.  Note that this extension is experimental
    and subject to change in incompatible ways.


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
Added the <a href="../c3ref/value_dup.html">sqlite3_value_dup()</a> and <a href="../c3ref/value_dup.html">sqlite3_value_free()</a> interfaces.


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
Enhance the <a href="../spellfix1.html">spellfix1</a> extension to support <a href="../lang_conflict.html">ON CONFLICT</a> clauses.


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
Enhance the query planner to permit <a href="../optoverview.html#autoindex">automatic indexing</a> on FROM-clause
    subqueries that are implemented by co-routine.


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
Added the <a href="../pragma.html#pragma_cell_size_check">PRAGMA cell_size_check</a> command for better and earlier
    detection of database file corruption.


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
Added the <a href="../fts3.html#matchinfo-b">matchinfo 'b' flag</a> to the <a href="../fts3.html#matchinfo">matchinfo()</a> function in <a href="../fts3.html">FTS3</a>.


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
Add the fuzzcheck test program and automatically run this program
    using both SQL and database test cases on "make test".


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
Added the <a href="../c3ref/c_mutex_fast.html">SQLITE_MUTEX_STATIC_VFS1</a> static mutex and use it in the
    Windows <a href="../vfs.html">VFS</a>.


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
The <a href="../c3ref/profile.html">sqlite3_profile()</a> callback is invoked (by <a href="../c3ref/reset.html">sqlite3_reset()</a> or
    <a href="../c3ref/finalize.html">sqlite3_finalize()</a>) for statements that did not run to completion.


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
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.


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
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 <a href="../releaselog/3_8_0.html">version 3.8.0</a> and three times as
    fast as <a href="../releaselog/3_3_9.html">version 3.3.9</a>.
    (Measured using
    <a href="http://valgrind.org/docs/manual/cg-manual.html">cachegrind</a> on the
    <a href="https://www.sqlite.org/src/artifact/83f6b3318f7ee">speedtest1.c</a> workload on
    Ubuntu 14.04 x64 with gcc 4.8.2 and -Os. Your performance may vary.)


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
Added the <a href="../c3ref/result_blob.html">sqlite3_result_zeroblob64()</a> and <a href="../c3ref/bind_blob.html">sqlite3_bind_zeroblob64()</a>
    interfaces.


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
Fix <a href="../lang_createtable.html#createtabas">CREATE TABLE AS</a> so that columns of type TEXT never end up
    holding an INT value.  Ticket
    <a href="https://www.sqlite.org/src/info/f2ad7de056ab1dc9200">f2ad7de056ab1dc9200</a>


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
Fix <a href="../lang_createtable.html#createtabas">CREATE TABLE AS</a> so that it does not leave NULL entries in the
    <a href="../schematab.html">sqlite_master table</a> if the SELECT statement on the right-hand side
    aborts with an error.  Ticket
    <a href="https://www.sqlite.org/src/info/873cae2b6e25b">873cae2b6e25b</a>


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
Fix the <a href="../optoverview.html#skipscan">skip-scan optimization</a> so that it works correctly when
    the <a href="../optoverview.html#or_opt">OR optimization</a> is used on <a href="../withoutrowid.html">WITHOUT ROWID</a> tables.  Ticket
    <a href="https://www.sqlite.org/src/info/8fd39115d8f46">8fd39115d8f46</a>


c0: releaselog/3_8_11.html
c1: 3.8.11
c3:
Fix the <a href="../c3ref/memory_highwater.html">sqlite3_memory_used()</a> and <a href="../c3ref/memory_highwater.html">sqlite3_memory_highwater()</a> interfaces
    so that they actually do provide a 64-bit answer.


c0: releaselog/3_8_10_2.html
c1: 3.8.10.2
c3:
Fix an index corruption issue introduced by <a href="../releaselog/3_8_7.html">version 3.8.7</a>.  An index
    with a TEXT key can be corrupted by an <a href="../lang_insert.html">INSERT</a> into the corresponding
    table if the table has two nested triggers that convert the key value to INTEGER
    and back to TEXT again.
    Ticket <a href="https://www.sqlite.org/src/info/34cd55d68e0e6e7c9a0711aab81a2ee3c354b4c0">34cd55d68e0</a>


c0: releaselog/3_8_10_1.html
c1: 3.8.10.1
c3:
Make <a href="../c3ref/compileoption_get.html">sqlite3_compileoption_used()</a> responsive to the <a href="../compile.html#enable_dbstat_vtab">SQLITE_ENABLE_DBSTAT_VTAB</a>
    compile-time option.


c0: releaselog/3_8_10_1.html
c1: 3.8.10.1
c3:
Fix a harmless warning in the <a href="../cli.html">command-line shell</a> on some versions of MSVC.


c0: releaselog/3_8_10.html
c1: 3.8.10
c3:
Added the <a href="../sqldiff.html">sqldiff.exe</a> utility program for computing the differences between two
    SQLite database files.


c0: releaselog/3_8_10.html
c1: 3.8.10
c3:
Added the <a href="../fts3.html#matchinfo-y">matchinfo y flag</a> to the
    <a href="../fts3.html#matchinfo">matchinfo()</a> function of <a href="../fts3.html">FTS3</a>.


c0: releaselog/3_8_10.html
c1: 3.8.10
c3:
Performance improvements for <a href="../lang_select.html#orderby">ORDER BY</a>, <a href="../lang_vacuum.html">VACUUM</a>, <a href="../lang_createindex.html">CREATE INDEX</a>,
    <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a>, and <a href="../pragma.html#pragma_quick_check">PRAGMA quick_check</a>.


c0: releaselog/3_8_10.html
c1: 3.8.10
c3:
Identify all methods for important objects in the interface documentation.
    (<a href="../c3ref/context.html">example</a>)


c0: releaselog/3_8_10.html
c1: 3.8.10
c3:
Made the <a href="../testing.html#aflfuzz">American Fuzzy Lop fuzzer</a>
    a standard part of SQLite's <a href="../testing.html">testing strategy</a>.


c0: releaselog/3_8_10.html
c1: 3.8.10
c3:
Make the <a href="../dbstat.html">dbstat virtual table</a> part of standard builds when
    compiled with the <a href="../compile.html#enable_dbstat_vtab">SQLITE_ENABLE_DBSTAT_VTAB</a> option.


c0: releaselog/3_8_9.html
c1: 3.8.9
c3:
Fix a potential 32-bit integer overflow problem in the
    <a href="../c3ref/blob_read.html">sqlite3_blob_read()</a> and <a href="../c3ref/blob_write.html">sqlite3_blob_write()</a> interfaces.


c0: releaselog/3_8_9.html
c1: 3.8.9
c3:
Ensure that prepared statements automatically reset on extended
    error codes of SQLITE_BUSY and SQLITE_LOCKED even when compiled
    using <a href="../compile.html#omit_autoreset">SQLITE_OMIT_AUTORESET</a>.


c0: releaselog/3_8_9.html
c1: 3.8.9
c3:
Improve the performance of fts3/4 queries that use the OR operator
    and at least one auxiliary fts function.


c0: releaselog/3_8_9.html
c1: 3.8.9
c3:
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.


c0: releaselog/3_8_8_3.html
c1: 3.8.8.3
c3:
Fix a bug (ticket
    <a href="https://www.sqlite.org/src/info/2326c258d02ead33">2326c258d02ead33</a>) that can lead
    to incorrect results if the qualifying constraint of a <a href="../partialindex.html">partial index</a> appears in the
    ON clause of a LEFT JOIN.


c0: releaselog/3_8_8_3.html
c1: 3.8.8.3
c3:
Added the ability to link against the
    "<a href="https://github.com/antirez/linenoise">linenoise</a>"
    command-line editing library in unix builds of the <a href="../cli.html">command-line shell</a>.


c0: releaselog/3_8_8_2.html
c1: 3.8.8.2
c3:
Enhance <a href="../c3ref/wal_checkpoint_v2.html">sqlite3_wal_checkpoint_v2(TRUNCATE)</a> interface so that it truncates the
    WAL file even if there is no checkpoint work to be done.


c0: releaselog/3_8_8_1.html
c1: 3.8.8.1
c3:
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.
    Ticket <a href="https://www.sqlite.org/src/tktview?name=f97c4637102a3ae72b79">f97c4637102a3ae72b79</a>.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Added the <a href="../pragma.html#pragma_data_version">PRAGMA data_version</a> command that can be used to determine if
    a database file has been modified by another process.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Added the <a href="../c3ref/c_checkpoint_full.html">SQLITE_CHECKPOINT_TRUNCATE</a> option to the
    <a href="../c3ref/wal_checkpoint_v2.html">sqlite3_wal_checkpoint_v2()</a> interface, with corresponding enhancements
    to <a href="../pragma.html#pragma_wal_checkpoint">PRAGMA wal_checkpoint</a>.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Added the <a href="../c3ref/stmt_scanstatus.html">sqlite3_stmt_scanstatus()</a> interface, available only when
    compiled with <a href="../compile.html#enable_stmt_scanstatus">SQLITE_ENABLE_STMT_SCANSTATUS</a>.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
The <a href="../c3ref/table_column_metadata.html">sqlite3_table_column_metadata()</a> is enhanced to work correctly on
    <a href="../withoutrowid.html">WITHOUT ROWID</a> 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 <a href="../compile.html#enable_column_metadata">SQLITE_ENABLE_COLUMN_METADATA</a> compile-time option.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Added the <a href="../compile.html#enable_api_armor">SQLITE_ENABLE_API_ARMOR</a> compile-time option.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Added the <a href="../compile.html#reverse_unordered_selects">SQLITE_REVERSE_UNORDERED_SELECTS</a> compile-time option.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Added the <a href="../compile.html#sorter_pmasz">SQLITE_SORTER_PMASZ</a> compile-time option and <a href="../c3ref/c_config_covering_index_scan.html#sqliteconfigpmasz">SQLITE_CONFIG_PMASZ</a>
    start-time option.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Added the <a href="../c3ref/c_config_covering_index_scan.html#sqliteconfigpcachehdrsz">SQLITE_CONFIG_PCACHE_HDRSZ</a> option to <a href="../c3ref/config.html">sqlite3_config()</a>
    which makes it easier for applications to determine the appropriate
    amount of memory for use with <a href="../c3ref/c_config_covering_index_scan.html#sqliteconfigpagecache">SQLITE_CONFIG_PAGECACHE</a>.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
The number of rows in a <a href="../lang_select.html#values">VALUES clause</a> is no longer limited by
    <a href="../c3ref/c_limit_attached.html#sqlitelimitcompoundselect">SQLITE_LIMIT_COMPOUND_SELECT</a>.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Added the <a href="https://www.sqlite.org/src/artifact/f971962e92ebb8b0">eval.c</a>
    <a href="../loadext.html">loadable extension</a> that implements an eval() SQL function that will recursively
    evaluate SQL.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Reduce the number of memcpy() operations involved in balancing a b-tree,
    for 3.2% overall performance boost.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Improvements to cost estimates for the <a href="../optoverview.html#skipscan">skip-scan optimization</a>.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
The <a href="../optoverview.html#autoindex">automatic indexing</a> optimization is now capable of generating
    a <a href="../partialindex.html">partial index</a> if that is appropriate.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Ensure durability following a power loss with
    "PRAGMA journal_mode=TRUNCATE" by calling fsync() right after truncating
    the journal file.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
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
    <a href="https://www.sqlite.org/src/info/6f2222d550f5b0ee7ed">6f2222d550f5b0ee7ed</a>.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Make sure ORDER BY puts rows in ascending order even if the DISTINCT
    operator  is implemented using a descending index.  Fix for ticket
    <a href="https://www.sqlite.org/src/info/c5ea805691bfc4204b1cb9e">c5ea805691bfc4204b1cb9e</a>.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Fix data races that might occur under stress when running with many threads
    in <a href="../sharedcache.html">shared cache mode</a> where some of the threads are opening and
    closing connections.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Fix obscure crash bugs found by
    <a href="http://lcamtuf.coredump.cx/afl/">american fuzzy lop</a>.  Ticket
    <a href="https://www.sqlite.org/src/info/a59ae93ee990a55">a59ae93ee990a55</a>.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Work around a GCC optimizer bug (for gcc 4.2.1 on MacOS 10.7) that caused the
    <a href="../rtree.html">R-Tree extension</a> to compute incorrect results when compiled with -O3.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Disable the use of the strchrnul() C-library routine unless it is
    specifically enabled using the -DHAVE_STRCHRNULL compile-time option.


c0: releaselog/3_8_8.html
c1: 3.8.8
c3:
Improvements to the effectiveness and accuracy of the
    <a href="../lang_corefunc.html#likelihood">likelihood()</a>, <a href="../lang_corefunc.html#likely">likely()</a>, and <a href="../lang_corefunc.html#unlikely">unlikely()</a> SQL hint functions.


c0: releaselog/3_8_7_3.html
c1: 3.8.7.3
c3:
Bug fix: Ensure the cached KeyInfo objects (an internal abstraction not visible to the
    application) do not go stale when operating in <a href="../sharedcache.html">shared cache mode</a> and frequently closing
    and reopening some database connections while leaving other database connections on the
    same shared cache open continuously.  Ticket
    <a href="https://www.sqlite.org/src/info/e4a18565a36884b00edf">e4a18565a36884b00edf</a>.


c0: releaselog/3_8_7_3.html
c1: 3.8.7.3
c3:
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
    <a href="https://www.sqlite.org/src/info/6f2222d550f5b0ee7ed">6f2222d550f5b0ee7ed</a>.


c0: releaselog/3_8_7_2.html
c1: 3.8.7.2
c3:
Enhance the <a href="../lang_transaction.html">ROLLBACK</a> 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 <a href="../rescode.html#abort">SQLITE_ABORT</a> or <a href="../rescode.html#abort_rollback">SQLITE_ABORT_ROLLBACK</a> error.  That error is still returned
    if the ROLLBACK modifies the schema.


c0: releaselog/3_8_7_2.html
c1: 3.8.7.2
c3:
Bug fix: Make sure that NULL results from OP_Column are fully and completely NULL and
    do not have the MEM_Ephem bit set.
    Ticket <a href="https://www.sqlite.org/src/info/094d39a4c95ee4">094d39a4c95ee4</a>.


c0: releaselog/3_8_7_2.html
c1: 3.8.7.2
c3:
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.
    Ticket <a href="https://www.sqlite.org/src/info/db87229497">db87229497</a>.


c0: releaselog/3_8_7_1.html
c1: 3.8.7.1
c3:
In <a href="../pragma.html#pragma_journal_mode">PRAGMA journal_mode=TRUNCATE</a> mode, call fsync() immediately after truncating
    the journal file to ensure that the transaction is durable across a power loss.


c0: releaselog/3_8_7_1.html
c1: 3.8.7.1
c3:
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 <a href="../lang_altertable.html">ALTER TABLE ADD COLUMN</a>.


c0: releaselog/3_8_7_1.html
c1: 3.8.7.1
c3:
Do not attempt to use the strchrnul() function from the standard C library unless
    the HAVE_STRCHRNULL compile-time option is set.


c0: releaselog/3_8_7_1.html
c1: 3.8.7.1
c3:
Fix a couple of problems associated with running an UPDATE or DELETE on a
    <a href="../lang_createview.html">VIEW</a> with a <a href="../lang_createtable.html#rowid">rowid</a> in the WHERE clause.


c0: releaselog/3_8_7.html
c1: 3.8.7
c3:
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 <a href="../releaselog/3_8_0.html">version 3.8.0</a> is 61%.
    (Measured using
    <a href="http://valgrind.org/docs/manual/cg-manual.html">cachegrind</a> on the
    <a href="https://www.sqlite.org/src/artifact/83f6b3318f7ee">speedtest1.c</a> workload on
    Ubuntu 13.10 x64 with gcc 4.8.1 and -Os. Your performance may vary.)


c0: releaselog/3_8_7.html
c1: 3.8.7
c3:
The sorter can use auxiliary helper threads to increase real-time response.
    This feature is off by default and may be
    enabled using the <a href="../pragma.html#pragma_threads">PRAGMA threads</a> command or the <a href="../compile.html#default_worker_threads">SQLITE_DEFAULT_WORKER_THREADS</a>
    compile-time option.


c0: releaselog/3_8_7.html
c1: 3.8.7
c3:
Enhance the <a href="../optoverview.html#skipscan">skip-scan</a> 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.


c0: releaselog/3_8_7.html
c1: 3.8.7
c3:
Various improvements in how the query planner uses <a href="../fileformat2.html#stat4tab">sqlite_stat4</a>
    information to estimate plan costs.


c0: releaselog/3_8_7.html
c1: 3.8.7
c3:
Added new interfaces with 64-bit length parameters:
    <a href="../c3ref/free.html">sqlite3_malloc64()</a>,
    <a href="../c3ref/free.html">sqlite3_realloc64()</a>,
    <a href="../c3ref/bind_blob.html">sqlite3_bind_blob64()</a>,
    <a href="../c3ref/result_blob.html">sqlite3_result_blob64()</a>,
    <a href="../c3ref/bind_blob.html">sqlite3_bind_text64()</a>, and
    <a href="../c3ref/result_blob.html">sqlite3_result_text64()</a>.


c0: releaselog/3_8_7.html
c1: 3.8.7
c3:
Added the new interface <a href="../c3ref/free.html">sqlite3_msize()</a> that returns the size of a memory allocation
    obtained from <a href="../c3ref/free.html">sqlite3_malloc64()</a> and its variants.


c0: releaselog/3_8_7.html
c1: 3.8.7
c3:
Added the <a href="../c3ref/c_limit_attached.html#sqlitelimitworkerthreads">SQLITE_LIMIT_WORKER_THREADS</a> option to <a href="../c3ref/limit.html">sqlite3_limit()</a> and
    <a href="../pragma.html#pragma_threads">PRAGMA threads</a> command for configuring the number of available worker threads.


c0: releaselog/3_8_7.html
c1: 3.8.7
c3:
The <a href="../spellfix1.html">spellfix1</a> extension allows the application to optionally specify the rowid for
    each INSERT.


c0: releaselog/3_8_7.html
c1: 3.8.7
c3:
Added the <a href="https://www.sqlite.org/src/doc/trunk/ext/userauth/user-auth.txt">User Authentication</a>
    extension.


c0: releaselog/3_8_7.html
c1: 3.8.7
c3:
Fix a bug in the <a href="../partialindex.html">partial index</a> implementation that might result in an incorrect
    answer if a partial index is used in a subquery or in a <a href="../lang_createview.html">view</a>.
    Ticket <a href="https://www.sqlite.org/src/info/98d973b8f5">98d973b8f5</a>.


c0: releaselog/3_8_7.html
c1: 3.8.7
c3:
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.
    Ticket <a href="https://www.sqlite.org/src/info/ba7cbfaedc7e6">ba7cbfaedc7e6</a>.


c0: releaselog/3_8_7.html
c1: 3.8.7
c3:
Fix a bug in <a href="../c3ref/profile.html">sqlite3_trace()</a> that was causing it to sometimes fail to print
    an SQL statement if that statement needed to be re-prepared.
    Ticket <a href="https://www.sqlite.org/src/info/11d5aa455e0d98f3c1e6a08">11d5aa455e0d98f3c1e6a08</a>


c0: releaselog/3_8_7.html
c1: 3.8.7
c3:
Fix a faulty assert() statement.
    Ticket <a href="https://www.sqlite.org/src/info/369d57fb8e5ccdff06f1">369d57fb8e5ccdff06f1</a>


c0: releaselog/3_8_7.html
c1: 3.8.7
c3:
Show ASCII-art abstract syntax tree diagrams using the ".selecttrace"
    and ".wheretrace" commands in the
    <a href="../cli.html">command-line shell</a> when compiled with <a href="../compile.html#debug">SQLITE_DEBUG</a>, 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.


c0: releaselog/3_8_7.html
c1: 3.8.7
c3:
Drop support for SQLITE_ENABLE_TREE_EXPLAIN.  The SELECTTRACE mechanism provides
    more useful diagnostics information.


c0: releaselog/3_8_7.html
c1: 3.8.7
c3:
New options to the <a href="../cli.html">command-line shell</a> for configuring auxiliary
    memory usage: --pagecache, --lookaside, and --scratch.


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
Added support for <a href="../lang_expr.html#hexint">hexadecimal integer literals</a> in the SQL parser.
    (Ex: 0x123abc)


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
Enhanced the <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a> command to detect <a href="../lang_createtable.html#uniqueconst">UNIQUE</a> and
    <a href="../lang_createtable.html#notnullconst">NOT NULL</a> constraint violations.


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
Increase the maximum value of <a href="../limits.html#max_attached">SQLITE_MAX_ATTACHED</a> from 62 to 125.


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
Increase the timeout in <a href="../wal.html">WAL mode</a> before issuing an <a href="../rescode.html#protocol">SQLITE_PROTOCOL</a>
    error from 1 second to 10 seconds.


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
The <a href="../fts3.html#unicode61">unicode61</a> tokenizer is now included in <a href="../fts3.html#fts4">FTS4</a> by default.


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
Trigger automatic reprepares on all prepared statements when <a href="../lang_analyze.html">ANALYZE</a> is
    run.


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
Added a new
    <a href="../loadext.html">loadable extension</a> source code file to the source tree:
    <a href="https://www.sqlite.org/src/finfo?name=ext/misc/fileio.c">fileio.c</a>


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
Add extension functions <a href="../cli.html#fileio">readfile(X) and writefile(X,Y)</a>
    (using code copy/pasted from fileio.c in the previous bullet) to the
    <a href="../cli.html">command-line shell</a>.


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
Added the <a href="../cli.html#fullschema">.fullschema</a> dot-command to the <a href="../cli.html">command-line shell</a>.


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
Deactivate the <a href="../lang_select.html#distinct">DISTINCT</a> keyword on subqueries on the
    right-hand side of the <a href="../lang_expr.html#in_op">IN operator</a>.


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
Add the capability of evaluating an <a href="../lang_expr.html#in_op">IN operator</a> 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.


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
The query planner now uses <a href="../fileformat2.html#stat4tab">sqlite_stat4</a> information (created by <a href="../lang_analyze.html">ANALYZE</a>)
    to help determine if the <a href="../optoverview.html#skipscan">skip-scan optimization</a> is appropriate.


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
Ensure that the query planner never tries to use a self-made transient
    index in place of a schema-defined index.


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
Fix a bug in <a href="../lang_createindex.html">CREATE UNIQUE INDEX</a>, introduced when <a href="../withoutrowid.html">WITHOUT ROWID</a>
    support added in version 3.8.2, that allows a non-unique NOT NULL column to be
    given a UNIQUE index.
    Ticket <a href="https://www.sqlite.org/src/info/9a6daf340df99ba93c">9a6daf340df99ba93c</a>


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
Fix a bug in <a href="../rtree.html">R-Tree extension</a>, 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 <a href="../lang_expr.html#in_op">IN operator</a>.
    Ticket <a href="https://www.sqlite.org/src/info/d2889096e7bdeac6">d2889096e7bdeac6</a>.


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
Fix the <a href="../c3ref/stmt_busy.html">sqlite3_stmt_busy()</a> interface so that it gives the correct answer
    for <a href="../lang_transaction.html">ROLLBACK</a> statements that have been stepped but never reset.


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
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
    DEFAULT.
    Ticket <a href="https://www.sqlite.org/src/info/3a88d85f36704eebe1">3a88d85f36704eebe1</a>


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
CSV output from the <a href="../cli.html">command-line shell</a> now always uses CRNL for the
    row separator and avoids inserting CR in front of NLs contained in
    data.


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
Fix a <a href="../datatype3.html#affinity">column affinity</a> problem with the <a href="../lang_expr.html#in_op">IN operator</a>.
    Ticket <a href="https://www.sqlite.org/src/info/9a8b09f8e6">9a8b09f8e6</a>.


c0: releaselog/3_8_6.html
c1: 3.8.6
c3:
Fix the <a href="../lang_analyze.html">ANALYZE</a> command so that it adds correct samples for
    <a href="../withoutrowid.html">WITHOUT ROWID</a> tables in the <a href="../fileformat2.html#stat4tab">sqlite_stat4</a> table.
    Ticket <a href="https://www.sqlite.org/src/info/b2fa5424e6fcb15">b2fa5424e6fcb15</a>.


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
Enhance the query planner so that it always prefers an index that uses a superset of
    WHERE clause terms relative to some other index.


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
Improvements to the <a href="../fts3.html#*fts4automergecmd">automerge command</a> of <a href="../fts3.html#fts4">FTS4</a> to better control the index size
    for a full-text index that is subject to a large number of updates.


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
Added the <a href="../rtree.html#xquery">sqlite3_rtree_query_callback()</a> interface to <a href="../rtree.html">R-Tree extension</a>


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
Enable the <a href="../queryplanner.html#or_in_where">OR optimization</a> for <a href="../withoutrowid.html">WITHOUT ROWID</a> tables.


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
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 (?)"


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
Added the <a href="../c3ref/c_iocap_atomic.html">SQLITE_IOCAP_IMMUTABLE</a> bit to the set of bits that can be returned by
    the xDeviceCharacteristics method of a <a href="../vfs.html">VFS</a>.


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
OFFSET clause ignored on queries without a FROM clause.
    Ticket <a href="https://www.sqlite.org/src/info/07d6a0453d">07d6a0453d</a>


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
Assertion fault on queries involving expressions of the form
    "x IN (?)".  Ticket <a href="https://www.sqlite.org/src/info/e39d032577">e39d032577</a>.


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
Incorrect column datatype reported.
    Ticket <a href="https://www.sqlite.org/src/info/a8a0d2996a">a8a0d2996a</a>


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
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.
    Ticket <a href="https://www.sqlite.org/src/info/10fb063b11">10fb063b11</a>


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
Partial index causes assertion fault on UPDATE OR REPLACE.
    Ticket <a href="https://www.sqlite.org/src/info/2ea3e9fe63">2ea3e9fe63</a>


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
Crash when calling undocumented SQL function sqlite_rename_parent()
    with NULL parameters.
    Ticket <a href="https://www.sqlite.org/src/info/264b970c4379fd">264b970c43</a>


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
ORDER BY ignored if the query has an identical GROUP BY.
    Ticket <a href="https://www.sqlite.org/src/info/b75a9ca6b0499">b75a9ca6b0</a>


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
The group_concat(x,'') SQL function returns NULL instead of an empty string
    when all inputs are empty strings.
    Ticket <a href="https://www.sqlite.org/src/info/55746f9e65f85">55746f9e65</a>


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
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
    table.
    Ticket <a href="https://www.sqlite.org/src/info/e9654505cfda9">e9654505cfd</a>


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
Fix a problem in CSV import in the <a href="../cli.html">command-line shell</a>
    where if the leftmost field of the first row
    in the CSV file was both zero bytes in size and unquoted no data would
    be imported.


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
Fix a problem in FTS4 where the left-most column that contained
    the <a href="../fts3.html#fts4notindexed">notindexed column</a> name as a prefix
    was not indexed rather than the column whose name matched exactly.


c0: releaselog/3_8_5.html
c1: 3.8.5
c3:
Fix the <a href="../c3ref/db_readonly.html">sqlite3_db_readonly()</a> interface so that it returns true if
    the database is read-only due to the file format write version number
    being too large.


c0: releaselog/3_8_4_3.html
c1: 3.8.4.3
c3:
Add a
    <a href="https://www.sqlite.org/src/fdiff?sbs=1&v1=7d539cedb1c&v2=ebad891b7494d&smhdr">one-character fix</a>
    for a problem that might cause incorrect query results on a query that mixes
    DISTINCT, GROUP BY in a subquery, and ORDER BY.
    <a href="https://www.sqlite.org/src/info/98825a79ce1456863">Ticket 98825a79ce14</a>.


c0: releaselog/3_8_4_2.html
c1: 3.8.4.2
c3:
Fix a potential buffer overread that could result when trying to search a
    corrupt database file.


c0: releaselog/3_8_4_1.html
c1: 3.8.4.1
c3:
Work around a C-preprocessor macro conflict that breaks the build for some
    configurations with Microsoft Visual Studio.


c0: releaselog/3_8_4_1.html
c1: 3.8.4.1
c3:
When computing the cost of the <a href="../optoverview.html#skipscan">skip-scan optimization</a>, take into account the
    fact that multiple seeks are required.


c0: releaselog/3_8_4.html
c1: 3.8.4
c3:
Update the banner on the command-line shell to alert novice users when they
    are using an ephemeral in-memory database.


c0: releaselog/3_8_4.html
c1: 3.8.4
c3:
Add support for coverage testing of VDBE programs using the
    <a href="../c3ref/c_testctrl_always.html">SQLITE_TESTCTRL_VDBE_COVERAGE</a> verb of <a href="../c3ref/test_control.html">sqlite3_test_control()</a>.


c0: releaselog/3_8_4.html
c1: 3.8.4
c3:
Change the datatype of SrcList.nSrc from type u8 to type int to work around
    an issue in the C compiler on AIX.


c0: releaselog/3_8_4.html
c1: 3.8.4
c3:
Bug fix: Fix the <a href="../lang_corefunc.html#char">char()</a> SQL function so that it returns an empty string
    rather than an "out of memory" error when called with zero arguments.


c0: releaselog/3_8_4.html
c1: 3.8.4
c3:
Bug fix: DISTINCT now recognizes that a <a href="../lang_corefunc.html#zeroblob">zeroblob</a> and a blob of all
    0x00 bytes are the same thing.
    <a href="https://www.sqlite.org/src/info/fccbde530a">Ticket &#91;fccbde530a&#93;</a>


c0: releaselog/3_8_4.html
c1: 3.8.4
c3:
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 <a href="../compile.html#enable_stat4">SQLITE_ENABLE_STAT4</a>.
    <a href="https://www.sqlite.org/src/info/4c86b126f2">Ticket &#91;4c86b126f2&#93;</a>


c0: releaselog/3_8_4.html
c1: 3.8.4
c3:
Bug fix: Make sure "rowid" columns are correctly resolved in joins between
    normal tables and WITHOUT ROWID tables.
    <a href="https://www.sqlite.org/src/info/c34d0557f7">Ticket &#91;c34d0557f7&#93;</a>


c0: releaselog/3_8_4.html
c1: 3.8.4
c3:
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.
    <a href="https://www.sqlite.org/src/info/8c63ff0eca">Ticket &#91;8c63ff0eca&#93;</a>


c0: releaselog/3_8_4.html
c1: 3.8.4
c3:
Bug fix: Ensure that "ORDER BY random()" clauses do not get optimized out.
    <a href="https://www.sqlite.org/src/info/65bdeb9739">Ticket &#91;65bdeb9739&#93;</a>


c0: releaselog/3_8_4.html
c1: 3.8.4
c3:
Bug fix: Repair a name-resolution error that can occur in sub-select statements
    contained within a TRIGGER.
    <a href="https://www.sqlite.org/src/info/4ef7e3cfca">Ticket &#91;4ef7e3cfca&#93;</a>


c0: releaselog/3_8_4.html
c1: 3.8.4
c3:
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
    +9223372036854775808.0.


c0: releaselog/3_8_3_1.html
c1: 3.8.3.1
c3:
Fix a bug (ticket <a href="https://www.sqlite.org/src/info/4c86b126f2">4c86b126f2</a>)
    that causes rows to go missing on some queries with OR clauses and
    IS NOT NULL operators in the WHERE clause, when the <a href="../compile.html#enable_stat3">SQLITE_ENABLE_STAT3</a>
    or <a href="../compile.html#enable_stat4">SQLITE_ENABLE_STAT4</a> compile-time options are used.


c0: releaselog/3_8_3.html
c1: 3.8.3
c3:
Added support for <a href="../lang_with.html">common table expressions</a> and the <a href="../lang_with.html">WITH clause</a>.


c0: releaselog/3_8_3.html
c1: 3.8.3
c3:
Added <a href="../c3ref/c_deterministic.html#sqlitedeterministic">SQLITE_DETERMINISTIC</a> as an optional bit in the 4th argument to the
    <a href="../c3ref/create_function.html">sqlite3_create_function()</a> 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.


c0: releaselog/3_8_3.html
c1: 3.8.3
c3:
Add <a href="../rescode.html#readonly_dbmoved">SQLITE_READONLY_DBMOVED</a> 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.


c0: releaselog/3_8_3.html
c1: 3.8.3
c3:
Allow arbitrary expressions, including function calls and subqueries, in
    the filename argument to <a href="../lang_attach.html">ATTACH</a>.


c0: releaselog/3_8_3.html
c1: 3.8.3
c3:
Allow a <a href="../lang_select.html#values">VALUES clause</a> to be used anywhere a <a href="../lang_select.html">SELECT</a> statement is valid.


c0: releaselog/3_8_3.html
c1: 3.8.3
c3:
Reseed the PRNG used by <a href="../c3ref/randomness.html">sqlite3_randomness(N,P)</a> when invoked with N==0.
    Automatically reseed after a fork() on unix.


c0: releaselog/3_8_3.html
c1: 3.8.3
c3:
Enhance the <a href="../spellfix1.html">spellfix1</a> virtual table so that it can search efficiently by rowid.


c0: releaselog/3_8_3.html
c1: 3.8.3
c3:
Improvements to the comments in the VDBE byte-code display when running <a href="../lang_explain.html">EXPLAIN</a>.


c0: releaselog/3_8_3.html
c1: 3.8.3
c3:
Add the "%token_class" directive to <a href="../lemon.html">Lemon parser generator</a> and use it to simplify
    the grammar.


c0: releaselog/3_8_3.html
c1: 3.8.3
c3:
Change the <a href="../lemon.html">Lemon</a> source code to avoid calling C-library functions that OpenBSD
    considers dangerous.  (Ex: sprintf).


c0: releaselog/3_8_3.html
c1: 3.8.3
c3:
Bug fix: In the <a href="../cli.html">command-line shell</a> CSV import feature, do not end a field
    when an escaped double-quote occurs at the end of a CRLN line.


c0: releaselog/3_8_2.html
c1: 3.8.2
c3:
Changed the defined behavior for the <a href="../lang_expr.html#castexpr">CAST expression</a> when floating point values
    greater than  +9223372036854775807 are cast 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
    of -9223372036854775808.
    <b><big>&larr;</big>&nbsp;Potentially Incompatible Change!</b>


c0: releaselog/3_8_2.html
c1: 3.8.2
c3:
Extended the <a href="../vtab.html">virtual table</a> interface, and in particular the
    <a href="../c3ref/index_info.html">sqlite3_index_info</a> object to allow a virtual table to report its estimate
    on the number of rows that will be returned by a query.


c0: releaselog/3_8_2.html
c1: 3.8.2
c3:
Update the <a href="../rtree.html">R-Tree extension</a> to make use of the enhanced virtual table
    interface.


c0: releaselog/3_8_2.html
c1: 3.8.2
c3:
Add the <a href="../compile.html#enable_explain_comments">SQLITE_ENABLE_EXPLAIN_COMMENTS</a> compile-time option.


c0: releaselog/3_8_2.html
c1: 3.8.2
c3:
Enhanced the comments that are inserted into <a href="../lang_explain.html">EXPLAIN</a> output when the
    <a href="../compile.html#enable_explain_comments">SQLITE_ENABLE_EXPLAIN_COMMENTS</a> compile-time option is enabled.


c0: releaselog/3_8_2.html
c1: 3.8.2
c3:
Factor constant subexpressions in inner loops out to the initialization code
    in prepared statements.


c0: releaselog/3_8_2.html
c1: 3.8.2
c3:
Enhanced the ".explain" output formatting of the <a href="../cli.html">command-line shell</a>
    so that loops are indented to better show the structure of the program.


c0: releaselog/3_8_2.html
c1: 3.8.2
c3:
Enhanced the ".timer" feature of the <a href="../cli.html">command-line shell</a> so that it
    shows wall-clock time in addition to system and user times.


c0: releaselog/3_8_1.html
c1: 3.8.1
c3:
Added the <a href="../lang_corefunc.html#unlikely">unlikely()</a> and <a href="../lang_corefunc.html#likelihood">likelihood()</a> SQL functions to be used
    as hints to the query planner.


c0: releaselog/3_8_1.html
c1: 3.8.1
c3:
Enhancements to the query planner:
<ol type="a">
  <li>Take into account the fact WHERE clause terms that cannot be used with indices
      still probably reduce the number of output rows.
  </li><li>Estimate the sizes of table and index rows and use the smallest applicable B-Tree
      for full scans and "count(*)" operations.
</li></ol>


c0: releaselog/3_8_1.html
c1: 3.8.1
c3:
Added support for "sz=NNN" parameters at the end of
    <a href="../fileformat2.html#stat1tab">sqlite_stat1.stat</a> fields
    used to specify the average length in bytes for table and index rows.


c0: releaselog/3_8_1.html
c1: 3.8.1
c3:
Avoid running foreign-key constraint checks on an UPDATE if none of the
    modified columns are associated with foreign keys.


c0: releaselog/3_8_1.html
c1: 3.8.1
c3:
Added the <a href="../compile.html#minimum_file_descriptor">SQLITE_MINIMUM_FILE_DESCRIPTOR</a> compile-time option


c0: releaselog/3_8_1.html
c1: 3.8.1
c3:
The <a href="../lang_datefunc.html">Date And Time Functions</a> are enhanced so that the current time
    (ex: julianday('now')) is always the same for multiple function invocations
    within the same <a href="../c3ref/step.html">sqlite3_step()</a> call.


c0: releaselog/3_8_1.html
c1: 3.8.1
c3:
<a href="../fts3.html#fts4">FTS4</a> queries are better able to make use of docid<$limit constraints="1" to="1" limit="1" the="1" amount="1" of="1" I/O="1" required.="1" <li="1">Added the hidden <a href="../fts3.html#f4alid">fts4aux languageid column</a> to the <a href="../fts3.html#fts4aux">fts4aux</a> virtual table.
</$limit>


c0: releaselog/3_8_1.html
c1: 3.8.1
c3:
The sqlite3_analyzer utility program is updated to provide better descriptions
    and to compute a more accurate estimate for "Non-sequential pages"


c0: releaselog/3_8_1.html
c1: 3.8.1
c3:
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 <a href="../c3ref/temp_directory.html">sqlite3_temp_directory</a> global variable
    still has higher precedence than both environment variables, however.


c0: releaselog/3_8_1.html
c1: 3.8.1
c3:
<b>Bug fix:</b> Return the correct answer for "SELECT count(*) FROM table" even if
    there is a <a href="../partialindex.html">partial index</a> on the table. Ticket
    <a href="https://www.sqlite.org/src/info/a5c8ed66ca">a5c8ed66ca</a>.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
Cut-over to the <a href="../queryplanner-ng.html">next generation query planner</a> for faster and better query plans.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
The <a href="../eqp.html">EXPLAIN QUERY PLAN</a> output no longer shows an estimate of the number of
    rows generated by each loop in a join.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
Added the <a href="../fts3.html#fts4notindexed">FTS4 notindexed option</a>, allowing non-indexed columns in an FTS4 table.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
Added the <a href="../c3ref/c_stmtstatus_counter.html#sqlitestmtstatusvmstep">SQLITE_STMTSTATUS_VM_STEP</a> option to <a href="../c3ref/stmt_status.html">sqlite3_stmt_status()</a>.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
Added the <a href="../pragma.html#pragma_defer_foreign_keys">defer_foreign_keys pragma</a> and the
    <a href="../c3ref/db_status.html">sqlite3_db_status</a>(db, <a href="../c3ref/c_dbstatus_options.html#sqlitedbstatusdeferredfks">SQLITE_DBSTATUS_DEFERRED_FKS</a>,...) C-language interface.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
Added the "percentile()" function as a <a href="../loadext.html">loadable extension</a> in the ext/misc
    subdirectory of the source tree.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
Added the <a href="../compile.html#allow_uri_authority">SQLITE_ALLOW_URI_AUTHORITY</a> compile-time option.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
Add the <a href="../c3ref/cancel_auto_extension.html">sqlite3_cancel_auto_extension(X)</a> interface.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
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.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
Add the <a href="../compile.html#default_automatic_index">SQLITE_DEFAULT_AUTOMATIC_INDEX</a> compile-time option.  Setting this option
    to 0 disables automatic indices by default.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
Issue an <a href="../rescode.html#warning_autoindex">SQLITE_WARNING_AUTOINDEX</a> warning on the <a href="../c3ref/c_config_covering_index_scan.html#sqliteconfiglog">SQLITE_CONFIG_LOG</a> whenever
    the query planner uses an automatic index.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
Added the <a href="../compile.html#fts3_max_expr_depth">SQLITE_FTS3_MAX_EXPR_DEPTH</a> compile-time option.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
Added an optional 5th parameter defining the collating sequence to the
    next_char() extension SQL function.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
The <a href="../rescode.html#busy_snapshot">SQLITE_BUSY_SNAPSHOT</a> 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.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
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.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
Allow read transactions to be freely opened and closed by SQL statements run
    from within the implementation of <a href="../appfunc.html">application-defined SQL functions</a> if the
    function is called by a SELECT statement that does not access any database table.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
Disable the use of posix_fallocate() on all (unix) systems unless the
    HAVE_POSIX_FALLOCATE compile-time option is used.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
Update the ".import" command in the <a href="../cli.html">command-line shell</a> 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.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
Bug fix: In the <a href="../fts3.html#unicode61">unicode61</a> tokenizer of <a href="../fts3.html#fts4">FTS4</a>, treat all private code points
    as identifier symbols.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
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.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
Bug fixes: Multiple problems in the legacy query optimizer were fixed by the
    move to <a href="../queryplanner-ng.html">NGQP</a>.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
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.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
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.


c0: releaselog/3_8_0_2.html
c1: 3.8.0.2
c3:
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.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Assigned the integer at offset 68 in the <a href="../fileformat2.html#database_header">database header</a> as the
    <a href="../fileformat2.html#appid">Application ID</a> for when SQLite is used as an <a href="../appfileformat.html">application file-format</a>.
    Added the <a href="../pragma.html#pragma_application_id">PRAGMA application_id</a> command to query and set the Application ID.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Report rollback recovery in the <a href="../errlog.html">error log</a> as SQLITE_NOTICE_RECOVER_ROLLBACK.
    Change the error log code for WAL recover from
    SQLITE_OK to SQLITE_NOTICE_RECOVER_WAL.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Report the risky uses of <a href="../howtocorrupt.html#unlink">unlinked database files</a> and
   <a href="../howtocorrupt.html#alias">database filename aliasing</a> as SQLITE_WARNING messages in the <a href="../errlog.html">error log</a>.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Added the <a href="../compile.html#trace_size_limit">SQLITE_TRACE_SIZE_LIMIT</a> compile-time option.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Increase the default value of <a href="../compile.html#max_schema_retry">SQLITE_MAX_SCHEMA_RETRY</a> to 50 and make sure
    that it is honored in every place that a schema change might force a statement
    retry.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
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.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Enhance the <a href="../loadext.html">extension loading</a> mechanism to be more flexible (while
    still maintaining backwards compatibility) in two ways:
    <ol>
    <li>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.
    </li><li>The shared library filename passed to <a href="../c3ref/load_extension.html">sqlite3_load_extension()</a> may
        omit the filename suffix, and an appropriate architecture-dependent
        suffix (".so", ".dylib", or ".dll") will be added automatically.
    </li></ol>


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
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.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Enhance <a href="../fts3.html">FTS3</a> 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.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Enhance the <a href="../fts3.html#fts4aux">fts4aux</a> virtual table so that it can be a TEMP table.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Added the <a href="../fts3.html#fts3tok">fts3tokenize virtual table</a> to the <a href="../fts3.html">full-text search</a> logic.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
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.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Bug fix: Fix a potential <b>database corruption bug</b>
    in <a href="../sharedcache.html">shared cache mode</a> when one
    <a href="../c3ref/sqlite3.html">database connection</a> is closed while another is in the middle of a write
    transaction.
    Ticket <a href="https://www.sqlite.org/src/info/e636a050b7">e636a050b7</a>


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
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.
    Ticket <a href="https://www.sqlite.org/src/info/2500cdb9be05">2500cdb9be05</a>


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
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.
    Ticket <a href="https://www.sqlite.org/src/info/ba82a4a41eac1">ba82a4a41eac1</a>.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Bug fix: Do not suppress the ORDER BY clause on a virtual table query if
    an IN constraint is used.
    Ticket <a href="https://www.sqlite.org/src/info/f69b96e3076e">f69b96e3076e</a>.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Bug fix: The <a href="../cli.html">command-line shell</a> gives an exit code of 0 when terminated
    using the ".quit" command.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Bug fix: Make sure <a href="../pragma.html#syntax">PRAGMA</a> statements appear in <a href="../c3ref/profile.html">sqlite3_trace()</a> output.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Bug fix: When a <a href="../lang_select.html#compound">compound query</a> that uses an ORDER BY clause
    with a <a href="../lang_expr.html#collateop">COLLATE operator</a>, 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
    <a href="https://www.sqlite.org/src/info/6709574d2a8d8">6709574d2a8d8</a>.


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Bug fix: Makes sure the <a href="../c3ref/set_authorizer.html">authorizer</a> callback gets
    a valid pointer to the string "ROWID" for the column-name parameter when
    doing an <a href="../lang_update.html">UPDATE</a> that changes the rowid.  Ticket
    <a href="https://www.sqlite.org/src/info/0eb70d77cb05bb2272">0eb70d77cb05bb2272</a>


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Bug fix: Do not move WHERE clause terms inside OR expressions that are
    contained within an ON clause of a LEFT JOIN.  Ticket
    <a href="https://www.sqlite.org/src/info/f2369304e4">f2369304e4</a>


c0: releaselog/3_7_17.html
c1: 3.7.17
c3:
Bug fix: Make sure an error is always reported when attempting to preform
    an operation that requires a <a href="../datatype3.html#collation">collating sequence</a> that is missing.
    Ticket <a href="https://www.sqlite.org/src/info/0fc59f908b">0fc59f908b</a>


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Added the SQLITE_READONLY_ROLLBACK extended error code for when a database
    cannot be opened because it needs rollback recovery but is read-only.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Added SQL functions <a href="../lang_corefunc.html#unicode">unicode(A)</a> and <a href="../lang_corefunc.html#char">char(X1,...,XN)</a>.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Performance improvements for <a href="../pragma.html#pragma_incremental_vacuum">PRAGMA incremental_vacuum</a>, especially in
    cases where the number of free pages is greater than what will fit on a
    single trunk page of the freelist.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Enhance virtual tables so that they can potentially use an index when
    the WHERE clause contains the IN operator.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Allow indices to be used for sorting even if prior terms of the index
    are constrained by IN operators in the WHERE clause.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Enhance the <a href="../pragma.html#pragma_table_info">PRAGMA table_info</a> command so that the "pk" column is an
    increasing integer to show the order of columns in the primary key.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Allow the error message from <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a> to be longer than
    20000 bytes.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Enhance the <a href="../cli.html">command-line shell</a> so that a non-zero argument to the
    ".exit" command causes the shell to exit immediately without cleanly
    shutting down the database connection.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Improved error messages for invalid boolean arguments to dot-commands
    in the <a href="../cli.html">command-line shell</a>.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Improved error messages for "foreign key mismatch" showing the names of
    the two tables involved.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Added the <a href="../pragma.html#pragma_vdbe_addoptrace">PRAGMA vdbe_addoptrace</a> and <a href="../pragma.html#pragma_vdbe_debug">PRAGMA vdbe_debug</a> commands.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Change to use strncmp() or the equivalent instead of memcmp() when
    comparing non-zero-terminated strings.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Enhance the <a href="../spellfix1.html">spellfix1</a> 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.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
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.
    Ticket <a href="https://www.sqlite.org/src/info/fc7bd6358f">fc7bd6358f</a>


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Bug fix: Issue an error message if the 16-bit reference counter on a
    view overflows due to an overly complex query.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Bug fix: Make sure the schema is up-to-date prior to running pragmas
    table_info, index_list, index_info, and foreign_key_list.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Fix for a bug in the ORDER BY optimizer that was introduced in
    <a href="../releaselog/3_7_15.html">version 3.7.15</a> which would sometimes optimize out the sorting step
    when in fact the sort was required.
    Ticket <a href="https://www.sqlite.org/src/info/a179fe7465">a179fe7465</a>


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Fix a long-standing bug in the <a href="../lang_expr.html#castexpr">CAST expression</a> that would recognize UTF16
    characters as digits even if their most-significant-byte was not zero.
    Ticket <a href="https://www.sqlite.org/src/info/689137afb6da41">689137afb6da41</a>.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
Fix a bug in the NEAR operator of <a href="../fts3.html">FTS3</a> when applied to subfields.
    Ticket <a href="https://www.sqlite.org/src/info/38b1ae018f">38b1ae018f</a>.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
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
    harmless.
    Ticket <a href="https://www.sqlite.org/src/info/6bfb98dfc0c">6bfb98dfc0c</a>.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
The SQLITE_OMIT_MERGE_SORT option has been removed.  The merge sorter is
    now a required component of SQLite.


c0: releaselog/3_7_16_2.html
c1: 3.7.16.2
c3:
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
    <a href="https://www.sqlite.org/src/info/7ff3120e4f">7ff3120e4f</a> for further
    information.


c0: releaselog/3_7_15_2.html
c1: 3.7.15.2
c3:
Fix a bug, introduced in <a href="../releaselog/3_7_15.html">version 3.7.15</a>, that causes an ORDER BY clause
    to be optimized out of a three-way join when the ORDER BY is actually
    required.	
    Ticket <a href="https://www.sqlite.org/src/info/598f5f7596b055">598f5f7596b055</a>


c0: releaselog/3_7_15_1.html
c1: 3.7.15.1
c3:
Fix a bug, introduced in <a href="../releaselog/3_7_15.html">version 3.7.15</a>, 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
    <a href="https://www.sqlite.org/src/info/a7b7803e8d1e869">a7b7803e8d1e869</a>.


c0: releaselog/3_7_15.html
c1: 3.7.15
c3:
Avoid invoking the <a href="../c3ref/profile.html">sqlite3_trace()</a> callback multiple times when a
    statement is automatically reprepared due to <a href="../rescode.html#schema">SQLITE_SCHEMA</a> errors.


c0: releaselog/3_7_15.html
c1: 3.7.15
c3:
Do full-table scans using covering indices when possible, under the
    theory that an index will be smaller and hence can be scanned with
    less I/O.


c0: releaselog/3_7_15.html
c1: 3.7.15
c3:
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.


c0: releaselog/3_7_15.html
c1: 3.7.15
c3:
Add the ability to implement FROM clause subqueries as coroutines rather
    that manifesting the subquery into a temporary table.


c0: releaselog/3_7_15.html
c1: 3.7.15
c3:
Enhancements the command-line shell:
    <ol type="a">
    <li>Added the ".print" command
    </li><li>Negative numbers in the ".width" command cause right-alignment
    </li><li>Add the ".wheretrace" command when compiled with SQLITE_DEBUG
    </li></ol>


c0: releaselog/3_7_15.html
c1: 3.7.15
c3:
Added the <a href="../c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlbusyhandler">SQLITE_FCNTL_BUSYHANDLER</a> file control, used to allow VFS
    implementations to get access to the busy handler callback.


c0: releaselog/3_7_15.html
c1: 3.7.15
c3:
The xDelete method in the built-in <a href="../vfs.html">VFSes</a> now return
    SQLITE_IOERR_DELETE_NOENT if the file to be deleted does not exist.


c0: releaselog/3_7_15.html
c1: 3.7.15
c3:
Bug fix: Avoid various concurrency problems in <a href="../sharedcache.html">shared cache mode</a>.


c0: releaselog/3_7_15.html
c1: 3.7.15
c3:
Bug fix: Avoid a deadlock or crash if the <a href="../backup.html">backup API</a>, <a href="../sharedcache.html">shared cache</a>,
    and the SQLite Encryption Extension are all used at once.


c0: releaselog/3_7_15.html
c1: 3.7.15
c3:
Bug fix: Avoid segfault when using the <a href="../lang_expr.html#collateop">COLLATE operator</a> inside of a
    <a href="../lang_createtable.html#ckconst">CHECK constraint</a> or <a href="../lang_createview.html">view</a> in <a href="../sharedcache.html">shared cache mode</a>.


c0: releaselog/3_7_14_1.html
c1: 3.7.14.1
c3:
Fix a bug (ticket
<a href="../https://www.sqlite.org/src/tktview/d02e1406a58ea02d">&#91;d02e1406a58ea02d]&#93;</a>)
that causes a segfault on a LEFT JOIN that includes an OR in the ON clause.


c0: releaselog/3_7_14_1.html
c1: 3.7.14.1
c3:
Work around a bug in the optimizer in the VisualStudio-2012 compiler that
causes invalid code to be generated when compiling SQLite on ARM.


c0: releaselog/3_7_14_1.html
c1: 3.7.14.1
c3:
Fix the TCL interface so that the "nullvalue" setting is honored for
TCL implementations of SQL functions.


c0: releaselog/3_7_14.html
c1: 3.7.14
c3:
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 <a href="../vfs.html">VFS</a> using the
    <a href="../c3ref/vfs_find.html">sqlite3_vfs_register()</a> interface.  The code removed in this release can
    serve as a baseline for the application-defined VFS.


c0: releaselog/3_7_14.html
c1: 3.7.14
c3:
Ensure that floating point values are preserved exactly when reconstructing
    a database from the output of the ".dump" command of the
    <a href="../cli.html">command-line shell</a>.


c0: releaselog/3_7_14.html
c1: 3.7.14
c3:
Updated the <a href="../cli.html">command-line shell</a> so that it can be built using
    <a href="../compile.html#omit_floating_point">SQLITE_OMIT_FLOATING_POINT</a> and <a href="../compile.html#omit_autoinit">SQLITE_OMIT_AUTOINIT</a>.


c0: releaselog/3_7_14.html
c1: 3.7.14
c3:
Enhancements to <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a> and <a href="../pragma.html#pragma_quick_check">PRAGMA quick_check</a> so that
    they can optionally check just a single attached database instead of all
    attached databases.


c0: releaselog/3_7_14.html
c1: 3.7.14
c3:
Enhancements to <a href="../wal.html">WAL mode</a> 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.


c0: releaselog/3_7_14.html
c1: 3.7.14
c3:
Added the <a href="../compile.html#disable_fts4_deferred">SQLITE_DISABLE_FTS4_DEFERRED</a> compile-time option.


c0: releaselog/3_7_14.html
c1: 3.7.14
c3:
Better handling of aggregate queries where the aggregate functions are
    contained within subqueries.


c0: releaselog/3_7_14.html
c1: 3.7.14
c3:
Enhance the query planner so that it will try to use a <a href="../queryplanner.html#covidx">covering index</a>
    on queries that make use of <a href="../optoverview.html#or_opt">or optimization</a>.


c0: releaselog/3_7_13.html
c1: 3.7.13
c3:
<a href="../inmemorydb.html">In-memory databases</a> that are specified using
    <a href="../uri.html">URI filenames</a> are allowed to use <a href="../sharedcache.html#inmemsharedcache">shared cache</a>,
    so that the same
    in-memory database can be accessed from multiple database connections.


c0: releaselog/3_7_13.html
c1: 3.7.13
c3:
Recognize and use the <a href="../uri.html#coreqp">mode=memory</a> query parameter in
    <a href="../uri.html">URI filenames</a>.


c0: releaselog/3_7_13.html
c1: 3.7.13
c3:
Avoid resetting the schema of <a href="../sharedcache.html">shared cache</a> connections when any one
    connection closes.  Instead, wait for the last connection to close before
    resetting the schema.


c0: releaselog/3_7_13.html
c1: 3.7.13
c3:
In the <a href="../rtree.html">RTREE</a> 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.


c0: releaselog/3_7_13.html
c1: 3.7.13
c3:
Add interfaces sqlite3_quota_ferror() and sqlite3_quota_file_available()
    to the test_quota.c module.


c0: releaselog/3_7_13.html
c1: 3.7.13
c3:
The <a href="../c3ref/create_module.html">sqlite3_create_module()</a> and <a href="../c3ref/create_module.html">sqlite3_create_module_v2()</a> interfaces
    return SQLITE_MISUSE on any attempt to overload or replace a <a href="../vtab.html">virtual table</a>
    module.  The destructor is always called in this case, in accordance with
    historical and current documentation.


c0: releaselog/3_7_12_1.html
c1: 3.7.12.1
c3:
Fix a bug
    <a href="https://www.sqlite.org/src/info/c2ad16f997ee9c">(ticket c2ad16f997)</a>
    in the 3.7.12 release that can cause a segfault for certain
    obscure nested aggregate queries.


c0: releaselog/3_7_12.html
c1: 3.7.12
c3:
Add the <a href="../c3ref/c_dbstatus_options.html#sqlitedbstatuscachewrite">SQLITE_DBSTATUS_CACHE_WRITE</a> option for <a href="../c3ref/db_status.html">sqlite3_db_status()</a>.


c0: releaselog/3_7_12.html
c1: 3.7.12
c3:
Optimize the <a href="../lang_corefunc.html#typeof">typeof()</a> and <a href="../lang_corefunc.html#length">length()</a> SQL functions so that they avoid
    unnecessary reading of database content from disk.


c0: releaselog/3_7_12.html
c1: 3.7.12
c3:
Add the <a href="../fts3.html#*fts4mergecmd">FTS4 "merge" command</a>, the <a href="../fts3.html#*fts4automergecmd">FTS4 "automerge" command</a>, and
    the <a href="../fts3.html#*fts4ickcmd">FTS4 "integrity-check" command</a>.


c0: releaselog/3_7_12.html
c1: 3.7.12
c3:
Report the name of specific <a href="../lang_createtable.html#ckconst">CHECK</a> constraints that fail.


c0: releaselog/3_7_12.html
c1: 3.7.12
c3:
In the command-line shell, use popen() instead of fopen() if the first
    character of the argument to the ".output" command is "|".


c0: releaselog/3_7_12.html
c1: 3.7.12
c3:
Make use of OVERLAPPED in the windows <a href="../vfs.html">VFS</a> to avoid some system calls
    and thereby obtain a performance improvement.


c0: releaselog/3_7_12.html
c1: 3.7.12
c3:
Improved performance of queries with many OR-connected terms in the
    WHERE clause that can all be indexed.


c0: releaselog/3_7_12.html
c1: 3.7.12
c3:
Add the <a href="../compile.html#rtree_int_only">SQLITE_RTREE_INT_ONLY</a> compile-time option to force the
    <a href="../rtree.html">R*Tree Extension Module</a> to use integer instead of
    floating point values for both storage and computation.


c0: releaselog/3_7_12.html
c1: 3.7.12
c3:
Enhance the <a href="../pragma.html#pragma_integrity_check">PRAGMA integrity_check</a> command to use much less memory when
    processing multi-gigabyte databases.


c0: releaselog/3_7_12.html
c1: 3.7.12
c3:
Bug fix: Fix the <a href="../lang_savepoint.html">RELEASE</a> command so that it does not cancel pending
    queries.  This repairs a problem introduced in 3.7.11.


c0: releaselog/3_7_12.html
c1: 3.7.12
c3:
Bug fix: Do not discard the DISTINCT as superfluous unless a subset of
    the result set is subject to a UNIQUE constraint <em>and</em> it none
    of the columns in that subset can be NULL.
    Ticket <a href="https://www.sqlite.org/src/info/385a5b56b9">385a5b56b9</a>.


c0: releaselog/3_7_12.html
c1: 3.7.12
c3:
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.
    Ticket <a href="https://www.sqlite.org/src/info/2a5629202f">2a5629202f</a>.


c0: releaselog/3_7_11.html
c1: 3.7.11
c3:
Enhance the <a href="../lang_insert.html">INSERT</a> syntax to allow multiple rows to be inserted
    via the VALUES clause.


c0: releaselog/3_7_11.html
c1: 3.7.11
c3:
Enhance the <a href="../lang_createvtab.html">CREATE VIRTUAL TABLE</a> command to support the
    IF NOT EXISTS clause.


c0: releaselog/3_7_11.html
c1: 3.7.11
c3:
Added the <a href="../c3ref/stricmp.html">sqlite3_stricmp()</a> interface as a counterpart to
    <a href="../c3ref/stricmp.html">sqlite3_strnicmp()</a>.


c0: releaselog/3_7_11.html
c1: 3.7.11
c3:
Added the <a href="../c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpragma">SQLITE_FCNTL_PRAGMA</a> file control, giving <a href="../vfs.html">VFS</a> implementations
    the ability to add new <a href="../pragma.html#syntax">PRAGMA</a> statements or to override built-in
    PRAGMAs.


c0: releaselog/3_7_11.html
c1: 3.7.11
c3:
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.


c0: releaselog/3_7_11.html
c1: 3.7.11
c3:
Documented support for the <a href="../fts3.html#*fts4content">FTS4 content option</a>.  This feature has
    actually been in the code since <a href="../releaselog/3_7_9.html">version 3.7.9</a> but is only now considered
    to be officially supported.


c0: releaselog/3_7_11.html
c1: 3.7.11
c3:
Pending statements no longer block <a href="../lang_transaction.html">ROLLBACK</a>.  Instead, the pending
    statement will return SQLITE_ABORT upon next access after the ROLLBACK.


c0: releaselog/3_7_11.html
c1: 3.7.11
c3:
Fix a <a href="https://www.sqlite.org/src/info/b7c8682cc1">bug</a> introduced
    in <a href="../releaselog/3_7_10.html">version 3.7.10</a> that might cause a LEFT JOIN
    to be incorrectly converted into an INNER JOIN if the WHERE clause
    indexable terms connected by OR.


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
The default <a href="../fileformat2.html#schemaformat">schema format number</a> is changed from 1 to 4.
    This means that, unless
    the <a href="../pragma.html#pragma_legacy_file_format">PRAGMA legacy_file_format=ON</a> 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 <a href="../lang_createindex.html#descidx">descending indices</a>
    are enabled by default.


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
The sqlite3_pcache_methods structure and the <a href="../c3ref/c_config_covering_index_scan.html#sqliteconfigpcache">SQLITE_CONFIG_PCACHE</a>
    and <a href="../c3ref/c_config_covering_index_scan.html#sqliteconfiggetpcache">SQLITE_CONFIG_GETPCACHE</a> configuration parameters are deprecated.
    They are replaced by a new <a href="../c3ref/pcache_methods2.html">sqlite3_pcache_methods2</a> structure and
    <a href="../c3ref/c_config_covering_index_scan.html#sqliteconfigpcache2">SQLITE_CONFIG_PCACHE2</a> and <a href="../c3ref/c_config_covering_index_scan.html#sqliteconfiggetpcache2">SQLITE_CONFIG_GETPCACHE2</a> configuration
    parameters.


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
Added the <a href="../psow.html">powersafe overwrite</a> property to the VFS interface.  Provide
    the <a href="../c3ref/c_iocap_atomic.html">SQLITE_IOCAP_POWERSAFE_OVERWRITE</a> I/O capability, the
    <a href="../compile.html#powersafe_overwrite">SQLITE_POWERSAFE_OVERWRITE</a> compile-time option, and the
    "psow=BOOLEAN" query parameter for <a href="../uri.html">URI filenames</a>.


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
Added the <a href="../c3ref/db_release_memory.html">sqlite3_db_release_memory()</a> interface and the
    <a href="../pragma.html#pragma_shrink_memory">shrink_memory pragma</a>.


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
Added the <a href="../c3ref/uri_boolean.html">sqlite3_uri_boolean()</a> and <a href="../c3ref/uri_boolean.html">sqlite3_uri_int64()</a> interfaces.


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
If the argument to <a href="../pragma.html#pragma_cache_size">PRAGMA cache_size</a> is negative N, that means to use
    approximately -1024*N bytes of memory for the page cache regardless of
    the page size.


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
Enhanced the default memory allocator to make use of _msize() on windows,
    malloc_size() on Mac, and malloc_usable_size() on Linux.


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
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.


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
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
    initially empty.


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
Enhanced the windows <a href="../vfs.html">VFS</a> so that all system calls can be overridden
    using the xSetSystemCall interface.


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
Updated the "unix-dotfile" <a href="../vfs.html">VFS</a> to use locking directories with mkdir()
    and rmdir() instead of locking files with open() and unlink().


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
Change the unix <a href="../vfs.html">VFS</a> to be tolerant of read() system calls that return
    less then the full number of requested bytes.


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
Change both unix and windows <a href="../vfs.html">VFSes</a> to report a sector size of 4096
    instead of the old default of 512.


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
In the <a href="../tclsqlite.html">TCL Interface</a>, add the -uri option to the "sqlite3" TCL command
    used for creating new database connection objects.


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
Added the <a href="../c3ref/c_testctrl_always.html">SQLITE_TESTCTRL_EXPLAIN_STMT</a> test-control option with the
    <a href="../compile.html#enable_tree_explain">SQLITE_ENABLE_TREE_EXPLAIN</a> compile-time option to enable the
    <a href="../cli.html">command-line shell</a> to display ASCII-art parse trees of SQL statements
    that it processes, for debugging and analysis.


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
<b>Bug fix:</b>
    Add an additional xSync when restarting a WAL in order to prevent an
    exceedingly unlikely but theoretically possible
    database corruption following power-loss.
    Ticket <a href="https://www.sqlite.org/src/info/ff5be73dee">ff5be73dee</a>.


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
<b>Bug fix:</b>
    Change the VDBE so that all registers are initialized to Invalid
    instead of NULL.
    Ticket <a href="https://www.sqlite.org/src/info/7bbfb7d442">7bbfb7d442</a>


c0: releaselog/3_7_10.html
c1: 3.7.10
c3:
<b>Bug fix:</b>
    Fix problems that can result from 32-bit integer overflow.
    Ticket <a href="https://www.sqlite.org/src/info/ac0ff496b7e2">ac00f496b7e2</a>


c0: releaselog/3_7_9.html
c1: 3.7.9
c3:
If a search token (on the right-hand side of the MATCH operator) in
    <a href="../fts3.html#fts4">FTS4</a> begins with "&#94;" then that token must be the first in its field
    of the document.  <b>** Potentially Incompatible Change **</b>


c0: releaselog/3_7_9.html
c1: 3.7.9
c3:
Added options <a href="../c3ref/c_dbstatus_options.html#sqlitedbstatuscachehit">SQLITE_DBSTATUS_CACHE_HIT</a> and <a href="../c3ref/c_dbstatus_options.html#sqlitedbstatuscachemiss">SQLITE_DBSTATUS_CACHE_MISS</a>
    to the <a href="../c3ref/db_status.html">sqlite3_db_status()</a> interface.


c0: releaselog/3_7_9.html
c1: 3.7.9
c3:
Removed support for <a href="../compile.html#enable_stat2">SQLITE_ENABLE_STAT2</a>, replacing it with the much
    more capable <a href="../compile.html#enable_stat3">SQLITE_ENABLE_STAT3</a> option.


c0: releaselog/3_7_9.html
c1: 3.7.9
c3:
Enhancements to the sqlite3_analyzer utility program, including the
    --pageinfo and --stats options and support for multiplexed databases.


c0: releaselog/3_7_9.html
c1: 3.7.9
c3:
Enhance the <a href="../c3ref/data_count.html">sqlite3_data_count()</a> interface so that it can be used to
    determine if SQLITE_DONE has been seen on the prepared statement.


c0: releaselog/3_7_9.html
c1: 3.7.9
c3:
Added the <a href="../c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntloverwrite">SQLITE_FCNTL_OVERWRITE</a> file-control by which the SQLite core
    indicates to the VFS that the current transaction will overwrite the
    entire database file.


c0: releaselog/3_7_9.html
c1: 3.7.9
c3:
Increase the default <a href="../malloc.html#lookaside">lookaside memory allocator</a> allocation size from
    100 to 128 bytes.


c0: releaselog/3_7_9.html
c1: 3.7.9
c3:
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.


c0: releaselog/3_7_9.html
c1: 3.7.9
c3:
Added the <a href="../compile.html#direct_overflow_read">SQLITE_DIRECT_OVERFLOW_READ</a> compile-time option, causing
    <a href="../fileformat2.html#ovflpgs">overflow pages</a> to be read directly from the database file,
    bypassing the <a href="../c3ref/pcache_methods2.html">page cache</a>.


c0: releaselog/3_7_9.html
c1: 3.7.9
c3:
Remove limits on the magnitude of precision and width value in the
    format specifiers of the <a href="../c3ref/mprintf.html">sqlite3_mprintf()</a> family of string rendering
    routines.


c0: releaselog/3_7_9.html
c1: 3.7.9
c3:
Fix a bug that prevent <a href="../lang_altertable.html">ALTER TABLE ... RENAME</a> from working
    on some virtual tables in a database with a UTF16 encoding.


c0: releaselog/3_7_9.html
c1: 3.7.9
c3:
Fix a bug in ASCII-to-float conversion that causes slow performance and
    incorrect results when converting numbers with ridiculously large exponents.


c0: releaselog/3_7_9.html
c1: 3.7.9
c3:
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
    expressions.


c0: releaselog/3_7_9.html
c1: 3.7.9
c3:
Fix a bug that prevented the <a href="../pragma.html#pragma_page_count">page_count</a> and <a href="../pragma.html#pragma_quick_check">quick_check</a> pragmas from
    working correctly if their names were capitalized.


c0: releaselog/3_7_9.html
c1: 3.7.9
c3:
Fix a bug that caused <a href="../lang_vacuum.html">VACUUM</a> to fail if the <a href="../pragma.html#pragma_count_changes">count_changes pragma</a> was
    engaged.


c0: releaselog/3_7_9.html
c1: 3.7.9
c3:
Fix a bug in <a href="../vtab.html">virtual table</a> implementation that causes a crash if
    an <a href="../fts3.html#fts4">FTS4</a> table is <a href="../lang_droptable.html">dropped</a> inside a transaction and
    a <a href="../lang_savepoint.html">SAVEPOINT</a> occurs afterwards.


c0: releaselog/3_7_8.html
c1: 3.7.8
c3:
 Orders of magnitude performance improvement for <a href="../lang_createindex.html">CREATE INDEX</a> on
     very large tables.


c0: releaselog/3_7_8.html
c1: 3.7.8
c3:
 Allow more system calls to be overridden in the unix VFS - to provide
     better support for chromium sandboxes.


c0: releaselog/3_7_8.html
c1: 3.7.8
c3:
 Bug fixes: Correctly handle nested correlated subqueries used with
     indices in a WHERE clause.


c0: releaselog/3_7_7_1.html
c1: 3.7.7.1
c3:
 Fix <a href="https://www.sqlite.org/src/info/25ee812710">a bug</a> causing
     <a href="../pragma.html#pragma_case_sensitive_like">PRAGMA case_sensitive_like</a> statements compiled using sqlite3_prepare()
     to fail with an <a href="../rescode.html#schema">SQLITE_SCHEMA</a> error.


c0: releaselog/3_7_7.html
c1: 3.7.7
c3:
 Add the <a href="../c3ref/vtab_config.html">sqlite3_vtab_config()</a> interface in
     support of <a href="../lang_conflict.html">ON CONFLICT</a> clauses with <a href="../vtab.html">virtual tables</a>.


c0: releaselog/3_7_7.html
c1: 3.7.7
c3:
 Add the <a href="../vtab.html#xsavepoint">xSavepoint</a>, <a href="../vtab.html#xsavepoint">xRelease</a> and <a href="../vtab.html#xsavepoint">xRollbackTo</a> methods in
     <a href="../vtab.html">virtual tables</a> in support of <a href="../lang_savepoint.html">SAVEPOINT</a> for virtual tables.


c0: releaselog/3_7_7.html
c1: 3.7.7
c3:
 Update the built-in <a href="../fts3.html">FTS3/FTS4</a> and <a href="../rtree.html">RTREE</a> virtual tables to support
     <a href="../lang_conflict.html">ON CONFLICT</a> clauses and <a href="../lang_replace.html">REPLACE</a>.


c0: releaselog/3_7_7.html
c1: 3.7.7
c3:
 Added support for the <a href="../fts3.html#fts4prefix">FTS4 prefix option</a> and the <a href="../fts3.html#fts4order">FTS4 order option</a>.


c0: releaselog/3_7_7.html
c1: 3.7.7
c3:
 Allow <a href="../wal.html">WAL-mode</a> databases to be opened read-only as long as
     there is an existing read/write connection.


c0: releaselog/3_7_6_3.html
c1: 3.7.6.3
c3:
 Fix a problem with <a href="../wal.html">WAL mode</a> which could cause transactions to
     silently rollback if the <a href="../pragma.html#pragma_cache_size">cache_size</a> is set very small (less than 10)
     and SQLite comes under memory pressure.


c0: releaselog/3_7_6_2.html
c1: 3.7.6.2
c3:
 Fix the function prototype for the open(2) system call to agree with
     POSIX.  Without this fix, pthreads does not work correctly on NetBSD.


c0: releaselog/3_7_6_1.html
c1: 3.7.6.1
c3:
 Fix a bug in 3.7.6 that only appears if the <a href="../c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlsizehint">SQLITE_FCNTL_SIZE_HINT</a>
     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.


c0: releaselog/3_7_6.html
c1: 3.7.6
c3:
 Added the <a href="../c3ref/wal_checkpoint_v2.html">sqlite3_wal_checkpoint_v2()</a> interface and enhanced the
     <a href="../pragma.html#pragma_wal_checkpoint">wal_checkpoint pragma</a> to support blocking checkpoints.


c0: releaselog/3_7_6.html
c1: 3.7.6
c3:
 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 <a href="../compile.html#enable_stat2">SQLITE_ENABLE_STAT2</a> is used.


c0: releaselog/3_7_6.html
c1: 3.7.6
c3:
 Fix a bug which prevented deferred foreign key constraints from being
     enforced when <a href="../c3ref/finalize.html">sqlite3_finalize()</a> was not
     called by one statement with a failed foreign key constraint prior to
     another statement with foreign key constraints running.


c0: releaselog/3_7_6.html
c1: 3.7.6
c3:
 Integer arithmetic operations that would have resulted in overflow
     are now performed using floating-point instead.


c0: releaselog/3_7_6.html
c1: 3.7.6
c3:
 Increased the version number on the <a href="../c3ref/vfs.html">VFS object</a> to
     3 and added new methods xSetSysCall, xGetSysCall, and xNextSysCall
     used for doing full-coverage testing.


c0: releaselog/3_7_6.html
c1: 3.7.6
c3:
 Increase the maximum value of <a href="../limits.html#max_attached">SQLITE_MAX_ATTACHED</a> from 30 to 62
     (though the default value remains at 10).


c0: releaselog/3_7_6.html
c1: 3.7.6
c3:
 Enhancements to FTS4:
     <ol type="a">
     <li> Added the <a href="../fts3.html#fts4aux">fts4aux</a> table
     </li><li> Added support for <a href="../fts3.html#*fts4compression">compressed FTS4 content</a>
     </li></ol>


c0: releaselog/3_7_6.html
c1: 3.7.6
c3:
 Enhance the <a href="../lang_analyze.html">ANALYZE</a> command to support the name of an index
     as its argument, in order to analyze just that one index.


c0: releaselog/3_7_5.html
c1: 3.7.5
c3:
 Added the <a href="../c3ref/c_dbstatus_options.html#sqlitedbstatuslookasidehit">SQLITE_DBSTATUS_LOOKASIDE_HIT</a>,
     <a href="../c3ref/c_dbstatus_options.html#sqlitedbstatuslookasidemisssize">SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE</a>, and
     <a href="../c3ref/c_dbstatus_options.html#sqlitedbstatuslookasidemissfull">SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL</a> options for the
     <a href="../c3ref/db_status.html">sqlite3_db_status()</a> interface.


c0: releaselog/3_7_5.html
c1: 3.7.5
c3:
 Added the <a href="../compile.html#default_foreign_keys">SQLITE_DEFAULT_FOREIGN_KEYS</a> compile-time option.


c0: releaselog/3_7_5.html
c1: 3.7.5
c3:
 Updates to <a href="../c3ref/stmt_readonly.html">sqlite3_stmt_readonly()</a> so that its result is well-defined
     for all prepared statements and so that it works with <a href="../lang_vacuum.html">VACUUM</a>.


c0: releaselog/3_7_5.html
c1: 3.7.5
c3:
 Fix <a href="https://www.sqlite.org/src/info/5d863f876e">a bug</a> involving
     frequent changes in and out of WAL mode and
     VACUUM that could (in theory) cause database corruption.


c0: releaselog/3_7_5.html
c1: 3.7.5
c3:
 Enhance the <a href="../c3ref/profile.html">sqlite3_trace()</a> 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
     virtual tables.


c0: releaselog/3_7_5.html
c1: 3.7.5
c3:
 Change the xFileControl() methods on all built-in VFSes to return
     <a href="../rescode.html#notfound">SQLITE_NOTFOUND</a> instead of <a href="../rescode.html#error">SQLITE_ERROR</a> for an unrecognized
     operation code.


c0: releaselog/3_7_5.html
c1: 3.7.5
c3:
 The SQLite core invokes the <a href="../c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlsyncomitted">SQLITE_FCNTL_SYNC_OMITTED</a>
     <a href="../c3ref/file_control.html">file control</a>
     to the VFS in place of a call to xSync if the database has
     <a href="../pragma.html#pragma_synchronous">PRAGMA synchronous</a> set to OFF.


c0: releaselog/3_7_4.html
c1: 3.7.4
c3:
 Added the <a href="../c3ref/blob_reopen.html">sqlite3_blob_reopen()</a> interface to allow an existing
     <a href="../c3ref/blob.html">sqlite3_blob</a> object to be rebound to a new row.


c0: releaselog/3_7_4.html
c1: 3.7.4
c3:
 Use the new <a href="../c3ref/blob_reopen.html">sqlite3_blob_reopen()</a> interface to improve the performance
     of FTS.


c0: releaselog/3_7_4.html
c1: 3.7.4
c3:
 <a href="../c3ref/vfs.html">VFSes</a> that do not support shared memory are allowed
     to access <a href="../wal.html">WAL</a> databases if <a href="../pragma.html#pragma_locking_mode">PRAGMA locking_mode</a> is set to EXCLUSIVE.


c0: releaselog/3_7_4.html
c1: 3.7.4
c3:
 Added the <a href="../c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlfilepointer">SQLITE_FCNTL_FILE_POINTER</a> option
     to <a href="../c3ref/file_control.html">sqlite3_file_control()</a>.


c0: releaselog/3_7_4.html
c1: 3.7.4
c3:
 Added support for <a href="../fts3.html#fts4">FTS4</a> and enhancements
     to the FTS <a href="../fts3.html#matchinfo">matchinfo()</a> function.


c0: releaselog/3_7_4.html
c1: 3.7.4
c3:
 Added the test_superlock.c module which provides example
     code for obtaining an exclusive lock to a rollback or WAL database.


c0: releaselog/3_7_4.html
c1: 3.7.4
c3:
 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.


c0: releaselog/3_7_4.html
c1: 3.7.4
c3:
 A <a href="https://www.sqlite.org/src/info/80ba201079">very obscure bug</a>
     associated with the <a href="../optoverview.html#or_opt">or optimization</a> was fixed.


c0: releaselog/3_7_3.html
c1: 3.7.3
c3:
 Added the <a href="../c3ref/create_function.html">sqlite3_create_function_v2()</a> interface that includes a
     destructor callback.


c0: releaselog/3_7_3.html
c1: 3.7.3
c3:
 Added support for <a href="../rtree.html#customquery">custom r-tree queries</a> using application-supplied
     callback routines to define the boundary of the query region.


c0: releaselog/3_7_3.html
c1: 3.7.3
c3:
 The default page cache strives more diligently to avoid using memory
     beyond what is allocated to it by <a href="../c3ref/c_config_covering_index_scan.html#sqliteconfigpagecache">SQLITE_CONFIG_PAGECACHE</a>.  Or if
     using page cache is allocating from the heap, it strives to avoid
     going over the <a href="../c3ref/hard_heap_limit64.html">sqlite3_soft_heap_limit64()</a>, even if
     <a href="../compile.html#enable_memory_management">SQLITE_ENABLE_MEMORY_MANAGEMENT</a> is not set.


