# page_content

c2: The SQLite Query Optimizer Overview
c3: 15. The Push-Down Optimization
c5: optoverview.html#the_push_down_optimization
c4:
If a subquery cannot be flattened into the outer query, it might
  still be possible to enhance performance by "pushing down" WHERE clause
  terms from the outer query into the subquery.  Consider an example:

CREATE TABLE t1(a INT, b INT);
CREATE TABLE t2(x INT, y INT);
CREATE VIEW v1(a,b) AS SELECT DISTINCT a, b FROM t1;

SELECT x, y, b
  FROM t2 JOIN v1 ON (x=a)
 WHERE b BETWEEN 10 AND 20;



  The view v1 cannot be flattened because it is DISTINCT.  It must
  instead be run as a subquery with the results being stored in a
  transient table, then the join is performed between t2 and the
  transient table.  The push-down optimization pushes down the
  "b BETWEEN 10 AND 20" term into the view.  This makes the transient
  table smaller, and helps the subquery to run faster if there
  is an index on t1.b.  The resulting evaluation is like this:

SELECT x, y, b
  FROM t2
  JOIN (SELECT DISTINCT a, b FROM t1 WHERE b BETWEEN 10 AND 20)
 WHERE b BETWEEN 10 AND 20;



  The push-down optimization cannot always be used.  For example,
  if the subquery contains a LIMIT, then pushing down any part of
  the WHERE clause from the outer query could change the result of
  the inner query.  There are other restrictions, explained in a
  comment in the source code on the pushDownWhereTerms() routine
  that implements this optimization.


c2: The SQLite Query Optimizer Overview
c3: 16. The LEFT JOIN Strength Reduction Optimization
c5: optoverview.html#the_left_join_strength_reduction_optimization
c4:
A LEFT JOIN can sometimes be converted into an ordinary JOIN
  if there are terms in the WHERE clause that guarantee that the
  two joins will give identical results.  In particular, if any
  column in the right-hand table of the LEFT JOIN must be non-NULL
  in order for the WHERE clause to be true, then the LEFT JOIN is
  demoted to an ordinary JOIN.


  The prover that determines whether any column of the right-hand
  table of a LEFT JOIN must be non-NULL in the WHERE clause is
  imperfect.  It sometimes returns a false negative.  In other words,
  it sometimes fails to reduce the strength of a LEFT JOIN when doing
  so was in fact possible.  For example, the prover does not know
  the datetime() SQL function will always return NULL if its first
  argument is NULL, and so it will not recognize that the LEFT JOIN
  in the following query could be strength-reduced:

SELECT urls.url
  FROM urls
  LEFT JOIN
    (SELECT *
      FROM (SELECT url_id AS uid, max(retrieval_time) AS rtime
              FROM lookups GROUP BY 1 ORDER BY 1)
      WHERE uid IN (358341,358341,358341)
    ) recent
    ON u.source_seed_id = recent.xyz OR u.url_id = recent.xyz
 WHERE
     DATETIME(recent.rtime) > DATETIME('now', '-5 days');



  It is possible that future enhancements to the prover might enable it
  to recognize that NULL inputs to certain built-in functions
  always result in a NULL answer.  However, not all built-in
  functions have that property (for example coalesce()) and, of
  course, the prover will never be able to reason about
  application-defined SQL functions.


c2: The SQLite Query Optimizer Overview
c3: 17. The Omit LEFT JOIN Optimization
c5: optoverview.html#the_omit_left_join_optimization
c4:
Sometimes a LEFT JOIN can be completely omitted from a query without
  changing the result.  This can happen if all of the following are
  true:


  
   The query is not an aggregate
   Either the query is DISTINCT or else the ON or USING clause
       on the LEFT JOIN constrains the join such that it matches
       only a single row
   The right-hand table of the LEFT JOIN is not be used anywhere
       in the query outside of its own USING or ON clause.
  


  LEFT JOIN elimination often comes up when LEFT JOINs are used
  inside of views, and then the view is used in such as way that
  none of the columns of the right-hand table of the LEFT JOIN are
  referenced.


  Here is a simple example of omitting a LEFT JOIN:

CREATE TABLE t1(ipk INTEGER PRIMARY KEY, v1);
CREATE TABLE t2(ipk INTEGER PRIMARY KEY, v2);
CREATE TABLE t3(ipk INTEGER PRIMARY KEY, v3);

SELECT v1, v3 FROM t1 
  LEFT JOIN t2 ON (t1.ipk=t2.ipk)
  LEFT JOIN t3 ON (t1.ipk=t3.ipk)



  The t2 table is completely unused in the query above, and so the
  query planner is able to implement the query as if it were written:

SELECT v1, v3 FROM t1 
  LEFT JOIN t3 ON (t1.ipk=t3.ipk)


c2: The SQLite Query Optimizer Overview
c3: 18. The Constant Propagation Optimization
c5: optoverview.html#the_constant_propagation_optimization
c4:
When a WHERE clause contains two or more equality constraints connected
  by the AND operator such that all of the affinities of the various
  constraints are the same, then SQLite might use the transitive property
  of equality to construct new "virtual" constraints that can be used to
  simplify expressions and/or improve performance.  This is called the
  "constant-propagation optimization".


  For example, consider the following schema and query:

CREATE TABLE t1(a INTEGER PRIMARY KEY, b INT, c INT);
SELECT * FROM t1 WHERE a=b AND b=5;



  SQLite looks at the "a=b" and "b=5" constraints and deduces that
  if those two constraints are true, then it must also be the case
  that "a=5" is true.  This means that the desired row can be looked up
  quickly using a value of 5 for the INTEGER PRIMARY KEY.


c2: JSON Functions And Operators
c3: 1. Overview
c5: json1.html#overview
c4:
By default, SQLite supports fifteen functions and two operators for
dealing with JSON values.  There are also two table-valued functions
that can be used to decompose a JSON string.


There are 15 scalar functions and operators:



json(json)



json_array(value1,value2,...)



json_array_length(json)json_array_length(json,path)



json_extract(json,path,...)



json -> path



json ->> path



json_insert(json,path,value,...)



json_object(label1,value1,...)



json_patch(json1,json2)



json_remove(json,path,...)



json_replace(json,path,value,...)



json_set(json,path,value,...)



json_type(json)json_type(json,path)



json_valid(json)



json_quote(value)





There are two aggregate SQL functions:



json_group_array(value)



json_group_object(name,value)





The two table-valued functions are:



json_each(json)json_each(json,path)



json_tree(json)json_tree(json,path)


c2: JSON Functions And Operators
c3: 2. Compiling in JSON Support
c5: json1.html#compiling_in_json_support
c4:
The JSON functions and operators are built into SQLite by default,
as of SQLite version 3.38.0 (2022-02-22).  They can be omitted
by adding the -DSQLITE_OMIT_JSON compile-time option.  Prior to
version 3.38.0, the JSON functions were an extension that would only
be included in builds if the -DSQLITE_ENABLE_JSON1 compile-time option
was included.  In other words, the JSON functions went from being
opt-in with SQLite version 3.37.2 and earlier to opt-out with
SQLite version 3.38.0 and later.


c2: JSON Functions And Operators
c3: 3. Interface Overview
c5: json1.html#interface_overview
c4:
SQLite stores JSON as ordinary text.
Backwards compatibility constraints mean that SQLite is only able to
store values that are NULL, integers, floating-point numbers, text,
and BLOBs.  It is not possible to add a sixth "JSON" type.


SQLite does not (currently) support a binary encoding
of JSON.  Experiments have been unable to find a binary encoding
that is significantly smaller or faster than a plain text encoding.
(The present implementation parses JSON text at over 1 GB/s.)
All JSON functions currently throw an error if any of their
arguments are BLOBs because BLOBs are reserved
for a future enhancement in which BLOBs will store the binary encoding
for JSON.


c2: JSON Functions And Operators
c3: 3.1. JSON arguments
c5: json1.html#json_arguments
c4:
For functions that accept JSON as their first argument, that argument
can be a JSON object, array, number, string, or null.  SQLite numeric
values and NULL values are interpreted as JSON numbers and nulls, respectively.
SQLite text values can be understood as JSON objects, arrays, or strings.
If an SQLite text value that is not a well-formed JSON object, array, or
string is passed into JSON function, that function will usually throw
an error.  (Exceptions to this rule are json_valid() and
json_quote().)


For the purposes of determining validity, leading and trailing whitespace
on JSON inputs is ignored.  Interior whitespace is also ignored, in accordance
with the JSON spec.  These routines accept exactly the 
rfc-7159 JSON syntax
&mdash; no more and no less.


c2: JSON Functions And Operators
c3: 3.2. PATH arguments
c5: json1.html#path_arguments
c4:
For functions that accept PATH arguments, that PATH must be well-formed or
else the function will throw an error.
A well-formed PATH is a text value that begins with exactly one
'$' character followed by zero or more instances
of ".objectlabel" or "&#91;arrayindex&#93;".


The arrayindex is usually a non-negative integer N.  In
that case, the array element selected is the N-th element
of the array, starting with zero on the left.
The arrayindex can also be of the form "#-N"
in which case the element selected is the N-th from the
right.  The last element of the array is "#-1".  Think of
the "#" characters as the "number of elements in the array".  Then
the expression "#-1" evaluates to the integer that corresponds to 
the last entry in the array.  It is sometimes useful for the array
index to be just the # character, for example when appending
a value to an existing JSON array:


json_set('[0,1,2]','$[#]','new')
&rarr; '[0,1,2,"new"]'


c2: JSON Functions And Operators
c3: 3.3. VALUE arguments
c5: json1.html#value_arguments
c4:
For functions that accept "value" arguments (also shown as
"value1" and "value2"),
those arguments are usually understood
to be literal strings that are quoted and become JSON string values
in the result.  Even if the input value strings look like 
well-formed JSON, they are still interpreted as literal strings in the
result.


However, if a value argument comes directly from the result of another
JSON function or from the -> operator (but not the ->> operator),
then the argument is understood to be actual JSON and
the complete JSON is inserted rather than a quoted string.


For example, in the following call to json_object(), the value
argument looks like a well-formed JSON array.  However, because it is just
ordinary SQL text, it is interpreted as a literal string and added to the
result as a quoted string:


json_object('ex','[52,3.14159]')
&rarr; '{"ex":"[52,3.14159]"}'

json_object('ex',('52,3.14159]'->>'$'))
&rarr; '{"ex":"[52,3.14159]"}'





But if the value argument in the outer json_object() call is the
result of another JSON function like json() or json_array(), then
the value is understood to be actual JSON and is inserted as such:


json_object('ex',json('[52,3.14159]'))
&rarr; '{"ex":[52,3.14159]}'

json_object('ex',json_array(52,3.14159))
&rarr; '{"ex":[52,3.14159]}'

json_object('ex','[52,3.14159]'->'$')
&rarr; '{"ex":[52,3.14159]}'





To be clear: "json" arguments are always interpreted as JSON
regardless of where the value for that argument comes from.  But
"value" arguments are only interpreted as JSON if those arguments
come directly from another JSON function or the -> operator.


c2: JSON Functions And Operators
c3: 3.4. Compatibility
c5: json1.html#compatibility
c4:
The current implementation of this JSON library uses a recursive descent
parser.  In order to avoid using excess stack space, any JSON input that has
more than 2000 levels of nesting is considered invalid.   Limits on nesting
depth are allowed for compatible implementations of JSON by
RFC-7159 section 9.


c2: JSON Functions And Operators
c3: 4. Function Details
c5: json1.html#function_details
c4:
The following sections provide additional detail on the operation of
the various JSON functions and operators:


c2: JSON Functions And Operators
c3: 4.1. The json() function
c5: json1.html#the_json_function
c4:
The json(X) function verifies that its argument X is a valid
JSON string and returns a minified version of that JSON string
(with all unnecessary whitespace removed).  If X is not a well-formed
JSON string, then this routine throws an error.

In other words, this function converts raw text that looks like
JSON into actual JSON so that it may be passed into the value argument
of some other json function and will be interpreted as JSON rather than
a string.  This function is not appropriate for testing whether or not
a particular string is well-formed JSON - use the json_valid() routine
below for that task.

If the argument X to json(X) contains JSON objects with duplicate
labels, then it is undefined whether or not the duplicates are
preserved.  The current implementation preserves duplicates.
However, future enhancements
to this routine may choose to silently remove duplicates.


Example:


json(' { "this" : "is", "a": [ "test" ] } ')
&rarr; '{"this":"is","a":["test"]}'


c2: JSON Functions And Operators
c3: 4.2. The json_array() function
c5: json1.html#the_json_array_function
c4:
The json_array() SQL function accepts zero or more arguments and
returns a well-formed JSON array that is composed from those arguments.
If any argument to json_array() is a BLOB then an error is thrown.

An argument with SQL type TEXT is normally converted into a quoted 
JSON string.  However, if the argument is the output from another json1
function, then it is stored as JSON.  This allows calls to json_array()
and json_object() to be nested.  The json() function can also
be used to force strings to be recognized as JSON.

Examples:


json_array(1,2,'3',4)
&rarr; '[1,2,"3",4]'

json_array('[1,2]')
&rarr; '["[1,2]"]'

json_array(json_array(1,2))
&rarr; '[[1,2]]'

json_array(1,null,'3','[4,5]','{"six":7.7}')
&rarr; '[1,null,"3","[4,5]","{\"six\":7.7}"]'

json_array(1,null,'3',json('[4,5]'),json('{"six":7.7}'))
&rarr; '[1,null,"3",[4,5],{"six":7.7}]'


c2: JSON Functions And Operators
c3: 4.3. The json_array_length() function
c5: json1.html#the_json_array_length_function
c4:
The json_array_length(X) function returns the number of elements
in the JSON array X, or 0 if X is some kind of JSON value other
than an array.  The json_array_length(X,P) locates the array at path P
within X and returns the length of that array, or 0 if path P locates
an element or X other than a JSON array, and NULL if path P does not
locate any element of X.  Errors are thrown if either X is not 
well-formed JSON or if P is not a well-formed path.

Examples:


json_array_length('[1,2,3,4]')
&rarr; 4

json_array_length('[1,2,3,4]', '$')
&rarr; 4

json_array_length('[1,2,3,4]', '$[2]')
&rarr; 0

json_array_length('{"one":[1,2,3]}')
&rarr; 0

json_array_length('{"one":[1,2,3]}', '$.one')
&rarr; 3

json_array_length('{"one":[1,2,3]}', '$.two')
&rarr; NULL


c2: JSON Functions And Operators
c3: 4.4. The json_extract() function
c5: json1.html#the_json_extract_function
c4:
The json_extract(X,P1,P2,...) extracts and returns one or more 
values from the
well-formed JSON at X.  If only a single path P1 is provided, then the
SQL datatype of the result is NULL for a JSON null, INTEGER or REAL
for a JSON numeric value, an INTEGER zero for a JSON false value,
an INTEGER one for a JSON true value, the dequoted text for a 
JSON string value, and a text representation for JSON object and array values.
If there are multiple path arguments (P1, P2, and so forth) then this
routine returns SQLite text which is a well-formed JSON array holding
the various values.

Examples:


json_extract('{"a":2,"c":[4,5,{"f":7}]}', '$')
&rarr; '{"a":2,"c":[4,5,{"f":7}]}'

json_extract('{"a":2,"c":[4,5,{"f":7}]}', '$.c')
&rarr; '[4,5,{"f":7}]'

json_extract('{"a":2,"c":[4,5,{"f":7}]}', '$.c[2]')
&rarr; '{"f":7}'

json_extract('{"a":2,"c":[4,5,{"f":7}]}', '$.c[2].f')
&rarr; 7

json_extract('{"a":2,"c":[4,5],"f":7}','$.c','$.a')
&rarr; '[[4,5],2]'

json_extract('{"a":2,"c":[4,5],"f":7}','$.c[#-1]')
&rarr; 5

json_extract('{"a":2,"c":[4,5,{"f":7}]}', '$.x')
&rarr; NULL

json_extract('{"a":2,"c":[4,5,{"f":7}]}', '$.x', '$.a')
&rarr; '[null,2]'

json_extract('{"a":"xyz"}', '$.a')
&rarr; 'xyz'

json_extract('{"a":null}', '$.a')
&rarr; NULL




There is a subtle incompatibility between the json_extract() function
in SQLite and the json_extract() function in MySQL.  The MySQL version
of json_extract() always returns JSON.  The SQLite version of
json_extract() only returns JSON if there are two or more PATH arguments
(because the result is then a JSON array) or if the single PATH argument
references an array or object.  In SQLite, if json_extract() has only
a single PATH argument and that PATH references a JSON null or a string
or a numeric value, then json_extract() returns the corresponding SQL
NULL, TEXT, INTEGER, or REAL value.

The difference between MySQL json_extract() and SQLite json_extract()
really only stands out when accessing individual values within the JSON
that are strings or NULLs.  The following table demonstrates the difference:



OperationSQLite ResultMySQL Result
json_extract('{"a":null,"b":"xyz"}','$.a')NULL'null'
json_extract('{"a":null,"b":"xyz"}','$.b')'xyz''"xyz"'


c2: JSON Functions And Operators
c3: 4.5. The -> and ->> operators
c5: json1.html#the_and_operators
c4:
Beginning with SQLite version 3.38.0 (2022-02-22), the ->
and ->> operators are available for extracting subcomponents of JSON.
The SQLite implementation of the -> and ->> operators strive to be
compatible with both MySQL and PostgreSQL.
The -> and ->> operators take a JSON string
as their left operand and a PATH expression or object field
label or array index as their right operand.  The -> operator
returns a JSON representation of the selected subcomponent or NULL if that
subcomponent does not exist.  The ->> operator returns an SQL TEXT,
INTEGER, REAL, or NULL value that represents the selected subcomponent,
or NULL if the subcomponent does not exist.

Both the -> and ->> operators select the same subcomponent
of the JSON to their left.  The difference is that -> always returns a
JSON representation of that subcomponent and the ->> operator always
returns an SQL representation of that subcomponent.  Thus, these operators
are subtly different from a two-argument json_extract() function call.
A call to json_extract() with two arguments will return a JSON representation
of the subcomponent if and only if the subcomponent is a JSON array or
object, and will return an SQL representation of the subcomponent if the
subcomponent is a JSON null, string, or numeric value.

The right-hand operand to the -> and ->> operators can
be a well-formed JSON path expression.  This is the form used by MySQL.
For compatibility with PostgreSQL,
the -> and ->> operators also accept a text label or
integer as their right-hand operand.  If the right operand is a text
label X, then it is interpreted as the JSON path '$.X'.  If the right
operand is an integer value N, then it is interpreted as the JSON path '$[N]'.

Examples:


'{"a":2,"c":[4,5,{"f":7}]}' -> '$'
&rarr; '{"a":2,"c":[4,5,{"f":7}]}'

'{"a":2,"c":[4,5,{"f":7}]}' -> '$.c'
&rarr; '[4,5,{"f":7}]'

'{"a":2,"c":[4,5,{"f":7}]}' -> 'c'
&rarr; '[4,5,{"f":7}]'

'{"a":2,"c":[4,5,{"f":7}]}' -> '$.c[2]'
&rarr; '{"f":7}'

'{"a":2,"c":[4,5,{"f":7}]}' -> '$.c[2].f'
&rarr; '7'

'{"a":2,"c":[4,5],"f":7}' -> '$.c[#-1]'
&rarr; '5'

'{"a":2,"c":[4,5,{"f":7}]}' -> '$.x'
&rarr; NULL

'[11,22,33,44]' -> 3
&rarr; '44'

'[11,22,33,44]' ->> 3
&rarr; 44

'{"a":"xyz"}' -> '$.a'
&rarr; '"xyz"'

'{"a":"xyz"}' ->> '$.a'
&rarr; 'xyz'

'{"a":null}' -> '$.a'
&rarr; 'null'

'{"a":null}' ->> '$.a'
&rarr; NULL


c2: JSON Functions And Operators
c3: 4.6. The json_insert(), json_replace, and json_set() functions
c5: json1.html#the_json_insert_json_replace_and_json_set_functions
c4:
The json_insert(), json_replace, and json_set() functions all take
a single JSON value as their first argument followed by zero or more
pairs of path and value arguments, and return a new JSON string formed
by updating the input JSON by the path/value pairs.  The functions
differ only in how they deal with creating new values and overwriting
preexisting values.




FunctionOverwrite if already exists?Create if does not exist?

json_insert()NoYes

json_replace()YesNo

json_set()YesYes


The json_insert(), json_replace(), and json_set() functions always
take an odd number of arguments.  The first argument is always the original
JSON to be edited.  Subsequent arguments occur in pairs with the first
element of each pair being a path and the second element being the value
to insert or replace or set on that path.

Edits occur sequentially from left to right.  Changes caused by
prior edits can affect the path search for subsequent edits.

If the value of a path/value pair is an SQLite TEXT value, then it
is normally inserted as a quoted JSON string, even if the string looks
like valid JSON.  However, if the value is the result of another
json1 function (such as json() or json_array() or json_object())
or if it is the result of the -> operator,
then it is interpreted as JSON and is inserted as JSON retaining all
of its substructure.  Values that are the result of the ->> operator
are always interpreted as TEXT and are inserted as a JSON string even
if they look like valid JSON.

These routines throw an error if the first JSON argument is not
well-formed or if any PATH argument is not well-formed or if any
argument is a BLOB.

To append an element onto the end of an array, using json_insert()
with an array index of "#".  Examples:


json_insert('[1,2,3,4]','$[#]',99)
&rarr; '[1,2,3,4,99]'

json_insert('[1,[2,3],4]','$[1][#]',99)
&rarr; '[1,[2,3,99],4]'




Other examples:


json_insert('{"a":2,"c":4}', '$.a', 99)
&rarr; '{"a":2,"c":4}'

json_insert('{"a":2,"c":4}', '$.e', 99)
&rarr; '{"a":2,"c":4,"e":99}'

json_replace('{"a":2,"c":4}', '$.a', 99)
&rarr; '{"a":99,"c":4}'

json_replace('{"a":2,"c":4}', '$.e', 99)
&rarr; '{"a":2,"c":4}'

json_set('{"a":2,"c":4}', '$.a', 99)
&rarr; '{"a":99,"c":4}'

json_set('{"a":2,"c":4}', '$.e', 99)
&rarr; '{"a":2,"c":4,"e":99}'

json_set('{"a":2,"c":4}', '$.c', '[97,96]')
&rarr; '{"a":2,"c":"[97,96]"}'

json_set('{"a":2,"c":4}', '$.c', json('[97,96]'))
&rarr; '{"a":2,"c":[97,96]}'

json_set('{"a":2,"c":4}', '$.c', json_array(97,96))
&rarr; '{"a":2,"c":[97,96]}'


c2: JSON Functions And Operators
c3: 4.7. The json_object() function
c5: json1.html#the_json_object_function
c4:
The json_object() SQL function accepts zero or more pairs of arguments
and returns a well-formed JSON object that is composed from those arguments.
The first argument of each pair is the label and the second argument of
each pair is the value.
If any argument to json_object() is a BLOB then an error is thrown.

The json_object() function currently allows duplicate labels without
complaint, though this might change in a future enhancement.

An argument with SQL type TEXT it is normally converted into a quoted 
JSON string even if the input text is well-formed JSON.  
However, if the argument is the direct result from another JSON
function or the -> operator (but not the ->> operator), 
then it is treated as JSON and all of its JSON type information
and substructure is preserved.  This allows calls to json_object()
and json_array() to be nested.  The json() function can also
be used to force strings to be recognized as JSON.

Examples:


json_object('a',2,'c',4)
&rarr; '{"a":2,"c":4}'

json_object('a',2,'c','{e:5}')
&rarr; '{"a":2,"c":"{e:5}"}'

json_object('a',2,'c',json_object('e',5))
&rarr; '{"a":2,"c":{"e":5}}'


c2: JSON Functions And Operators
c3: 4.8. The json_patch() function
c5: json1.html#the_json_patch_function
c4:
The json_patch(T,P) SQL function runs the
RFC-7396 MergePatch algorithm
to apply patch P against input T.  The patched copy of T is returned.

MergePatch can add, modify, or delete elements of a JSON Object,
and so for JSON Objects, the json_patch() routine is a generalized
replacement for json_set() and json_remove().  However, MergePatch
treats JSON Array objects as atomic.  MergePatch cannot append to an
Array nor modify individual elements of an Array.  It can only insert,
replace, or delete the whole Array as a single unit.  Hence, json_patch()
is not as useful when dealing with JSON that includes Arrays,
especially Arrays with lots of substructure.

Examples:


json_patch('{"a":1,"b":2}','{"c":3,"d":4}')
&rarr; '{"a":1,"b":2,"c":3,"d":4}'

json_patch('{"a":[1,2],"b":2}','{"a":9}')
&rarr; '{"a":9,"b":2}'

json_patch('{"a":[1,2],"b":2}','{"a":null}')
&rarr; '{"b":2}'

json_patch('{"a":1,"b":2}','{"a":9,"b":null,"c":8}')
&rarr; '{"a":9,"c":8}'

json_patch('{"a":{"x":1,"y":2},"b":3}','{"a":{"y":9},"c":8}')
&rarr; '{"a":{"x":1,"y":9},"b":3,"c":8}'


c2: JSON Functions And Operators
c3: 4.9. The json_remove() function
c5: json1.html#the_json_remove_function
c4:
The json_remove(X,P,...) function takes a single JSON value as its
first argument followed by zero or more path arguments.
The json_remove(X,P,...) function returns
a copy of the X parameter with all the elements 
identified by path arguments removed.  Paths that select elements
not found in X are silently ignored.

Removals occurs sequentially from left to right.  Changes caused by
prior removals can affect the path search for subsequent arguments.

If the json_remove(X) function is called with no path arguments,
then it returns the input X reformatted, with excess whitespace
removed.

The json_remove() function throws an error if the first argument
is not well-formed JSON or if any later argument is not a well-formed
path, or if any argument is a BLOB.

Examples:


json_remove('[0,1,2,3,4]','$[2]')
&rarr; '[0,1,3,4]'

json_remove('[0,1,2,3,4]','$[2]','$[0]')
&rarr; '[1,3,4]'

json_remove('[0,1,2,3,4]','$[0]','$[2]')
&rarr; '[1,2,4]'

json_remove('[0,1,2,3,4]','$[#-1]','$[0]')
&rarr; '[1,2,3]'

json_remove('{"x":25,"y":42}')
&rarr; '{"x":25,"y":42}'

json_remove('{"x":25,"y":42}','$.z')
&rarr; '{"x":25,"y":42}'

json_remove('{"x":25,"y":42}','$.y')
&rarr; '{"x":25}'

json_remove('{"x":25,"y":42}','$')
&rarr; NULL


c2: JSON Functions And Operators
c3: 4.10. The json_type() function
c5: json1.html#the_json_type_function
c4:
The json_type(X) function returns the "type" of the outermost element
of X.  The json_type(X,P) function returns the "type" of the element
in X that is selected by path P.  The "type" returned by json_type() is
one of the following SQL text values:
'null', 'true', 'false', 'integer', 'real', 'text', 'array', or 'object'.
If the path P in json_type(X,P) selects an element that does not exist
in X, then this function returns NULL.

The json_type() function throws an error if any of its arguments is
not well-formed or is a BLOB.

Examples:


json_type('{"a":[2,3.5,true,false,null,"x"]}')
&rarr; 'object'

json_type('{"a":[2,3.5,true,false,null,"x"]}','$')
&rarr; 'object'

json_type('{"a":[2,3.5,true,false,null,"x"]}','$.a')
&rarr; 'array'

json_type('{"a":[2,3.5,true,false,null,"x"]}','$.a[0]')
&rarr; 'integer'

json_type('{"a":[2,3.5,true,false,null,"x"]}','$.a[1]')
&rarr; 'real'

json_type('{"a":[2,3.5,true,false,null,"x"]}','$.a[2]')
&rarr; 'true'

json_type('{"a":[2,3.5,true,false,null,"x"]}','$.a[3]')
&rarr; 'false'

json_type('{"a":[2,3.5,true,false,null,"x"]}','$.a[4]')
&rarr; 'null'

json_type('{"a":[2,3.5,true,false,null,"x"]}','$.a[5]')
&rarr; 'text'

json_type('{"a":[2,3.5,true,false,null,"x"]}','$.a[6]')
&rarr; NULL


c2: JSON Functions And Operators
c3: 4.11. The json_valid() function
c5: json1.html#the_json_valid_function
c4:
The json_valid(X) function return 1 if the argument X is well-formed
JSON and return 0 if the argument X is not well-formed JSON.

Examples:


json_valid('{"x":35}')
&rarr; 1

json_valid('{"x":35')
&rarr; 0


c2: JSON Functions And Operators
c3: 4.12. The json_quote() function
c5: json1.html#the_json_quote_function
c4:
The json_quote(X) function converts the SQL value X (a number or a
string) into its corresponding JSON representation.  If X is a JSON value
returned by another JSON function, then this function is a no-op.

Examples:


json_quote(3.14159)
&rarr; 3.14159

json_quote('verdant')
&rarr; '"verdant"'

json_quote('[1]')
&rarr; '"[1]"'

json_quote(json('[1]'))
&rarr; '[1]'

json_quote('[1,')
&rarr; '"[1"'


c2: JSON Functions And Operators
c3: 4.13. The json_group_array() and json_group_object() aggregate SQL functions
c5: json1.html#the_json_group_array_and_json_group_object_aggregate_sql_functions
c4:
The json_group_array(X) function is an 
aggregate SQL function that returns a JSON array
comprised of all X values in the aggregation.
Similarly, the json_group_object(NAME,VALUE) function returns a JSON object
comprised of all NAME/VALUE pairs in the aggregation.


c2: JSON Functions And Operators
c3: 4.14. The json_each() and json_tree() table-valued functions
c5: json1.html#the_json_each_and_json_tree_table_valued_functions
c4:
The json_each(X) and json_tree(X) table-valued functions walk the
JSON value provided as their first argument and return one row for each
element.  The json_each(X) function only walks the immediate children
of the top-level array or object,
or just the top-level element itself if the top-level
element is a primitive value.
The json_tree(X) function recursively walks through the
JSON substructure starting with the top-level element.  

The json_each(X,P) and json_tree(X,P) functions work just like
their one-argument counterparts except that they treat the element
identified by path P as the top-level element.

The schema for the table returned by json_each() and json_tree() is
as follows:


CREATE TABLE json_tree(
    key ANY,             -- key for current element relative to its parent
    value ANY,           -- value for the current element
    type TEXT,           -- 'object','array','string','integer', etc.
    atom ANY,            -- value for primitive types, null for array & object
    id INTEGER,          -- integer ID for this element
    parent INTEGER,      -- integer ID for the parent of this element
    fullkey TEXT,        -- full path describing the current element
    path TEXT,           -- path to the container of the current row
    json JSON HIDDEN,    -- 1st input parameter: the raw JSON
    root TEXT HIDDEN     -- 2nd input parameter: the PATH at which to start
);



The "key" column is the integer array index for elements of a JSON array 
and the text label for elements of a JSON object.  The key column is
NULL in all other cases.


The "atom" column is the SQL value corresponding to primitive elements - 
elements other than JSON arrays and objects.  The "atom" column is NULL
for a JSON array or object.  The "value" column is the same as the
"atom" column for primitive JSON elements but takes on the text JSON value
for arrays and objects.


The "type" column is an SQL text value taken from ('null', 'true', 'false',
'integer', 'real', 'text', 'array', 'object') according to the type of
the current JSON element.


The "id" column is an integer that identifies a specific JSON element
within the complete JSON string.  The "id" integer is an internal housekeeping
number, the computation of which might change in future releases.  The
only guarantee is that the "id" column will be different for every row.


The "parent" column is always NULL for json_each().
For json_tree(),
the "parent" column is the "id" integer for the parent of the current
element, or NULL for the top-level JSON element or the element identified
by the root path in the second argument.


The "fullkey" column is a text path that uniquely identifies the current
row element within the original JSON string.  The complete key to the
true top-level element is returned even if an alternative starting point
is provided by the "root" argument.


The "path" column is the path to the array or object container that holds 
the current row, or the path to the current row in the case where the 
iteration starts on a primitive type and thus only provides a single
row of output.


c2: JSON Functions And Operators
c3: 4.14.1. Examples using json_each() and json_tree()
c5: json1.html#examples_using_json_each_and_json_tree_
c4:
Suppose the table "CREATE TABLE user(name,phone)" stores zero or
more phone numbers as a JSON array object in the user.phone field.
To find all users who have any phone number with a 704 area code:


SELECT DISTINCT user.name
  FROM user, json_each(user.phone)
 WHERE json_each.value LIKE '704-%';


Now suppose the user.phone field contains plain text if the user
has only a single phone number and a JSON array if the user has multiple
phone numbers.  The same question is posed: "Which users have a phone number
in the 704 area code?"  But now the json_each() function can only be called
for those users that have two or more phone numbers since json_each()
requires well-formed JSON as its first argument:


SELECT name FROM user WHERE phone LIKE '704-%'
UNION
SELECT user.name
  FROM user, json_each(user.phone)
 WHERE json_valid(user.phone)
   AND json_each.value LIKE '704-%';


Consider a different database with "CREATE TABLE big(json JSON)".
To see a complete line-by-line decomposition of the data:


SELECT big.rowid, fullkey, value
  FROM big, json_tree(big.json)
 WHERE json_tree.type NOT IN ('object','array');


In the previous, the "type NOT IN ('object','array')" term of the
WHERE clause suppresses containers and only lets through leaf elements.
The same effect could be achieved this way:


SELECT big.rowid, fullkey, atom
  FROM big, json_tree(big.json)
 WHERE atom IS NOT NULL;


Suppose each entry in the BIG table is a JSON object 
with a '$.id' field that is a unique identifier
and a '$.partlist' field that can be a deeply nested object.
You want to find the id of every entry that contains one
or more references to uuid '6fa5181e-5721-11e5-a04e-57f3d7b32808' anywhere
in its '$.partlist'.


SELECT DISTINCT json_extract(big.json,'$.id')
  FROM big, json_tree(big.json, '$.partlist')
 WHERE json_tree.key='uuid'
   AND json_tree.value='6fa5181e-5721-11e5-a04e-57f3d7b32808';


c2: The SQLite Bytecode Engine
c3: 1. Executive Summary
c5: opcode.html#executive_summary
c4:
SQLite works by translating SQL statements into bytecode and
then running that bytecode in a virtual machine.  This document
describes how the bytecode engine works.

This document describes SQLite internals.  The information provided
here is not needed for routine application development using SQLite.
This document is intended for people who want to delve more deeply into
the internal operation of SQLite.

The bytecode engine is not an API of SQLite.  Details
about the bytecode engine change from one release of SQLite to the next.
Applications that use SQLite should not depend on any of the details
found in this document.


c2: The SQLite Bytecode Engine
c3: 2. Introduction
c5: opcode.html#introduction
c4:
SQLite works by translating each SQL statement into bytecode and
then running that bytecode.
A prepared statement in SQLite is mostly just the bytecode needed to
implement the corresponding SQL.  The sqlite3_prepare_v2() interface
is a compiler that translates SQL into bytecode.
The sqlite3_step() interface is the virtual machine that runs the
bytecode contained within the prepared statement.

The bytecode virtual machine is the heart of SQLite.
Programmers who want to understand how SQLite operates internally
must be familiar with the bytecode engine.

Historically, the bytecode engine in SQLite is called the
"Virtual DataBase Engine" or "VDBE".  This website uses the terms
"bytecode engine", "VDBE", "virtual machine", and "bytecode virtual
machine" interchangeably, as they all mean the same thing.


This article also uses the terms "bytecode program" and
"prepared statement" interchangeably, as they are mostly the same thing.


c2: The SQLite Bytecode Engine
c3: 2.1. VDBE Source Code
c5: opcode.html#vdbe_source_code
c4:
The source code to the bytecode engine is in the 
vdbe.c source
file.  The opcode definitions in this document are derived
from comments in that source file. The 
source code comments are the canonical source of information
about the bytecode engine.  When in doubt, refer to the source code.

In addition to the primary vdbe.c source code file, there are 
other helper code files in the source tree, all of whose names
begin with "vdbe" - short for "Virtual DataBase Engine".

Remember that the names and meanings of opcodes often change from
one release of SQLite to the next.  So if you are studying the EXPLAIN
output from SQLite, you should reference the version of this document
(or the vdbe.c source code)
that corresponds to the version of SQLite that ran the EXPLAIN.
Otherwise, the description of the opcodes may not be accurate.
This document is derived from SQLite
 version 3.39.3 check-in
4635f4a69c8c2 dated 2022-09-05.


c2: The SQLite Bytecode Engine
c3: 2.2. Instruction Format
c5: opcode.html#instruction_format
c4:
A bytecoded program in SQLite consists of one or more instructions.
Each instruction has an opcode and
five operands named P1, P2  P3, P4, and P5.  The P1, P2, and P3 
operands are 32-bit signed integers.  These operands often refer to 
registers.  For instructions that operate on b-tree cursors,
the P1 operand is usually the cursor number.
For jump instructions, P2 is usually the jump destination.
P4 may be a 32-bit signed integer, a 64-bit signed integer, a
64-bit floating point value, a string literal, a Blob literal,
a pointer to a collating sequence comparison function, or a
pointer to the implementation of an application-defined SQL
function, or various other things.  P5 is an 16-bit unsigned integer
normally used to hold flags.  Bits of the P5 flag can sometimes affect
the opcode in subtle ways.  For example, if the 
SQLITE_NULLEQ (0x0080) bit of the P5 operand
is set on the Eq opcode, then the NULL values compare
equal to one another.  Otherwise NULL values compare different
from one another.


Some opcodes use all five operands.  Some opcodes use
one or two.  Some opcodes use none of the operands.


The bytecode engine begins execution on instruction number 0.
Execution continues until a Halt instruction is seen, or until
the program counter becomes greater than the address of
last instruction, or until there is an error.
When the bytecode engine halts, all memory
that it allocated is released and all database cursors it may
have had open are closed.  If the execution stopped due to an
error, any pending transactions are terminated and changes made
to the database are rolled back.



The ResultRow opcode causes the
bytecode engine to pause and the corresponding sqlite3_step()
call to return SQLITE_ROW.  Before invoking
ResultRow, the bytecoded program will
have loaded the results for a single row of a query into a series
of registers.  C-language APIs such as sqlite3_column_int()
or sqlite3_column_text() extract the query results from those
registers.  The bytecode engine resumes with the next instruction
after the ResultRow on the next call
to sqlite3_step().


c2: The SQLite Bytecode Engine
c3: 2.3. Registers
c5: opcode.html#registers
c4:
Every bytecode program has a fixed (but potentially large) number of
registers.  A single register can hold a variety of objects:

 A NULL value
 A signed 64-bit integer
 An IEEE double-precision (64-bit) floating point number
 An arbitrary length strings
 An arbitrary length BLOB
 A RowSet object (See the RowSetAdd, RowSetRead, and
                      RowSetTest opcodes)
 A Frame object (Used by subprograms - see Program)



A register can also be "Undefined" meaning that it holds no value
at all.  Undefined is different from NULL.  Depending on compile-time
options, an attempt to read an undefined register will usually cause
a run-time error.  If the code generator (sqlite3_prepare_v2())
ever generates a prepared statement that reads an Undefined register,
that is a bug in the code generator.


Registers are numbered beginning with 0.
Most opcodes refer to at least one register.

The number of registers in a single prepared statement is fixed
at compile-time.  The content of all registers is cleared when
a prepared statement is reset or
finalized.

The internal Mem object stores the value for a single register.
The abstract sqlite3_value object that is exposed in the API is really
just a Mem object or register.


c2: The SQLite Bytecode Engine
c3: 2.4. B-Tree Cursors
c5: opcode.html#b_tree_cursors
c4:
A prepared statement can have
zero or more open cursors.  Each cursor is identified by a
small integer, which is usually the P1 parameter to the opcode
that uses the cursor.
There can be multiple cursors open on the same index or table.
All cursors operate independently, even cursors pointing to the same
indices or tables.
The only way for the virtual machine to interact with a database
file is through a cursor.
Instructions in the virtual machine can create a new cursor 
(ex: OpenRead or OpenWrite),
read data from a cursor (Column),
advance the cursor to the next entry in the table
(ex: Next or Prev), and so forth.
All cursors are automatically
closed when the prepared statement is reset or
finalized.


c2: The SQLite Bytecode Engine
c3: 2.5. Subroutines, Coroutines, and Subprograms
c5: opcode.html#subroutines_coroutines_and_subprograms
c4:
The bytecode engine has no stack on which to store the return address
of a subroutine.  Return addresses must be stored in registers.
Hence, bytecode subroutines are not reentrant.


The Gosub opcode stores the current program counter into
register P1 then jumps to address P2.  The Return opcode jumps
to address P1+1.  Hence, every subroutine is associated with two integers:
the address of the entry point in the subroutine and the register number
that is used to hold the return address.

The Yield opcode swaps the value of the program counter with
the integer value in register P1.  This opcode is used to implement
coroutines.  Coroutines are often used to implement subqueries from
which content is pulled on an as-needed basis.


Triggers need to be reentrant.


Since bytecode
subroutines are not reentrant a different mechanism must be used to
implement triggers.  Each trigger is implemented using a separate bytecode
program with its own opcodes, program counter, and register set.  The
Program opcode invokes the trigger subprogram.  The Program instruction
allocates and initializes a fresh register set for each invocation of the
subprogram, so subprograms can be reentrant and recursive.  The
Param opcode is used by subprograms to access content in registers
of the calling bytecode program.


c2: The SQLite Bytecode Engine
c3: 2.6. Self-Altering Code
c5: opcode.html#self_altering_code
c4:
Some opcodes are self-altering.
For example, the Init opcode (which is always the first opcode
in every bytecode program) increments its P1 operand.  Subsequent
Once opcodes compare their P1 operands to the P1 value for
the Init opcode in order to determine if the one-time initialization
code that follows should be skipped.
Another example is the String8 opcode which converts its P4
operand from UTF-8 into the correct database string encoding, then
converts itself into a String opcode.


c2: The SQLite Bytecode Engine
c3: 3. Viewing The Bytecode
c5: opcode.html#viewing_the_bytecode
c4:
Every SQL statement that SQLite interprets results in a program
for the virtual machine.  But if the SQL statement begins with
the keyword EXPLAIN the virtual machine will not execute the
program.  Instead, the instructions of the program will be returned,
one instruction per row,
like a query result.  This feature is useful for debugging and
for learning how the virtual machine operates.  For example:


$&nbsp;sqlite3&nbsp;ex1.db
sqlite&gt;&nbsp;explain&nbsp;delete&nbsp;from&nbsp;tbl1&nbsp;where&nbsp;two&lt;20;
addr&nbsp;&nbsp;opcode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p1&nbsp;&nbsp;&nbsp;&nbsp;p2&nbsp;&nbsp;&nbsp;&nbsp;p3&nbsp;&nbsp;&nbsp;&nbsp;p4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;p5&nbsp;&nbsp;comment&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
----&nbsp;&nbsp;-------------&nbsp;&nbsp;----&nbsp;&nbsp;----&nbsp;&nbsp;----&nbsp;&nbsp;-------------&nbsp;&nbsp;--&nbsp;&nbsp;-------------
0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Init&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;12&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;00&nbsp;&nbsp;Start&nbsp;at&nbsp;12&nbsp;&nbsp;
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Null&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;00&nbsp;&nbsp;r[1]=NULL&nbsp;&nbsp;&nbsp;&nbsp;
2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OpenWrite&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;00&nbsp;&nbsp;root=2&nbsp;iDb=0;&nbsp;tbl1
3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rewind&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Column&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;00&nbsp;&nbsp;r[2]=tbl1.two
5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ge&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(BINARY)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;51&nbsp;&nbsp;if&nbsp;r[2]&gt;=r[3]&nbsp;goto&nbsp;9
6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rowid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;00&nbsp;&nbsp;r[4]=rowid&nbsp;&nbsp;&nbsp;
7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Once&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tbl1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;02&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Next&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;01&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
10&nbsp;&nbsp;&nbsp;&nbsp;Noop&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
11&nbsp;&nbsp;&nbsp;&nbsp;Halt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
12&nbsp;&nbsp;&nbsp;&nbsp;Transaction&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;01&nbsp;&nbsp;usesStmtJournal=0
13&nbsp;&nbsp;&nbsp;&nbsp;TableLock&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tbl1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;00&nbsp;&nbsp;iDb=0&nbsp;root=2&nbsp;write=1
14&nbsp;&nbsp;&nbsp;&nbsp;Integer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;20&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;00&nbsp;&nbsp;r[3]=20&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
15&nbsp;&nbsp;&nbsp;&nbsp;Goto&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;00

Any application can run an EXPLAIN query to get output similar to 
the above.
However, indentation to show the loop structure is not generated
by the SQLite core.  The command-line shell contains extra logic
for indenting loops.
Also, the "comment" column in the EXPLAIN output
is only provided if SQLite is compiled with the
-DSQLITE_ENABLE_EXPLAIN_COMMENTS options.

When SQLite is compiled with the SQLITE_DEBUG compile-time option,
extra PRAGMA commands are available that are useful for debugging and
for exploring the operation of the VDBE.  For example the vdbe_trace
pragma can be enabled to cause a disassembly of each VDBE opcode to be
printed on standard output as the opcode is executed.  These debugging
pragmas include:

 PRAGMA parser_trace
 PRAGMA vdbe_addoptrace
 PRAGMA vdbe_debug
 PRAGMA vdbe_listing
 PRAGMA vdbe_trace


c2: The SQLite Bytecode Engine
c3: 4. The Opcodes
c5: opcode.html#the_opcodes
c4:
There are currently 186
opcodes defined by the virtual machine.
All currently defined opcodes are described in the table below.
This table was generated automatically by scanning the source code
from the file
vdbe.c.


Remember: The VDBE opcodes are not part of the interface 
definition for SQLite.  The number of opcodes and their names and meanings
change from one release of SQLite to the next.
The opcodes shown in the table below are valid for SQLite
 version 3.39.3 check-in
4635f4a69c8c2 dated 2022-09-05.



  
  
  
  
  Opcode NameDescription

Abortable
Verify that an Abort can happen.  Assert if an Abort at this point
might cause database corruption.  This opcode only appears in debugging
builds.

An Abort is safe if either there have been no writes, or if there is
an active statement journal.

Add
Add the value in register P1 to the value in register P2
and store the result in register P3.
If either input is NULL, the result is NULL.

AddImm
Add the constant P2 to the value in register P1.
The result is always an integer.

To force any register to be an integer, just add 0.

Affinity
Apply affinities to a range of P2 registers starting with P1.

P4 is a string that is P2 characters long. The N-th character of the
string indicates the column affinity that should be used for the N-th
memory cell in the range.

AggFinal
P1 is the memory location that is the accumulator for an aggregate
or window function.  Execute the finalizer function
for an aggregate and store the result in P1.

P2 is the number of arguments that the step function takes and
P4 is a pointer to the FuncDef for this function.  The P2
argument is not used by this opcode.  It is only there to disambiguate
functions that can take varying numbers of arguments.  The
P4 argument is only needed for the case where
the step function was not previously called.

AggInverse
Execute the xInverse function for an aggregate.
The function has P5 arguments.  P4 is a pointer to the
FuncDef structure that specifies the function.  Register P3 is the
accumulator.

The P5 arguments are taken from register P2 and its
successors.

AggStep
Execute the xStep function for an aggregate.
The function has P5 arguments.  P4 is a pointer to the
FuncDef structure that specifies the function.  Register P3 is the
accumulator.

The P5 arguments are taken from register P2 and its
successors.

AggStep1
Execute the xStep (if P1==0) or xInverse (if P1!=0) function for an
aggregate.  The function has P5 arguments.  P4 is a pointer to the
FuncDef structure that specifies the function.  Register P3 is the
accumulator.

The P5 arguments are taken from register P2 and its
successors.

This opcode is initially coded as OP_AggStep0.  On first evaluation,
the FuncDef stored in P4 is converted into an sqlite3_context and
the opcode is changed.  In this way, the initialization of the
sqlite3_context only happens once, instead of on each call to the
step function.

AggValue
Invoke the xValue() function and store the result in register P3.

P2 is the number of arguments that the step function takes and
P4 is a pointer to the FuncDef for this function.  The P2
argument is not used by this opcode.  It is only there to disambiguate
functions that can take varying numbers of arguments.  The
P4 argument is only needed for the case where
the step function was not previously called.

And
Take the logical AND of the values in registers P1 and P2 and
write the result into register P3.

If either P1 or P2 is 0 (false) then the result is 0 even if
the other input is NULL.  A NULL and true or two NULLs give
a NULL output.

AutoCommit
Set the database auto-commit flag to P1 (1 or 0). If P2 is true, roll
back any currently active btree transactions. If there are any active
VMs (apart from this one), then a ROLLBACK fails.  A COMMIT fails if
there are active writing VMs or active VMs that use shared cache.

This instruction causes the VM to halt.

BeginSubrtn
Mark the beginning of a subroutine that can be entered in-line
or that can be called using Gosub.  The subroutine should
be terminated by an Return instruction that has a P1 operand that
is the same as the P2 operand to this opcode and that has P3 set to 1.
If the subroutine is entered in-line, then the Return will simply
fall through.  But if the subroutine is entered using Gosub, then
the Return will jump back to the first instruction after the Gosub.

This routine works by loading a NULL into the P2 register.  When the
return address register contains a NULL, the Return instruction is
a no-op that simply falls through to the next instruction (assuming that
the Return opcode has a P3 value of 1).  Thus if the subroutine is
entered in-line, then the Return will cause in-line execution to
continue.  But if the subroutine is entered via Gosub, then the
Return will cause a return to the address following the Gosub.

This opcode is identical to Null.  It has a different name
only to make the byte code easier to read and verify.

BitAnd
Take the bit-wise AND of the values in register P1 and P2 and
store the result in register P3.
If either input is NULL, the result is NULL.

BitNot
Interpret the content of register P1 as an integer.  Store the
ones-complement of the P1 value into register P2.  If P1 holds
a NULL then store a NULL in P2.

BitOr
Take the bit-wise OR of the values in register P1 and P2 and
store the result in register P3.
If either input is NULL, the result is NULL.

Blob
P4 points to a blob of data P1 bytes long.  Store this
blob in register P2.  If P4 is a NULL pointer, then construct
a zero-filled blob that is P1 bytes long in P2.

Cast
Force the value in register P1 to be the type defined by P2.


 P2=='A' &rarr; BLOB
 P2=='B' &rarr; TEXT
 P2=='C' &rarr; NUMERIC
 P2=='D' &rarr; INTEGER
 P2=='E' &rarr; REAL


A NULL value is not changed by this routine.  It remains NULL.

Checkpoint
Checkpoint database P1. This is a no-op if P1 is not currently in
WAL mode. Parameter P2 is one of SQLITE_CHECKPOINT_PASSIVE, FULL,
RESTART, or TRUNCATE.  Write 1 or 0 into mem&#91;P3&#93; if the checkpoint returns
SQLITE_BUSY or not, respectively.  Write the number of pages in the
WAL after the checkpoint into mem&#91;P3+1&#93; and the number of pages
in the WAL that have been checkpointed after the checkpoint
completes into mem&#91;P3+2&#93;.  However on an error, mem&#91;P3+1&#93; and
mem&#91;P3+2&#93; are initialized to -1.

Clear
Delete all contents of the database table or index whose root page
in the database file is given by P1.  But, unlike Destroy, do not
remove the table or index from the database file.

The table being clear is in the main database file if P2==0.  If
P2==1 then the table to be clear is in the auxiliary database file
that is used to store tables create using CREATE TEMPORARY TABLE.

If the P3 value is non-zero, then the row change count is incremented
by the number of rows in the table being cleared. If P3 is greater
than zero, then the value stored in register P3 is also incremented
by the number of rows in the table being cleared.

See also: Destroy

Close
Close a cursor previously opened as P1.  If P1 is not
currently open, this instruction is a no-op.

ClrSubtype
Clear the subtype from register P1.

CollSeq
P4 is a pointer to a CollSeq object. If the next call to a user function
or aggregate calls sqlite3GetFuncCollSeq(), this collation sequence will
be returned. This is used by the built-in min(), max() and nullif()
functions.

If P1 is not zero, then it is a register that a subsequent min() or
max() aggregate will set to 1 if the current row is not the minimum or
maximum.  The P1 register is initialized to 0 by this instruction.

The interface used by the implementation of the aforementioned functions
to retrieve the collation sequence set by this opcode is not available
publicly.  Only built-in functions have access to this feature.

Column
Interpret the data that cursor P1 points to as a structure built using
the MakeRecord instruction.  (See the MakeRecord opcode for additional
information about the format of the data.)  Extract the P2-th column
from this record.  If there are less that (P2+1)
values in the record, extract a NULL.

The value extracted is stored in register P3.

If the record contains fewer than P2 fields, then extract a NULL.  Or,
if the P4 argument is a P4_MEM use the value of the P4 argument as
the result.

If the OPFLAG_LENGTHARG and OPFLAG_TYPEOFARG bits are set on P5 then
the result is guaranteed to only be used as the argument of a length()
or typeof() function, respectively.  The loading of large blobs can be
skipped for length() and all content loading can be skipped for typeof().

ColumnsUsed
This opcode (which only exists if SQLite was compiled with
SQLITE_ENABLE_COLUMN_USED_MASK) identifies which columns of the
table or index for cursor P1 are used.  P4 is a 64-bit integer
(P4_INT64) in which the first 63 bits are one for each of the
first 63 columns of the table or index that are actually used
by the cursor.  The high-order bit is set if any column after
the 64th is used.

Compare
Compare two vectors of registers in reg(P1)..reg(P1+P3-1) (call this
vector "A") and in reg(P2)..reg(P2+P3-1) ("B").  Save the result of
the comparison for use by the next Jump instruct.

If P5 has the OPFLAG_PERMUTE bit set, then the order of comparison is
determined by the most recent Permutation operator.  If the
OPFLAG_PERMUTE bit is clear, then register are compared in sequential
order.

P4 is a KeyInfo structure that defines collating sequences and sort
orders for the comparison.  The permutation applies to registers
only.  The KeyInfo elements are used sequentially.

The comparison is a sort comparison, so NULLs compare equal,
NULLs are less than numbers, numbers are less than strings,
and strings are less than blobs.

This opcode must be immediately followed by an Jump opcode.

Concat
Add the text in register P1 onto the end of the text in
register P2 and store the result in register P3.
If either the P1 or P2 text are NULL then store NULL in P3.

P3 = P2 || P1

It is illegal for P1 and P3 to be the same register. Sometimes,
if P3 is the same register as P2, the implementation is able
to avoid a memcpy().

Copy
Make a copy of registers P1..P1+P3 into registers P2..P2+P3.

If the 0x0002 bit of P5 is set then also clear the MEM_Subtype flag in the
destination.  The 0x0001 bit of P5 indicates that this Copy opcode cannot
be merged.  The 0x0001 bit is used by the query planner and does not
come into play during query execution.

This instruction makes a deep copy of the value.  A duplicate
is made of any string or blob constant.  See also SCopy.

Count
Store the number of entries (an integer value) in the table or index
opened by cursor P1 in register P2.

If P3==0, then an exact count is obtained, which involves visiting
every btree page of the table.  But if P3 is non-zero, an estimate
is returned based on the current cursor position.

CreateBtree
Allocate a new b-tree in the main database file if P1==0 or in the
TEMP database file if P1==1 or in an attached database if
P1&gt;1.  The P3 argument must be 1 (BTREE_INTKEY) for a rowid table
it must be 2 (BTREE_BLOBKEY) for an index or WITHOUT ROWID table.
The root page number of the new b-tree is stored in register P2.

CursorHint
Provide a hint to cursor P1 that it only needs to return rows that
satisfy the Expr in P4.  TK_REGISTER terms in the P4 expression refer
to values currently held in registers.  TK_COLUMN terms in the P4
expression refer to columns in the b-tree to which cursor P1 is pointing.

CursorLock
Lock the btree to which cursor P1 is pointing so that the btree cannot be
written by an other cursor.

CursorUnlock
Unlock the btree to which cursor P1 is pointing so that it can be
written by other cursors.

DecrJumpZero
Register P1 must hold an integer.  Decrement the value in P1
and jump to P2 if the new value is exactly zero.

DeferredSeek
P1 is an open index cursor and P3 is a cursor on the corresponding
table.  This opcode does a deferred seek of the P3 table cursor
to the row that corresponds to the current row of P1.

This is a deferred seek.  Nothing actually happens until
the cursor is used to read a record.  That way, if no reads
occur, no unnecessary I/O happens.

P4 may be an array of integers (type P4_INTARRAY) containing
one entry for each column in the P3 table.  If array entry a(i)
is non-zero, then reading column a(i)-1 from cursor P3 is
equivalent to performing the deferred seek and then reading column i
from P1.  This information is stored in P3 and used to redirect
reads against P3 over to P1, thus possibly avoiding the need to
seek and read cursor P3.

Delete
Delete the record at which the P1 cursor is currently pointing.

If the OPFLAG_SAVEPOSITION bit of the P5 parameter is set, then
the cursor will be left pointing at  either the next or the previous
record in the table. If it is left pointing at the next record, then
the next Next instruction will be a no-op. As a result, in this case
it is ok to delete a record from within a Next loop. If
OPFLAG_SAVEPOSITION bit of P5 is clear, then the cursor will be
left in an undefined state.

If the OPFLAG_AUXDELETE bit is set on P5, that indicates that this
delete one of several associated with deleting a table row and all its
associated index entries.  Exactly one of those deletes is the "primary"
delete.  The others are all on OPFLAG_FORDELETE cursors or else are
marked with the AUXDELETE flag.

If the OPFLAG_NCHANGE flag of P2 (NB: P2 not P5) is set, then the row
change count is incremented (otherwise not).

P1 must not be pseudo-table.  It has to be a real table with
multiple rows.

If P4 is not NULL then it points to a Table object. In this case either
the update or pre-update hook, or both, may be invoked. The P1 cursor must
have been positioned using NotFound prior to invoking this opcode in
this case. Specifically, if one is configured, the pre-update hook is
invoked if P4 is not NULL. The update-hook is invoked if one is configured,
P4 is not NULL, and the OPFLAG_NCHANGE flag is set in P2.

If the OPFLAG_ISUPDATE flag is set in P2, then P3 contains the address
of the memory cell that contains the value that the rowid of the row will
be set to by the update.

Destroy
Delete an entire database table or index whose root page in the database
file is given by P1.

The table being destroyed is in the main database file if P3==0.  If
P3==1 then the table to be clear is in the auxiliary database file
that is used to store tables create using CREATE TEMPORARY TABLE.

If AUTOVACUUM is enabled then it is possible that another root page
might be moved into the newly deleted root page in order to keep all
root pages contiguous at the beginning of the database.  The former
value of the root page that moved - its value before the move occurred -
is stored in register P2. If no page movement was required (because the
table being dropped was already the last one in the database) then a
zero is stored in register P2.  If AUTOVACUUM is disabled then a zero
is stored in register P2.

This opcode throws an error if there are any active reader VMs when
it is invoked. This is done to avoid the difficulty associated with
updating existing cursors when a root page is moved in an AUTOVACUUM
database. This error is thrown even if the database is not an AUTOVACUUM
db in order to avoid introducing an incompatibility between autovacuum
and non-autovacuum modes.

See also: Clear

Divide
Divide the value in register P1 by the value in register P2
and store the result in register P3 (P3=P2/P1). If the value in
register P1 is zero, then the result is NULL. If either input is
NULL, the result is NULL.

DropIndex
Remove the internal (in-memory) data structures that describe
the index named P4 in database P1.  This is called after an index
is dropped from disk (using the Destroy opcode)
in order to keep the internal representation of the
schema consistent with what is on disk.

DropTable
Remove the internal (in-memory) data structures that describe
the table named P4 in database P1.  This is called after a table
is dropped from disk (using the Destroy opcode) in order to keep
the internal representation of the
schema consistent with what is on disk.

DropTrigger
Remove the internal (in-memory) data structures that describe
the trigger named P4 in database P1.  This is called after a trigger
is dropped from disk (using the Destroy opcode) in order to keep
the internal representation of the
schema consistent with what is on disk.

ElseEq
This opcode must follow an Lt or Gt comparison operator.  There
can be zero or more OP_ReleaseReg opcodes intervening, but no other
opcodes are allowed to occur between this instruction and the previous
Lt or Gt.

If result of an Eq comparison on the same two operands as the
prior Lt or Gt would have been true, then jump to P2.
If the result of an Eq comparison on the two previous
operands would have been false or NULL, then fall through.

EndCoroutine
The instruction at the address in register P1 is a Yield.
Jump to the P2 parameter of that Yield.
After the jump, register P1 becomes undefined.

See also: InitCoroutine

Eq
Compare the values in register P1 and P3.  If reg(P3)==reg(P1) then
jump to address P2.

The SQLITE_AFF_MASK portion of P5 must be an affinity character -
SQLITE_AFF_TEXT, SQLITE_AFF_INTEGER, and so forth. An attempt is made
to coerce both inputs according to this affinity before the
comparison is made. If the SQLITE_AFF_MASK is 0x00, then numeric
affinity is used. Note that the affinity conversions are stored
back into the input registers P1 and P3.  So this opcode can cause
persistent changes to registers P1 and P3.

Once any conversions have taken place, and neither value is NULL,
the values are compared. If both values are blobs then memcmp() is
used to determine the results of the comparison.  If both values
are text, then the appropriate collating function specified in
P4 is used to do the comparison.  If P4 is not specified then
memcmp() is used to compare text string.  If both values are
numeric, then a numeric comparison is used. If the two values
are of different types, then numbers are considered less than
strings and strings are considered less than blobs.

If SQLITE_NULLEQ is set in P5 then the result of comparison is always either
true or false and is never NULL.  If both operands are NULL then the result
of comparison is true.  If either operand is NULL then the result is false.
If neither operand is NULL the result is the same as it would be if
the SQLITE_NULLEQ flag were omitted from P5.

This opcode saves the result of comparison for use by the new
Jump opcode.

Expire
Cause precompiled statements to expire.  When an expired statement
is executed using sqlite3_step() it will either automatically
reprepare itself (if it was originally created using sqlite3_prepare_v2())
or it will fail with SQLITE_SCHEMA.

If P1 is 0, then all SQL statements become expired. If P1 is non-zero,
then only the currently executing statement is expired.

If P2 is 0, then SQL statements are expired immediately.  If P2 is 1,
then running SQL statements are allowed to continue to run to completion.
The P2==1 case occurs when a CREATE INDEX or similar schema change happens
that might help the statement run faster but which does not affect the
correctness of operation.

Filter
Compute a hash on the key contained in the P4 registers starting
with r&#91;P3&#93;.  Check to see if that hash is found in the
bloom filter hosted by register P1.  If it is not present then
maybe jump to P2.  Otherwise fall through.

False negatives are harmless.  It is always safe to fall through,
even if the value is in the bloom filter.  A false negative causes
more CPU cycles to be used, but it should still yield the correct
answer.  However, an incorrect answer may well arise from a
false positive - if the jump is taken when it should fall through.

FilterAdd
Compute a hash on the P4 registers starting with r&#91;P3&#93; and
add that hash to the bloom filter contained in r&#91;P1&#93;.

FinishSeek
If cursor P1 was previously moved via DeferredSeek, complete that
seek operation now, without further delay.  If the cursor seek has
already occurred, this instruction is a no-op.

FkCheck
Halt with an SQLITE_CONSTRAINT error if there are any unresolved
foreign key constraint violations.  If there are no foreign key
constraint violations, this is a no-op.

FK constraint violations are also checked when the prepared statement
exits.  This opcode is used to raise foreign key constraint errors prior
to returning results such as a row change count or the result of a
RETURNING clause.

FkCounter
Increment a "constraint counter" by P2 (P2 may be negative or positive).
If P1 is non-zero, the database constraint counter is incremented
(deferred foreign key constraints). Otherwise, if P1 is zero, the
statement counter is incremented (immediate foreign key constraints).

FkIfZero
This opcode tests if a foreign key constraint-counter is currently zero.
If so, jump to instruction P2. Otherwise, fall through to the next
instruction.

If P1 is non-zero, then the jump is taken if the database constraint-counter
is zero (the one that counts deferred constraint violations). If P1 is
zero, the jump is taken if the statement constraint-counter is zero
(immediate foreign key constraint violations).

Found
If P4==0 then register P3 holds a blob constructed by MakeRecord.  If
P4&gt;0 then register P3 is the first of P4 registers that form an unpacked
record.

Cursor P1 is on an index btree.  If the record identified by P3 and P4
is a prefix of any entry in P1 then a jump is made to P2 and
P1 is left pointing at the matching entry.

This operation leaves the cursor in a state where it can be
advanced in the forward direction.  The Next instruction will work,
but not the Prev instruction.

See also: NotFound, NoConflict, NotExists. SeekGe

Function
Invoke a user function (P4 is a pointer to an sqlite3_context object that
contains a pointer to the function to be run) with arguments taken
from register P2 and successors.  The number of arguments is in
the sqlite3_context object that P4 points to.
The result of the function is stored
in register P3.  Register P3 must not be one of the function inputs.

P1 is a 32-bit bitmask indicating whether or not each argument to the
function was determined to be constant at compile time. If the first
argument was constant then bit 0 of P1 is set. This is used to determine
whether meta data associated with a user function argument using the
sqlite3_set_auxdata() API may be safely retained until the next
invocation of this opcode.

See also: AggStep, AggFinal, PureFunc

Ge
This works just like the Lt opcode except that the jump is taken if
the content of register P3 is greater than or equal to the content of
register P1.  See the Lt opcode for additional information.

Gosub
Write the current address onto register P1
and then jump to address P2.

Goto
An unconditional jump to address P2.
The next instruction executed will be
the one at index P2 from the beginning of
the program.

The P1 parameter is not actually used by this opcode.  However, it
is sometimes set to 1 instead of 0 as a hint to the command-line shell
that this Goto is the bottom of a loop and that the lines from P2 down
to the current line should be indented for EXPLAIN output.

Gt
This works just like the Lt opcode except that the jump is taken if
the content of register P3 is greater than the content of
register P1.  See the Lt opcode for additional information.

Halt
Exit immediately.  All open cursors, etc are closed
automatically.

P1 is the result code returned by sqlite3_exec(), sqlite3_reset(),
or sqlite3_finalize().  For a normal halt, this should be SQLITE_OK (0).
For errors, it can be some other value.  If P1!=0 then P2 will determine
whether or not to rollback the current transaction.  Do not rollback
if P2==OE_Fail. Do the rollback if P2==OE_Rollback.  If P2==OE_Abort,
then back out all changes that have occurred during this execution of the
VDBE, but do not rollback the transaction.

If P4 is not null then it is an error message string.

P5 is a value between 0 and 4, inclusive, that modifies the P4 string.

0:  (no change)
1:  NOT NULL contraint failed: P4
2:  UNIQUE constraint failed: P4
3:  CHECK constraint failed: P4
4:  FOREIGN KEY constraint failed: P4

If P5 is not zero and P4 is NULL, then everything after the ":" is
omitted.

There is an implied "Halt 0 0 0" instruction inserted at the very end of
every program.  So a jump past the last instruction of the program
is the same as executing Halt.

HaltIfNull
Check the value in register P3.  If it is NULL then Halt using
parameter P1, P2, and P4 as if this were a Halt instruction.  If the
value in register P3 is not NULL, then this routine is a no-op.
The P5 parameter should be 1.

IdxDelete
The content of P3 registers starting at register P2 form
an unpacked index key. This opcode removes that entry from the
index opened by cursor P1.

If P5 is not zero, then raise an SQLITE_CORRUPT_INDEX error
if no matching index entry is found.  This happens when running
an UPDATE or DELETE statement and the index entry to be updated
or deleted is not found.  For some uses of IdxDelete
(example:  the EXCEPT operator) it does not matter that no matching
entry is found.  For those cases, P5 is zero.  Also, do not raise
this (self-correcting and non-critical) error if in writable_schema mode.

IdxGE
The P4 register values beginning with P3 form an unpacked index
key that omits the PRIMARY KEY.  Compare this key value against the index
that P1 is currently pointing to, ignoring the PRIMARY KEY or ROWID
fields at the end.

If the P1 index entry is greater than or equal to the key value
then jump to P2.  Otherwise fall through to the next instruction.

IdxGT
The P4 register values beginning with P3 form an unpacked index
key that omits the PRIMARY KEY.  Compare this key value against the index
that P1 is currently pointing to, ignoring the PRIMARY KEY or ROWID
fields at the end.

If the P1 index entry is greater than the key value
then jump to P2.  Otherwise fall through to the next instruction.

IdxInsert
Register P2 holds an SQL index key made using the
MakeRecord instructions.  This opcode writes that key
into the index P1.  Data for the entry is nil.

If P4 is not zero, then it is the number of values in the unpacked
key of reg(P2).  In that case, P3 is the index of the first register
for the unpacked key.  The availability of the unpacked key can sometimes
be an optimization.

If P5 has the OPFLAG_APPEND bit set, that is a hint to the b-tree layer
that this insert is likely to be an append.

If P5 has the OPFLAG_NCHANGE bit set, then the change counter is
incremented by this instruction.  If the OPFLAG_NCHANGE bit is clear,
then the change counter is unchanged.

If the OPFLAG_USESEEKRESULT flag of P5 is set, the implementation might
run faster by avoiding an unnecessary seek on cursor P1.  However,
the OPFLAG_USESEEKRESULT flag must only be set if there have been no prior
seeks on the cursor or if the most recent seek used a key equivalent
to P2.

This instruction only works for indices.  The equivalent instruction
for tables is Insert.

IdxLE
The P4 register values beginning with P3 form an unpacked index
key that omits the PRIMARY KEY or ROWID.  Compare this key value against
the index that P1 is currently pointing to, ignoring the PRIMARY KEY or
ROWID on the P1 index.

If the P1 index entry is less than or equal to the key value then jump
to P2. Otherwise fall through to the next instruction.

IdxLT
The P4 register values beginning with P3 form an unpacked index
key that omits the PRIMARY KEY or ROWID.  Compare this key value against
the index that P1 is currently pointing to, ignoring the PRIMARY KEY or
ROWID on the P1 index.

If the P1 index entry is less than the key value then jump to P2.
Otherwise fall through to the next instruction.

IdxRowid
Write into register P2 an integer which is the last entry in the record at
the end of the index key pointed to by cursor P1.  This integer should be
the rowid of the table entry to which this index entry points.

See also: Rowid, MakeRecord.

If
Jump to P2 if the value in register P1 is true.  The value
is considered true if it is numeric and non-zero.  If the value
in P1 is NULL then take the jump if and only if P3 is non-zero.

IfNoHope
Register P3 is the first of P4 registers that form an unpacked
record.  Cursor P1 is an index btree.  P2 is a jump destination.
In other words, the operands to this opcode are the same as the
operands to NotFound and IdxGT.

This opcode is an optimization attempt only.  If this opcode always
falls through, the correct answer is still obtained, but extra works
is performed.

A value of N in the seekHit flag of cursor P1 means that there exists
a key P3:N that will match some record in the index.  We want to know
if it is possible for a record P3:P4 to match some record in the
index.  If it is not possible, we can skips some work.  So if seekHit
is less than P4, attempt to find out if a match is possible by running
NotFound.

This opcode is used in IN clause processing for a multi-column key.
If an IN clause is attached to an element of the key other than the
left-most element, and if there are no matches on the most recent
seek over the whole key, then it might be that one of the key element
to the left is prohibiting a match, and hence there is "no hope" of
any match regardless of how many IN clause elements are checked.
In such a case, we abandon the IN clause search early, using this
opcode.  The opcode name comes from the fact that the
jump is taken if there is "no hope" of achieving a match.

See also: NotFound, SeekHit

IfNot
Jump to P2 if the value in register P1 is False.  The value
is considered false if it has a numeric value of zero.  If the value
in P1 is NULL then take the jump if and only if P3 is non-zero.

IfNotOpen
If cursor P1 is not open, jump to instruction P2. Otherwise, fall through.

IfNotZero
Register P1 must contain an integer.  If the content of register P1 is
initially greater than zero, then decrement the value in register P1.
If it is non-zero (negative or positive) and then also jump to P2.
If register P1 is initially zero, leave it unchanged and fall through.

IfNullRow
Check the cursor P1 to see if it is currently pointing at a NULL row.
If it is, then set register P3 to NULL and jump immediately to P2.
If P1 is not on a NULL row, then fall through without making any
changes.

IfPos
Register P1 must contain an integer.
If the value of register P1 is 1 or greater, subtract P3 from the
value in P1 and jump to P2.

If the initial value of register P1 is less than 1, then the
value is unchanged and control passes through to the next instruction.

IfSmaller
Estimate the number of rows in the table P1.  Jump to P2 if that
estimate is less than approximately 2**(0.1*P3).

IncrVacuum
Perform a single step of the incremental vacuum procedure on
the P1 database. If the vacuum has finished, jump to instruction
P2. Otherwise, fall through to the next instruction.

Init
Programs contain a single instance of this opcode as the very first
opcode.

If tracing is enabled (by the sqlite3_trace()) interface, then
the UTF-8 string contained in P4 is emitted on the trace callback.
Or if P4 is blank, use the string returned by sqlite3_sql().

If P2 is not zero, jump to instruction P2.

Increment the value of P1 so that Once opcodes will jump the
first time they are evaluated for this run.

If P3 is not zero, then it is an address to jump to if an SQLITE_CORRUPT
error is encountered.

InitCoroutine
Set up register P1 so that it will Yield to the coroutine
located at address P3.

If P2!=0 then the coroutine implementation immediately follows
this opcode.  So jump over the coroutine implementation to
address P2.

See also: EndCoroutine

Insert
Write an entry into the table of cursor P1.  A new entry is
created if it doesn't already exist or the data for an existing
entry is overwritten.  The data is the value MEM_Blob stored in register
number P2. The key is stored in register P3. The key must
be a MEM_Int.

If the OPFLAG_NCHANGE flag of P5 is set, then the row change count is
incremented (otherwise not).  If the OPFLAG_LASTROWID flag of P5 is set,
then rowid is stored for subsequent return by the
sqlite3_last_insert_rowid() function (otherwise it is unmodified).

If the OPFLAG_USESEEKRESULT flag of P5 is set, the implementation might
run faster by avoiding an unnecessary seek on cursor P1.  However,
the OPFLAG_USESEEKRESULT flag must only be set if there have been no prior
seeks on the cursor or if the most recent seek used a key equal to P3.

If the OPFLAG_ISUPDATE flag is set, then this opcode is part of an
UPDATE operation.  Otherwise (if the flag is clear) then this opcode
is part of an INSERT operation.  The difference is only important to
the update hook.

Parameter P4 may point to a Table structure, or may be NULL. If it is
not NULL, then the update-hook (sqlite3.xUpdateCallback) is invoked
following a successful insert.

(WARNING/TODO: If P1 is a pseudo-cursor and P2 is dynamically
allocated, then ownership of P2 is transferred to the pseudo-cursor
and register P2 becomes ephemeral.  If the cursor is changed, the
value of register P2 will then change.  Make sure this does not
cause any problems.)

This instruction only works on tables.  The equivalent instruction
for indices is IdxInsert.

Int64
P4 is a pointer to a 64-bit integer value.
Write that value into register P2.

IntCopy
Transfer the integer value held in register P1 into register P2.

This is an optimized version of SCopy that works only for integer
values.

Integer
The 32-bit integer value P1 is written into register P2.

IntegrityCk
Do an analysis of the currently open database.  Store in
register P1 the text of an error message describing any problems.
If no problems are found, store a NULL in register P1.

The register P3 contains one less than the maximum number of allowed errors.
At most reg(P3) errors will be reported.
In other words, the analysis stops as soon as reg(P1) errors are
seen.  Reg(P1) is updated with the number of errors remaining.

The root page numbers of all tables in the database are integers
stored in P4_INTARRAY argument.

If P5 is not zero, the check is done on the auxiliary database
file, not the main database file.

This opcode is used to implement the integrity_check pragma.

IsNull
Jump to P2 if the value in register P1 is NULL.

IsNullOrType
Jump to P2 if the value in register P1 is NULL or has a datatype P3.
P3 is an integer which should be one of SQLITE_INTEGER, SQLITE_FLOAT,
SQLITE_BLOB, SQLITE_NULL, or SQLITE_TEXT.

IsTrue
This opcode implements the IS TRUE, IS FALSE, IS NOT TRUE, and
IS NOT FALSE operators.

Interpret the value in register P1 as a boolean value.  Store that
boolean (a 0 or 1) in register P2.  Or if the value in register P1 is
NULL, then the P3 is stored in register P2.  Invert the answer if P4
is 1.

The logic is summarized like this:


 If P3==0 and P4==0  then  r&#91;P2&#93; := r&#91;P1&#93; IS TRUE
 If P3==1 and P4==1  then  r&#91;P2&#93; := r&#91;P1&#93; IS FALSE
 If P3==0 and P4==1  then  r&#91;P2&#93; := r&#91;P1&#93; IS NOT TRUE
 If P3==1 and P4==0  then  r&#91;P2&#93; := r&#91;P1&#93; IS NOT FALSE


JournalMode
Change the journal mode of database P1 to P3. P3 must be one of the
PAGER_JOURNALMODE_XXX values. If changing between the various rollback
modes (delete, truncate, persist, off and memory), this is a simple
operation. No IO is required.

If changing into or out of WAL mode the procedure is more complicated.

Write a string containing the final journal-mode to register P2.

Jump
Jump to the instruction at address P1, P2, or P3 depending on whether
in the most recent Compare instruction the P1 vector was less than
equal to, or greater than the P2 vector, respectively.

This opcode must immediately follow an Compare opcode.

Last
The next use of the Rowid or Column or Prev instruction for P1
will refer to the last entry in the database table or index.
If the table or index is empty and P2&gt;0, then jump immediately to P2.
If P2 is 0 or if the table or index is not empty, fall through
to the following instruction.

This opcode leaves the cursor configured to move in reverse order,
from the end toward the beginning.  In other words, the cursor is
configured to use Prev, not Next.

Le
This works just like the Lt opcode except that the jump is taken if
the content of register P3 is less than or equal to the content of
register P1.  See the Lt opcode for additional information.

LoadAnalysis
Read the sqlite_stat1 table for database P1 and load the content
of that table into the internal index hash table.  This will cause
the analysis to be used when preparing all subsequent queries.

Lt
Compare the values in register P1 and P3.  If reg(P3)&lt;reg(P1) then
jump to address P2.

If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or
reg(P3) is NULL then the take the jump.  If the SQLITE_JUMPIFNULL
bit is clear then fall through if either operand is NULL.

The SQLITE_AFF_MASK portion of P5 must be an affinity character -
SQLITE_AFF_TEXT, SQLITE_AFF_INTEGER, and so forth. An attempt is made
to coerce both inputs according to this affinity before the
comparison is made. If the SQLITE_AFF_MASK is 0x00, then numeric
affinity is used. Note that the affinity conversions are stored
back into the input registers P1 and P3.  So this opcode can cause
persistent changes to registers P1 and P3.

Once any conversions have taken place, and neither value is NULL,
the values are compared. If both values are blobs then memcmp() is
used to determine the results of the comparison.  If both values
are text, then the appropriate collating function specified in
P4 is  used to do the comparison.  If P4 is not specified then
memcmp() is used to compare text string.  If both values are
numeric, then a numeric comparison is used. If the two values
are of different types, then numbers are considered less than
strings and strings are considered less than blobs.

This opcode saves the result of comparison for use by the new
Jump opcode.

MakeRecord
Convert P2 registers beginning with P1 into the record format
use as a data record in a database table or as a key
in an index.  The Column opcode can decode the record later.

P4 may be a string that is P2 characters long.  The N-th character of the
string indicates the column affinity that should be used for the N-th
field of the index key.

The mapping from character to affinity is given by the SQLITE_AFF_
macros defined in sqliteInt.h.

If P4 is NULL then all index fields have the affinity BLOB.

The meaning of P5 depends on whether or not the SQLITE_ENABLE_NULL_TRIM
compile-time option is enabled:

* If SQLITE_ENABLE_NULL_TRIM is enabled, then the P5 is the index
of the right-most table that can be null-trimmed.

* If SQLITE_ENABLE_NULL_TRIM is omitted, then P5 has the value
OPFLAG_NOCHNG_MAGIC if the MakeRecord opcode is allowed to
accept no-change records with serial_type 10.  This value is
only used inside an assert() and does not affect the end result.

MaxPgcnt
Try to set the maximum page count for database P1 to the value in P3.
Do not let the maximum page count fall below the current page count and
do not change the maximum page count value if P3==0.

Store the maximum page count after the change in register P2.

MemMax
P1 is a register in the root frame of this VM (the root frame is
different from the current frame if this instruction is being executed
within a sub-program). Set the value of register P1 to the maximum of
its current value and the value in register P2.

This instruction throws an error if the memory cell is not initially
an integer.

Move
Move the P3 values in register P1..P1+P3-1 over into
registers P2..P2+P3-1.  Registers P1..P1+P3-1 are
left holding a NULL.  It is an error for register ranges
P1..P1+P3-1 and P2..P2+P3-1 to overlap.  It is an error
for P3 to be less than 1.

Multiply
Multiply the value in register P1 by the value in register P2
and store the result in register P3.
If either input is NULL, the result is NULL.

MustBeInt
Force the value in register P1 to be an integer.  If the value
in P1 is not an integer and cannot be converted into an integer
without data loss, then jump immediately to P2, or if P2==0
raise an SQLITE_MISMATCH exception.

Ne
This works just like the Eq opcode except that the jump is taken if
the operands in registers P1 and P3 are not equal.  See the Eq opcode for
additional information.

NewRowid
Get a new integer record number (a.k.a "rowid") used as the key to a table.
The record number is not previously used as a key in the database
table that cursor P1 points to.  The new record number is written
written to register P2.

If P3&gt;0 then P3 is a register in the root frame of this VDBE that holds
the largest previously generated record number. No new record numbers are
allowed to be less than this value. When this value reaches its maximum,
an SQLITE_FULL error is generated. The P3 register is updated with the '
generated record number. This P3 mechanism is used to help implement the
AUTOINCREMENT feature.

Next
Advance cursor P1 so that it points to the next key/data pair in its
table or index.  If there are no more key/value pairs then fall through
to the following instruction.  But if the cursor advance was successful,
jump immediately to P2.

The Next opcode is only valid following an SeekGT, SeekGE, or
Rewind opcode used to position the cursor.  Next is not allowed
to follow SeekLT, SeekLE, or Last.

The P1 cursor must be for a real table, not a pseudo-table.  P1 must have
been opened prior to this opcode or the program will segfault.

The P3 value is a hint to the btree implementation. If P3==1, that
means P1 is an SQL index and that this instruction could have been
omitted if that index had been unique.  P3 is usually 0.  P3 is
always either 0 or 1.

If P5 is positive and the jump is taken, then event counter
number P5-1 in the prepared statement is incremented.

See also: Prev

NoConflict
If P4==0 then register P3 holds a blob constructed by MakeRecord.  If
P4&gt;0 then register P3 is the first of P4 registers that form an unpacked
record.

Cursor P1 is on an index btree.  If the record identified by P3 and P4
contains any NULL value, jump immediately to P2.  If all terms of the
record are not-NULL then a check is done to determine if any row in the
P1 index btree has a matching key prefix.  If there are no matches, jump
immediately to P2.  If there is a match, fall through and leave the P1
cursor pointing to the matching row.

This opcode is similar to NotFound with the exceptions that the
branch is always taken if any part of the search key input is NULL.

This operation leaves the cursor in a state where it cannot be
advanced in either direction.  In other words, the Next and Prev
opcodes do not work after this operation.

See also: NotFound, Found, NotExists

Noop
Do nothing.  This instruction is often useful as a jump
destination.

Not
Interpret the value in register P1 as a boolean value.  Store the
boolean complement in register P2.  If the value in register P1 is
NULL, then a NULL is stored in P2.

NotExists
P1 is the index of a cursor open on an SQL table btree (with integer
keys).  P3 is an integer rowid.  If P1 does not contain a record with
rowid P3 then jump immediately to P2.  Or, if P2 is 0, raise an
SQLITE_CORRUPT error. If P1 does contain a record with rowid P3 then
leave the cursor pointing at that record and fall through to the next
instruction.

The SeekRowid opcode performs the same operation but also allows the
P3 register to contain a non-integer value, in which case the jump is
always taken.  This opcode requires that P3 always contain an integer.

The NotFound opcode performs the same operation on index btrees
(with arbitrary multi-value keys).

This opcode leaves the cursor in a state where it cannot be advanced
in either direction.  In other words, the Next and Prev opcodes will
not work following this opcode.

See also: Found, NotFound, NoConflict, SeekRowid

NotFound
If P4==0 then register P3 holds a blob constructed by MakeRecord.  If
P4&gt;0 then register P3 is the first of P4 registers that form an unpacked
record.

Cursor P1 is on an index btree.  If the record identified by P3 and P4
is not the prefix of any entry in P1 then a jump is made to P2.  If P1
does contain an entry whose prefix matches the P3/P4 record then control
falls through to the next instruction and P1 is left pointing at the
matching entry.

This operation leaves the cursor in a state where it cannot be
advanced in either direction.  In other words, the Next and Prev
opcodes do not work after this operation.

See also: Found, NotExists, NoConflict, IfNoHope

NotNull
Jump to P2 if the value in register P1 is not NULL.

Null
Write a NULL into registers P2.  If P3 greater than P2, then also write
NULL into register P3 and every register in between P2 and P3.  If P3
is less than P2 (typically P3 is zero) then only register P2 is
set to NULL.

If the P1 value is non-zero, then also set the MEM_Cleared flag so that
NULL values will not compare equal even if SQLITE_NULLEQ is set on
Ne or Eq.

NullRow
Move the cursor P1 to a null row.  Any Column operations
that occur while the cursor is on the null row will always
write a NULL.

If cursor P1 is not previously opened, open it now to a special
pseudo-cursor that always returns NULL for every column.

Offset
Store in register r&#91;P3&#93; the byte offset into the database file that is the
start of the payload for the record at which that cursor P1 is currently
pointing.

P2 is the column number for the argument to the sqlite_offset() function.
This opcode does not use P2 itself, but the P2 value is used by the
code generator.  The P1, P2, and P3 operands to this opcode are the
same as for Column.

This opcode is only available if SQLite is compiled with the
-DSQLITE_ENABLE_OFFSET_SQL_FUNC option.

OffsetLimit
This opcode performs a commonly used computation associated with
LIMIT and OFFSET process.  r&#91;P1&#93; holds the limit counter.  r&#91;P3&#93;
holds the offset counter.  The opcode computes the combined value
of the LIMIT and OFFSET and stores that value in r&#91;P2&#93;.  The r&#91;P2&#93;
value computed is the total number of rows that will need to be
visited in order to complete the query.

If r&#91;P3&#93; is zero or negative, that means there is no OFFSET
and r&#91;P2&#93; is set to be the value of the LIMIT, r&#91;P1&#93;.

if r&#91;P1&#93; is zero or negative, that means there is no LIMIT
and r&#91;P2&#93; is set to -1.

Otherwise, r&#91;P2&#93; is set to the sum of r&#91;P1&#93; and r&#91;P3&#93;.

Once
Fall through to the next instruction the first time this opcode is
encountered on each invocation of the byte-code program.  Jump to P2
on the second and all subsequent encounters during the same invocation.

Top-level programs determine first invocation by comparing the P1
operand against the P1 operand on the Init opcode at the beginning
of the program.  If the P1 values differ, then fall through and make
the P1 of this opcode equal to the P1 of Init.  If P1 values are
the same then take the jump.

For subprograms, there is a bitmask in the VdbeFrame that determines
whether or not the jump should be taken.  The bitmask is necessary
because the self-altering code trick does not work for recursive
triggers.

OpenAutoindex
This opcode works the same as OpenEphemeral.  It has a
different name to distinguish its use.  Tables created using
by this opcode will be used for automatically created transient
indices in joins.

OpenDup
Open a new cursor P1 that points to the same ephemeral table as
cursor P2.  The P2 cursor must have been opened by a prior OpenEphemeral
opcode.  Only ephemeral cursors may be duplicated.

Duplicate ephemeral cursors are used for self-joins of materialized views.

OpenEphemeral
Open a new cursor P1 to a transient table.
The cursor is always opened read/write even if
the main database is read-only.  The ephemeral
table is deleted automatically when the cursor is closed.

If the cursor P1 is already opened on an ephemeral table, the table
is cleared (all content is erased).

P2 is the number of columns in the ephemeral table.
The cursor points to a BTree table if P4==0 and to a BTree index
if P4 is not 0.  If P4 is not NULL, it points to a KeyInfo structure
that defines the format of keys in the index.

The P5 parameter can be a mask of the BTREE_* flags defined
in btree.h.  These flags control aspects of the operation of
the btree.  The BTREE_OMIT_JOURNAL and BTREE_SINGLE flags are
added automatically.

If P3 is positive, then reg&#91;P3&#93; is modified slightly so that it
can be used as zero-length data for Insert.  This is an optimization
that avoids an extra Blob opcode to initialize that register.

OpenPseudo
Open a new cursor that points to a fake table that contains a single
row of data.  The content of that one row is the content of memory
register P2.  In other words, cursor P1 becomes an alias for the
MEM_Blob content contained in register P2.

A pseudo-table created by this opcode is used to hold a single
row output from the sorter so that the row can be decomposed into
individual columns using the Column opcode.  The Column opcode
is the only cursor opcode that works with a pseudo-table.

P3 is the number of fields in the records that will be stored by
the pseudo-table.

OpenRead
Open a read-only cursor for the database table whose root page is
P2 in a database file.  The database file is determined by P3.
P3==0 means the main database, P3==1 means the database used for
temporary tables, and P3&gt;1 means used the corresponding attached
database.  Give the new cursor an identifier of P1.  The P1
values need not be contiguous but all P1 values should be small integers.
It is an error for P1 to be negative.

Allowed P5 bits:

  0x02 OPFLAG_SEEKEQ: This cursor will only be used for
equality lookups (implemented as a pair of opcodes SeekGE/IdxGT
of SeekLE/IdxLT)


The P4 value may be either an integer (P4_INT32) or a pointer to
a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo
object, then table being opened must be an index b-tree where the
KeyInfo object defines the content and collating
sequence of that index b-tree. Otherwise, if P4 is an integer
value, then the table being opened must be a table b-tree with a
number of columns no less than the value of P4.

See also: OpenWrite, ReopenIdx

OpenWrite
Open a read/write cursor named P1 on the table or index whose root
page is P2 (or whose root page is held in register P2 if the
OPFLAG_P2ISREG bit is set in P5 - see below).

The P4 value may be either an integer (P4_INT32) or a pointer to
a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo
object, then table being opened must be an index b-tree where the
KeyInfo object defines the content and collating
sequence of that index b-tree. Otherwise, if P4 is an integer
value, then the table being opened must be a table b-tree with a
number of columns no less than the value of P4.

Allowed P5 bits:

  0x02 OPFLAG_SEEKEQ: This cursor will only be used for
equality lookups (implemented as a pair of opcodes SeekGE/IdxGT
of SeekLE/IdxLT)
  0x08 OPFLAG_FORDELETE: This cursor is used only to seek
and subsequently delete entries in an index btree.  This is a
hint to the storage engine that the storage engine is allowed to
ignore.  The hint is not used by the official SQLite b*tree storage
engine, but is used by COMDB2.
  0x10 OPFLAG_P2ISREG: Use the content of register P2
as the root page, not the value of P2 itself.


This instruction works like OpenRead except that it opens the cursor
in read/write mode.

See also: OpenRead, ReopenIdx

Or
Take the logical OR of the values in register P1 and P2 and
store the answer in register P3.

If either P1 or P2 is nonzero (true) then the result is 1 (true)
even if the other input is NULL.  A NULL and false or two NULLs
give a NULL output.

Pagecount
Write the current number of pages in database P1 to memory cell P2.

Param
This opcode is only ever present in sub-programs called via the
Program instruction. Copy a value currently stored in a memory
cell of the calling (parent) frame to cell P2 in the current frames
address space. This is used by trigger programs to access the new.*
and old.* values.

The address of the cell in the parent frame is determined by adding
the value of the P1 argument to the value of the P1 argument to the
calling Program instruction.

ParseSchema
Read and parse all entries from the schema table of database P1
that match the WHERE clause P4.  If P4 is a NULL pointer, then the
entire schema for P1 is reparsed.

This opcode invokes the parser to create a new virtual machine,
then runs the new virtual machine.  It is thus a re-entrant opcode.

Permutation
Set the permutation used by the Compare operator in the next
instruction.  The permutation is stored in the P4 operand.

The permutation is only valid for the next opcode which must be
an Compare that has the OPFLAG_PERMUTE bit set in P5.

The first integer in the P4 integer array is the length of the array
and does not become part of the permutation.

Prev
Back up cursor P1 so that it points to the previous key/data pair in its
table or index.  If there is no previous key/value pairs then fall through
to the following instruction.  But if the cursor backup was successful,
jump immediately to P2.

The Prev opcode is only valid following an SeekLT, SeekLE, or
Last opcode used to position the cursor.  Prev is not allowed
to follow SeekGT, SeekGE, or Rewind.

The P1 cursor must be for a real table, not a pseudo-table.  If P1 is
not open then the behavior is undefined.

The P3 value is a hint to the btree implementation. If P3==1, that
means P1 is an SQL index and that this instruction could have been
omitted if that index had been unique.  P3 is usually 0.  P3 is
always either 0 or 1.

If P5 is positive and the jump is taken, then event counter
number P5-1 in the prepared statement is incremented.

Program
Execute the trigger program passed as P4 (type P4_SUBPROGRAM).

P1 contains the address of the memory cell that contains the first memory
cell in an array of values used as arguments to the sub-program. P2
contains the address to jump to if the sub-program throws an IGNORE
exception using the RAISE() function. Register P3 contains the address
of a memory cell in this (the parent) VM that is used to allocate the
memory required by the sub-vdbe at runtime.

P4 is a pointer to the VM containing the trigger program.

If P5 is non-zero, then recursive program invocation is enabled.

PureFunc
Invoke a user function (P4 is a pointer to an sqlite3_context object that
contains a pointer to the function to be run) with arguments taken
from register P2 and successors.  The number of arguments is in
the sqlite3_context object that P4 points to.
The result of the function is stored
in register P3.  Register P3 must not be one of the function inputs.

P1 is a 32-bit bitmask indicating whether or not each argument to the
function was determined to be constant at compile time. If the first
argument was constant then bit 0 of P1 is set. This is used to determine
whether meta data associated with a user function argument using the
sqlite3_set_auxdata() API may be safely retained until the next
invocation of this opcode.

This opcode works exactly like Function.  The only difference is in
its name.  This opcode is used in places where the function must be
purely non-deterministic.  Some built-in date/time functions can be
either determinitic of non-deterministic, depending on their arguments.
When those function are used in a non-deterministic way, they will check
to see if they were called using PureFunc instead of Function, and
if they were, they throw an error.

See also: AggStep, AggFinal, Function

ReadCookie
Read cookie number P3 from database P1 and write it into register P2.
P3==1 is the schema version.  P3==2 is the database format.
P3==3 is the recommended pager cache size, and so forth.  P1==0 is
the main database file and P1==1 is the database file used to store
temporary tables.

There must be a read-lock on the database (either a transaction
must be started or there must be an open cursor) before
executing this instruction.

Real
P4 is a pointer to a 64-bit floating point value.
Write that value into register P2.

RealAffinity
If register P1 holds an integer convert it to a real value.

This opcode is used when extracting information from a column that
has REAL affinity.  Such column values may still be stored as
integers, for space efficiency, but after extraction we want them
to have only a real value.

ReleaseReg
Release registers from service.  Any content that was in the
the registers is unreliable after this opcode completes.

The registers released will be the P2 registers starting at P1,
except if bit ii of P3 set, then do not release register P1+ii.
In other words, P3 is a mask of registers to preserve.

Releasing a register clears the Mem.pScopyFrom pointer.  That means
that if the content of the released register was set using SCopy,
a change to the value of the source register for the SCopy will no longer
generate an assertion fault in sqlite3VdbeMemAboutToChange().

If P5 is set, then all released registers have their type set
to MEM_Undefined so that any subsequent attempt to read the released
register (before it is reinitialized) will generate an assertion fault.

P5 ought to be set on every call to this opcode.
However, there are places in the code generator will release registers
before their are used, under the (valid) assumption that the registers
will not be reallocated for some other purpose before they are used and
hence are safe to release.

This opcode is only available in testing and debugging builds.  It is
not generated for release builds.  The purpose of this opcode is to help
validate the generated bytecode.  This opcode does not actually contribute
to computing an answer.

Remainder
Compute the remainder after integer register P2 is divided by
register P1 and store the result in register P3.
If the value in register P1 is zero the result is NULL.
If either operand is NULL, the result is NULL.

ReopenIdx
The ReopenIdx opcode works like OpenRead except that it first
checks to see if the cursor on P1 is already open on the same
b-tree and if it is this opcode becomes a no-op.  In other words,
if the cursor is already open, do not reopen it.

The ReopenIdx opcode may only be used with P5==0 or P5==OPFLAG_SEEKEQ
and with P4 being a P4_KEYINFO object.  Furthermore, the P3 value must
be the same as every other ReopenIdx or OpenRead for the same cursor
number.

Allowed P5 bits:

  0x02 OPFLAG_SEEKEQ: This cursor will only be used for
equality lookups (implemented as a pair of opcodes SeekGE/IdxGT
of SeekLE/IdxLT)


See also: OpenRead, OpenWrite

ResetCount
The value of the change counter is copied to the database handle
change counter (returned by subsequent calls to sqlite3_changes()).
Then the VMs internal change counter resets to 0.
This is used by trigger programs.

ResetSorter
Delete all contents from the ephemeral table or sorter
that is open on cursor P1.

This opcode only works for cursors used for sorting and
opened with OpenEphemeral or SorterOpen.

ResultRow
The registers P1 through P1+P2-1 contain a single row of
results. This opcode causes the sqlite3_step() call to terminate
with an SQLITE_ROW return code and it sets up the sqlite3_stmt
structure to provide access to the r(P1)..r(P1+P2-1) values as
the result row.

Return
Jump to the address stored in register P1.  If P1 is a return address
register, then this accomplishes a return from a subroutine.

If P3 is 1, then the jump is only taken if register P1 holds an integer
values, otherwise execution falls through to the next opcode, and the
Return becomes a no-op. If P3 is 0, then register P1 must hold an
integer or else an assert() is raised.  P3 should be set to 1 when
this opcode is used in combination with BeginSubrtn, and set to 0
otherwise.

The value in register P1 is unchanged by this opcode.

P2 is not used by the byte-code engine.  However, if P2 is positive
and also less than the current address, then the "EXPLAIN" output
formatter in the CLI will indent all opcodes from the P2 opcode up
to be not including the current Return.   P2 should be the first opcode
in the subroutine from which this opcode is returning.  Thus the P2
value is a byte-code indentation hint.  See tag-20220407a in
wherecode.c and shell.c.

Rewind
The next use of the Rowid or Column or Next instruction for P1
will refer to the first entry in the database table or index.
If the table or index is empty, jump immediately to P2.
If the table or index is not empty, fall through to the following
instruction.

This opcode leaves the cursor configured to move in forward order,
from the beginning toward the end.  In other words, the cursor is
configured to use Next, not Prev.

RowCell
P1 and P2 are both open cursors. Both must be opened on the same type
of table - intkey or index. This opcode is used as part of copying
the current row from P2 into P1. If the cursors are opened on intkey
tables, register P3 contains the rowid to use with the new record in
P1. If they are opened on index tables, P3 is not used.

This opcode must be followed by either an Insert or InsertIdx opcode
with the OPFLAG_PREFORMAT flag set to complete the insert operation.

RowData
Write into register P2 the complete row content for the row at
which cursor P1 is currently pointing.
There is no interpretation of the data.
It is just copied onto the P2 register exactly as
it is found in the database file.

If cursor P1 is an index, then the content is the key of the row.
If cursor P2 is a table, then the content extracted is the data.

If the P1 cursor must be pointing to a valid row (not a NULL row)
of a real table, not a pseudo-table.

If P3!=0 then this opcode is allowed to make an ephemeral pointer
into the database page.  That means that the content of the output
register will be invalidated as soon as the cursor moves - including
moves caused by other cursors that "save" the current cursors
position in order that they can write to the same table.  If P3==0
then a copy of the data is made into memory.  P3!=0 is faster, but
P3==0 is safer.

If P3!=0 then the content of the P2 register is unsuitable for use
in OP_Result and any OP_Result will invalidate the P2 register content.
The P2 register content is invalidated by opcodes like Function or
by any use of another cursor pointing to the same table.

Rowid
Store in register P2 an integer which is the key of the table entry that
P1 is currently point to.

P1 can be either an ordinary table or a virtual table.  There used to
be a separate OP_VRowid opcode for use with virtual tables, but this
one opcode now works for both table types.

RowSetAdd
Insert the integer value held by register P2 into a RowSet object
held in register P1.

An assertion fails if P2 is not an integer.

RowSetRead
Extract the smallest value from the RowSet object in P1
and put that value into register P3.
Or, if RowSet object P1 is initially empty, leave P3
unchanged and jump to instruction P2.

RowSetTest
Register P3 is assumed to hold a 64-bit integer value. If register P1
contains a RowSet object and that RowSet object contains
the value held in P3, jump to register P2. Otherwise, insert the
integer in P3 into the RowSet and continue on to the
next opcode.

The RowSet object is optimized for the case where sets of integers
are inserted in distinct phases, which each set contains no duplicates.
Each set is identified by a unique P4 value. The first set
must have P4==0, the final set must have P4==-1, and for all other sets
must have P4&gt;0.

This allows optimizations: (a) when P4==0 there is no need to test
the RowSet object for P3, as it is guaranteed not to contain it,
(b) when P4==-1 there is no need to insert the value, as it will
never be tested for, and (c) when a value that is part of set X is
inserted, there is no need to search to see if the same value was
previously inserted as part of set X (only if it was previously
inserted as part of some other set).

Savepoint
Open, release or rollback the savepoint named by parameter P4, depending
on the value of P1. To open a new savepoint set P1==0 (SAVEPOINT_BEGIN).
To release (commit) an existing savepoint set P1==1 (SAVEPOINT_RELEASE).
To rollback an existing savepoint set P1==2 (SAVEPOINT_ROLLBACK).

SCopy
Make a shallow copy of register P1 into register P2.

This instruction makes a shallow copy of the value.  If the value
is a string or blob, then the copy is only a pointer to the
original and hence if the original changes so will the copy.
Worse, if the original is deallocated, the copy becomes invalid.
Thus the program must guarantee that the original will not change
during the lifetime of the copy.  Use Copy to make a complete
copy.

SeekEnd
Position cursor P1 at the end of the btree for the purpose of
appending a new entry onto the btree.

It is assumed that the cursor is used only for appending and so
if the cursor is valid, then the cursor must already be pointing
at the end of the btree and so no changes are made to
the cursor.

SeekGE
If cursor P1 refers to an SQL table (B-Tree that uses integer keys),
use the value in register P3 as the key.  If cursor P1 refers
to an SQL index, then P3 is the first in an array of P4 registers
that are used as an unpacked index key.

Reposition cursor P1 so that  it points to the smallest entry that
is greater than or equal to the key value. If there are no records
greater than or equal to the key and P2 is not zero, then jump to P2.

If the cursor P1 was opened using the OPFLAG_SEEKEQ flag, then this
opcode will either land on a record that exactly matches the key, or
else it will cause a jump to P2.  When the cursor is OPFLAG_SEEKEQ,
this opcode must be followed by an IdxLE opcode with the same arguments.
The IdxGT opcode will be skipped if this opcode succeeds, but the
IdxGT opcode will be used on subsequent loop iterations.  The
OPFLAG_SEEKEQ flags is a hint to the btree layer to say that this
is an equality search.

This opcode leaves the cursor configured to move in forward order,
from the beginning toward the end.  In other words, the cursor is
configured to use Next, not Prev.

See also: Found, NotFound, SeekLt, SeekGt, SeekLe

SeekGT
If cursor P1 refers to an SQL table (B-Tree that uses integer keys),
use the value in register P3 as a key. If cursor P1 refers
to an SQL index, then P3 is the first in an array of P4 registers
that are used as an unpacked index key.

Reposition cursor P1 so that it points to the smallest entry that
is greater than the key value. If there are no records greater than
the key and P2 is not zero, then jump to P2.

This opcode leaves the cursor configured to move in forward order,
from the beginning toward the end.  In other words, the cursor is
configured to use Next, not Prev.

See also: Found, NotFound, SeekLt, SeekGe, SeekLe

SeekHit
Increase or decrease the seekHit value for cursor P1, if necessary,
so that it is no less than P2 and no greater than P3.

The seekHit integer represents the maximum of terms in an index for which
there is known to be at least one match.  If the seekHit value is smaller
than the total number of equality terms in an index lookup, then the
IfNoHope opcode might run to see if the IN loop can be abandoned
early, thus saving work.  This is part of the IN-early-out optimization.

P1 must be a valid b-tree cursor.

SeekLE
If cursor P1 refers to an SQL table (B-Tree that uses integer keys),
use the value in register P3 as a key. If cursor P1 refers
to an SQL index, then P3 is the first in an array of P4 registers
that are used as an unpacked index key.

Reposition cursor P1 so that it points to the largest entry that
is less than or equal to the key value. If there are no records
less than or equal to the key and P2 is not zero, then jump to P2.

This opcode leaves the cursor configured to move in reverse order,
from the end toward the beginning.  In other words, the cursor is
configured to use Prev, not Next.

If the cursor P1 was opened using the OPFLAG_SEEKEQ flag, then this
opcode will either land on a record that exactly matches the key, or
else it will cause a jump to P2.  When the cursor is OPFLAG_SEEKEQ,
this opcode must be followed by an IdxLE opcode with the same arguments.
The IdxGE opcode will be skipped if this opcode succeeds, but the
IdxGE opcode will be used on subsequent loop iterations.  The
OPFLAG_SEEKEQ flags is a hint to the btree layer to say that this
is an equality search.

See also: Found, NotFound, SeekGt, SeekGe, SeekLt

SeekLT
If cursor P1 refers to an SQL table (B-Tree that uses integer keys),
use the value in register P3 as a key. If cursor P1 refers
to an SQL index, then P3 is the first in an array of P4 registers
that are used as an unpacked index key.

Reposition cursor P1 so that  it points to the largest entry that
is less than the key value. If there are no records less than
the key and P2 is not zero, then jump to P2.

This opcode leaves the cursor configured to move in reverse order,
from the end toward the beginning.  In other words, the cursor is
configured to use Prev, not Next.

See also: Found, NotFound, SeekGt, SeekGe, SeekLe

SeekRowid
P1 is the index of a cursor open on an SQL table btree (with integer
keys).  If register P3 does not contain an integer or if P1 does not
contain a record with rowid P3 then jump immediately to P2.
Or, if P2 is 0, raise an SQLITE_CORRUPT error. If P1 does contain
a record with rowid P3 then
leave the cursor pointing at that record and fall through to the next
instruction.

The NotExists opcode performs the same operation, but with NotExists
the P3 register must be guaranteed to contain an integer value.  With this
opcode, register P3 might not contain an integer.

The NotFound opcode performs the same operation on index btrees
(with arbitrary multi-value keys).

This opcode leaves the cursor in a state where it cannot be advanced
in either direction.  In other words, the Next and Prev opcodes will
not work following this opcode.

See also: Found, NotFound, NoConflict, SeekRowid

SeekScan
This opcode is a prefix opcode to SeekGE.  In other words, this
opcode must be immediately followed by SeekGE. This constraint is
checked by assert() statements.

This opcode uses the P1 through P4 operands of the subsequent
SeekGE.  In the text that follows, the operands of the subsequent
SeekGE opcode are denoted as SeekOP.P1 through SeekOP.P4.   Only
the P1 and P2 operands of this opcode are also used, and  are called
This.P1 and This.P2.

This opcode helps to optimize IN operators on a multi-column index
where the IN operator is on the later terms of the index by avoiding
unnecessary seeks on the btree, substituting steps to the next row
of the b-tree instead.  A correct answer is obtained if this opcode
is omitted or is a no-op.

The SeekGE.P3 and SeekGE.P4 operands identify an unpacked key which
is the desired entry that we want the cursor SeekGE.P1 to be pointing
to.  Call this SeekGE.P4/P5 row the "target".

If the SeekGE.P1 cursor is not currently pointing to a valid row,
then this opcode is a no-op and control passes through into the SeekGE.

If the SeekGE.P1 cursor is pointing to a valid row, then that row
might be the target row, or it might be near and slightly before the
target row.  This opcode attempts to position the cursor on the target
row by, perhaps by invoking sqlite3BtreeStep() on the cursor
between 0 and This.P1 times.

There are three possible outcomes from this opcode:

 If after This.P1 steps, the cursor is still pointing to a place that
is earlier in the btree than the target row, then fall through
into the subsquence SeekGE opcode.

 If the cursor is successfully moved to the target row by 0 or more
sqlite3BtreeNext() calls, then jump to This.P2, which will land just
past the IdxGT or IdxGE opcode that follows the SeekGE.

 If the cursor ends up past the target row (indicating the the target
row does not exist in the btree) then jump to SeekOP.P2.


Sequence
Find the next available sequence number for cursor P1.
Write the sequence number into register P2.
The sequence number on the cursor is incremented after this
instruction.

SequenceTest
P1 is a sorter cursor. If the sequence counter is currently zero, jump
to P2. Regardless of whether or not the jump is taken, increment the
the sequence value.

SetCookie
Write the integer value P3 into cookie number P2 of database P1.
P2==1 is the schema version.  P2==2 is the database format.
P2==3 is the recommended pager cache
size, and so forth.  P1==0 is the main database file and P1==1 is the
database file used to store temporary tables.

A transaction must be started before executing this opcode.

If P2 is the SCHEMA_VERSION cookie (cookie number 1) then the internal
schema version is set to P3-P5.  The "PRAGMA schema_version=N" statement
has P5 set to 1, so that the internal schema version will be different
from the database schema version, resulting in a schema reset.

ShiftLeft
Shift the integer value in register P2 to the left by the
number of bits specified by the integer in register P1.
Store the result in register P3.
If either input is NULL, the result is NULL.

ShiftRight
Shift the integer value in register P2 to the right by the
number of bits specified by the integer in register P1.
Store the result in register P3.
If either input is NULL, the result is NULL.

SoftNull
Set register P1 to have the value NULL as seen by the MakeRecord
instruction, but do not free any string or blob memory associated with
the register, so that if the value was a string or blob that was
previously copied using SCopy, the copies will continue to be valid.

Sort
This opcode does exactly the same thing as Rewind except that
it increments an undocumented global variable used for testing.

Sorting is accomplished by writing records into a sorting index,
then rewinding that index and playing it back from beginning to
end.  We use the Sort opcode instead of Rewind to do the
rewinding so that the global variable will be incremented and
regression tests can determine whether or not the optimizer is
correctly optimizing out sorts.

SorterCompare
P1 is a sorter cursor. This instruction compares a prefix of the
record blob in register P3 against a prefix of the entry that
the sorter cursor currently points to.  Only the first P4 fields
of r&#91;P3&#93; and the sorter record are compared.

If either P3 or the sorter contains a NULL in one of their significant
fields (not counting the P4 fields at the end which are ignored) then
the comparison is assumed to be equal.

Fall through to next instruction if the two records compare equal to
each other.  Jump to P2 if they are different.

SorterData
Write into register P2 the current sorter data for sorter cursor P1.
Then clear the column header cache on cursor P3.

This opcode is normally use to move a record out of the sorter and into
a register that is the source for a pseudo-table cursor created using
OpenPseudo.  That pseudo-table cursor is the one that is identified by
parameter P3.  Clearing the P3 column cache as part of this opcode saves
us from having to issue a separate NullRow instruction to clear that cache.

SorterInsert
Register P2 holds an SQL index key made using the
MakeRecord instructions.  This opcode writes that key
into the sorter P1.  Data for the entry is nil.

SorterNext
This opcode works just like Next except that P1 must be a
sorter object for which the SorterSort opcode has been
invoked.  This opcode advances the cursor to the next sorted
record, or jumps to P2 if there are no more sorted records.

SorterOpen
This opcode works like OpenEphemeral except that it opens
a transient index that is specifically designed to sort large
tables using an external merge-sort algorithm.

If argument P3 is non-zero, then it indicates that the sorter may
assume that a stable sort considering the first P3 fields of each
key is sufficient to produce the required results.

SorterSort
After all records have been inserted into the Sorter object
identified by P1, invoke this opcode to actually do the sorting.
Jump to P2 if there are no records to be sorted.

This opcode is an alias for Sort and Rewind that is used
for Sorter objects.

SqlExec
Run the SQL statement or statements specified in the P4 string.

String
The string value P4 of length P1 (bytes) is stored in register P2.

If P3 is not zero and the content of register P3 is equal to P5, then
the datatype of the register P2 is converted to BLOB.  The content is
the same sequence of bytes, it is merely interpreted as a BLOB instead
of a string, as if it had been CAST.  In other words:

if( P3!=0 and reg&#91;P3&#93;==P5 ) reg&#91;P2&#93; := CAST(reg&#91;P2&#93; as BLOB)

String8
P4 points to a nul terminated UTF-8 string. This opcode is transformed
into a String opcode before it is executed for the first time.  During
this transformation, the length of string P4 is computed and stored
as the P1 parameter.

Subtract
Subtract the value in register P1 from the value in register P2
and store the result in register P3.
If either input is NULL, the result is NULL.

TableLock
Obtain a lock on a particular table. This instruction is only used when
the shared-cache feature is enabled.

P1 is the index of the database in sqlite3.aDb[] of the database
on which the lock is acquired.  A readlock is obtained if P3==0 or
a write lock if P3==1.

P2 contains the root-page of the table to lock.

P4 contains a pointer to the name of the table being locked. This is only
used to generate an error message if the lock cannot be obtained.

Trace
Write P4 on the statement trace output if statement tracing is
enabled.

Operand P1 must be 0x7fffffff and P2 must positive.

Transaction
Begin a transaction on database P1 if a transaction is not already
active.
If P2 is non-zero, then a write-transaction is started, or if a
read-transaction is already active, it is upgraded to a write-transaction.
If P2 is zero, then a read-transaction is started.  If P2 is 2 or more
then an exclusive transaction is started.

P1 is the index of the database file on which the transaction is
started.  Index 0 is the main database file and index 1 is the
file used for temporary tables.  Indices of 2 or more are used for
attached databases.

If a write-transaction is started and the Vdbe.usesStmtJournal flag is
true (this flag is set if the Vdbe may modify more than one row and may
throw an ABORT exception), a statement transaction may also be opened.
More specifically, a statement transaction is opened iff the database
connection is currently not in autocommit mode, or if there are other
active statements. A statement transaction allows the changes made by this
VDBE to be rolled back after an error without having to roll back the
entire transaction. If no error is encountered, the statement transaction
will automatically commit when the VDBE halts.

If P5!=0 then this opcode also checks the schema cookie against P3
and the schema generation counter against P4.
The cookie changes its value whenever the database schema changes.
This operation is used to detect when that the cookie has changed
and that the current process needs to reread the schema.  If the schema
cookie in P3 differs from the schema cookie in the database header or
if the schema generation counter in P4 differs from the current
generation counter, then an SQLITE_SCHEMA error is raised and execution
halts.  The sqlite3_step() wrapper function might then reprepare the
statement and rerun it from the beginning.

TypeCheck
Apply affinities to the range of P2 registers beginning with P1.
Take the affinities from the Table object in P4.  If any value
cannot be coerced into the correct type, then raise an error.

This opcode is similar to Affinity except that this opcode
forces the register type to the Table column type.  This is used
to implement "strict affinity".

GENERATED ALWAYS AS ... STATIC columns are only checked if P3
is zero.  When P3 is non-zero, no type checking occurs for
static generated columns.  Virtual columns are computed at query time
and so they are never checked.

Preconditions:


 P2 should be the number of non-virtual columns in the
table of P4.
 Table P4 should be a STRICT table.


If any precondition is false, an assertion fault occurs.

Vacuum
Vacuum the entire database P1.  P1 is 0 for "main", and 2 or more
for an attached database.  The "temp" database may not be vacuumed.

If P2 is not zero, then it is a register holding a string which is
the file into which the result of vacuum should be written.  When
P2 is zero, the vacuum overwrites the original database.

Variable
Transfer the values of bound parameter P1 into register P2

If the parameter is named, then its name appears in P4.
The P4 value is used by sqlite3_bind_parameter_name().

VBegin
P4 may be a pointer to an sqlite3_vtab structure. If so, call the
xBegin method for that table.

Also, whether or not P4 is set, check that this is not being called from
within a callback to a virtual table xSync() method. If it is, the error
code will be set to SQLITE_LOCKED.

VColumn
Store in register P3 the value of the P2-th column of
the current row of the virtual-table of cursor P1.

If the VColumn opcode is being used to fetch the value of
an unchanging column during an UPDATE operation, then the P5
value is OPFLAG_NOCHNG.  This will cause the sqlite3_vtab_nochange()
function to return true inside the xColumn method of the virtual
table implementation.  The P5 column might also contain other
bits (OPFLAG_LENGTHARG or OPFLAG_TYPEOFARG) but those bits are
unused by VColumn.

VCreate
P2 is a register that holds the name of a virtual table in database
P1. Call the xCreate method for that table.

VDestroy
P4 is the name of a virtual table in database P1.  Call the xDestroy method
of that table.

VFilter
P1 is a cursor opened using VOpen.  P2 is an address to jump to if
the filtered result set is empty.

P4 is either NULL or a string that was generated by the xBestIndex
method of the module.  The interpretation of the P4 string is left
to the module implementation.

This opcode invokes the xFilter method on the virtual table specified
by P1.  The integer query plan parameter to xFilter is stored in register
P3. Register P3+1 stores the argc parameter to be passed to the
xFilter method. Registers P3+2..P3+1+argc are the argc
additional parameters which are passed to
xFilter as argv. Register P3+2 becomes argv[0] when passed to xFilter.

A jump is made to P2 if the result set after filtering would be empty.

VInitIn
Set register P2 to be a pointer to a ValueList object for cursor P1
with cache register P3 and output register P3+1.  This ValueList object
can be used as the first argument to sqlite3_vtab_in_first() and
sqlite3_vtab_in_next() to extract all of the values stored in the P1
cursor.  Register P3 is used to hold the values returned by
sqlite3_vtab_in_first() and sqlite3_vtab_in_next().

VNext
Advance virtual table P1 to the next row in its result set and
jump to instruction P2.  Or, if the virtual table has reached
the end of its result set, then fall through to the next instruction.

VOpen
P4 is a pointer to a virtual table object, an sqlite3_vtab structure.
P1 is a cursor number.  This opcode opens a cursor to the virtual
table and stores that cursor in P1.

VRename
P4 is a pointer to a virtual table object, an sqlite3_vtab structure.
This opcode invokes the corresponding xRename method. The value
in register P1 is passed as the zName argument to the xRename method.

VUpdate
P4 is a pointer to a virtual table object, an sqlite3_vtab structure.
This opcode invokes the corresponding xUpdate method. P2 values
are contiguous memory cells starting at P3 to pass to the xUpdate
invocation. The value in register (P3+P2-1) corresponds to the
p2th element of the argv array passed to xUpdate.

The xUpdate method will do a DELETE or an INSERT or both.
The argv[0] element (which corresponds to memory cell P3)
is the rowid of a row to delete.  If argv[0] is NULL then no
deletion occurs.  The argv[1] element is the rowid of the new
row.  This can be NULL to have the virtual table select the new
rowid for itself.  The subsequent elements in the array are
the values of columns in the new row.

If P2==1 then no insert is performed.  argv[0] is the rowid of
a row to delete.

P1 is a boolean flag. If it is set to true and the xUpdate call
is successful, then the value returned by sqlite3_last_insert_rowid()
is set to the value of the rowid for the row just inserted.

P5 is the error actions (OE_Replace, OE_Fail, OE_Ignore, etc) to
apply in the case of a constraint failure on an insert or update.

Yield
Swap the program counter with the value in register P1.  This
has the effect of yielding to a coroutine.

If the coroutine that is launched by this instruction ends with
Yield or Return then continue to the next instruction.  But if
the coroutine launched by this instruction ends with
EndCoroutine, then jump to P2 rather than continuing with the
next instruction.

See also: InitCoroutine

ZeroOrNull
If all both registers P1 and P3 are NOT NULL, then store a zero in
register P2.  If either registers P1 or P3 are NULL then put
a NULL in register P2.


c2: Partial Indexes
c3: 1. Introduction
c5: partialindex.html#introduction
c4:
A partial index is an index over a subset of the rows of a table.



In ordinary indexes, there is exactly one entry in the index for every
row in the table.  In partial indexes, only some subset of the rows in the
table have corresponding index entries.  For example, a partial index might
omit entries for which the column being indexed is NULL.  When used 
judiciously, partial indexes can result in smaller database files and
improvements in both query and write performance.


c2: Partial Indexes
c3: 2. Creating Partial Indexes
c5: partialindex.html#creating_partial_indexes
c4:
Create a partial index by adding a WHERE clause to the end of an 
ordinary CREATE INDEX statement.


create-index-stmt:
hide
 
 

expr:
show
 
 

filter-clause:
show
 
 


literal-value:
show
 
 


over-clause:
show
 
 

frame-spec:
show
 
 


ordering-term:
show
 
 



raise-function:
show
 
 


select-stmt:
show
 
 

common-table-expression:
show
 
 


compound-operator:
show
 
 


join-clause:
show
 
 

join-constraint:
show
 
 


join-operator:
show
 
 



ordering-term:
show
 
 


result-column:
show
 
 


table-or-subquery:
show
 
 


window-defn:
show
 
 

frame-spec:
show
 
 




type-name:
show
 
 

signed-number:
show
 
 




indexed-column:
show
 
 






Any index that includes the WHERE clause at the end is considered to be
a partial index.  Indexes that omit the WHERE clause (or indexes that
are created by UNIQUE or PRIMARY KEY constraints inside of CREATE TABLE
statements) are ordinary full indexes.



The expression following the WHERE clause may contain operators,
literal values, and names of columns in the table being indexed.
The WHERE clause may not contain subqueries, references to other
tables, non-deterministic functions, or bound parameters.


Only rows of the table for which the WHERE clause evaluates to true
are included in the index.  If the WHERE clause expression evaluates 
to NULL or to false for some rows of the table, then those rows are omitted 
from the index.



The columns referenced in the WHERE clause of a partial index can be
any of the columns in the table, not just columns that happen to be
indexed.  However, it is very common for the WHERE clause
expression of a partial index to be a simple expression on the column
being indexed.  The following is a typical example:

CREATE INDEX po_parent ON purchaseorder(parent_po) WHERE parent_po IS NOT NULL;


In the example above, if most purchase orders do not have a "parent"
purchase order, then most parent_po values will be NULL.  That means only
a small subset of the rows in the purchaseorder table will be indexed.
Hence the index will take up much less space.  And changes to the original
purchaseorder table will run faster since the po_parent index only needs
to be updated for those exceptional rows where parent_po is not NULL.
But the index is still useful for querying.  In particular, if one wants
to know all "children" of a particular purchase order "?1", the query
would be:

SELECT po_num FROM purchaseorder WHERE parent_po=?1;


The query above will use the po_parent index to help find the answer,
since the po_parent index contains entries for all rows of interest.
Note that since po_parent is smaller than a full index, the query will
likely run faster too.


c2: Partial Indexes
c3: 2.1. Unique Partial Indexes
c5: partialindex.html#unique_partial_indexes
c4:
A partial index definition may include the UNIQUE keyword.  If it
does, then SQLite requires every entry in the index to be unique.
This provides a mechanism for enforcing uniqueness across some subset of
the rows in a table.

For example, suppose you have a database of the members of a large
organization where each person is assigned to a particular "team".  
Each team has a "leader" who is also a member of that team.  The
table might look something like this:

CREATE TABLE person(
  person_id       INTEGER PRIMARY KEY,
  team_id         INTEGER REFERENCES team,
  is_team_leader  BOOLEAN,
  -- other fields elided
);


The team_id field cannot be unique because there are usually multiple people
on the same team.  One cannot make the combination of team_id and is_team_leader
unique since there are usually multiple non-leaders on each team.  The
solution to enforcing one leader per team is to create a unique index
on team_id but restricted to those entries for which is_team_leader is
true:

CREATE UNIQUE INDEX team_leader ON person(team_id) WHERE is_team_leader;


Coincidentally, that same index is useful for locating the team leader
of a particular team:

SELECT person_id FROM person WHERE is_team_leader AND team_id=?1;


c2: Partial Indexes
c3: 3. Queries Using Partial Indexes
c5: partialindex.html#queries_using_partial_indexes
c4:
Let X be the expression in the WHERE clause of a partial
index, and let W be the WHERE clause of a query that uses the
table that is indexed.  Then, the query is permitted to use 
the partial index if W&#x21d2;X, where the &#x21d2; operator
(usually pronounced "implies") is the logic operator 
equivalent to "X or not W".
Hence, determining whether or not a partial index
is usable in a particular query reduces to proving a theorem in
first-order logic.

SQLite does not have a sophisticated theorem
prover with which to determine W&#x21d2;X.  Instead, SQLite uses 
two simple rules to find the common cases where W&#x21d2;X is true, and
it assumes all the other cases are false.  The rules used by SQLite
are these:


If W is AND-connected terms and X is
OR-connected terms and if any term of W
appears as a term of X, then the partial index is usable.

For example, let the index be
CREATE INDEX ex1 ON tab1(a,b) WHERE a=5 OR b=6;

And let the query be:
SELECT * FROM tab1 WHERE b=6 AND a=7; -- uses partial index

Then the index is usable by the query because the "b=6" term appears
in both the index definition and in the query.  Remember: terms in the
index should be OR-connected and terms in the query should be AND-connected.

The terms in W and X must match exactly.  SQLite does not
do algebra to try to get them to look the same.
The term "b=6" does not match "b=3+3" or "b-6=0" or "b BETWEEN 6 AND 6".
"b=6" will match to "6=b" as long as "b=6" is on the index and "6=b" is
in the query.  If a term of the form "6=b" appears in the index, it will
never match anything.

If a term in X is of the form "z IS NOT NULL" and if a term in
       W is a comparison operator on "z" other than "IS", then those
       terms match.

Example:  Let the index be
CREATE INDEX ex2 ON tab2(b,c) WHERE c IS NOT NULL;

Then any query that uses operators =, &lt;, &gt;, &lt;=, &gt;=, &lt;&gt;,
IN, LIKE, or GLOB on column "c" 
would be usable with the partial index because those
comparison operators are only true if "c" is not NULL.  So the following
query could use the partial index:
SELECT * FROM tab2 WHERE b=456 AND c&lt;&gt;0;  -- uses partial index

But the next query can not use the partial index:
SELECT * FROM tab2 WHERE b=456;  -- cannot use partial index

The latter query can not use the partial index because there might be
rows in the table with b=456 and where c is NULL.  But those rows would
not be in the partial index.


These two rules describe how the query planner for SQLite works as of
this writing (2013-08-01).  And the rules above will always be honored.
However, future versions of SQLite might incorporate a better theorem prover
that can find other cases where W&#x21d2;X is true and thus may
find more instances where partial indexes are useful.


c2: Partial Indexes
c3: 4. Supported Versions
c5: partialindex.html#supported_versions
c4:
Partial indexes have been supported in SQLite since version 3.8.0
(2013-08-26).


Database files that contain partial indices are not readable or writable
by versions of SQLite prior to 3.8.0.  However, a database file created
by SQLite 3.8.0 is still readable and writable by prior versions as long
as its schema contains no partial indexes.  A database that is unreadable
by legacy versions of SQLite can be made readable simply by running
DROP INDEX on the partial indexes.


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.


# change_content

c0: releaselog/3_39_3.html
c1: 3.39.3
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_3.html
c1: 3.39.3
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_3.html
c1: 3.39.3
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_3.html
c1: 3.39.3
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_3.html
c1: 3.39.3
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_3.html
c1: 3.39.3
c3:
 Many <a href="../cpu.html#microopt">microoptimizations</a> collectively reduce CPU cycles by about 2.3%.


c0: releaselog/3_39_3.html
c1: 3.39.3
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_3.html
c1: 3.39.3
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_3.html
c1: 3.39.3
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_3.html
c1: 3.39.3
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_3.html
c1: 3.39.3
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_3.html
c1: 3.39.3
c3:
 Enhance the <a href="../stmt.html">sqlite_stmt</a> virtual table so that it buffers all of its output.


c0: releaselog/3_39_3.html
c1: 3.39.3
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_3.html
c1: 3.39.3
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_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 decremented 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:
SQLITE_SOURCE_ID: 2022-07-21 15:24:47 698edb77537b67c41adc68f9b892db56bcf9a55e00371a61420f3ddd668e6603


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:
SQLITE_SOURCE_ID: 2022-06-25 14:57:57 14e166f40dbfa6e055543f8301525f2ca2e96a02a57269818b9e69e162e98918


c0: releaselog/3_38_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
c3:
 Fix problems with the new Bloom filter optimization that might cause
     some obscure queries to get an incorrect answer.


c0: releaselog/3_38_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_5.html
c1: 3.38.5
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_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:
SQLITE_SOURCE_ID: 2022-05-04 15:45:55 d402f49871152670a62f4f28cacb15d814f2c1644e9347ad7d258e562978e45e


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:
SQLITE_SOURCE_ID: 2022-03-26 13:51:10 d33c709cc0af66bc5b6dc6216eba9f1f0b40960b9ae83694c986fbf4c1d6f08f


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:
SQLITE_SOURCE_ID: 2022-02-22 18:58:40 40fa792d359f84c3b9e9d6623743e1a59826274e221df1bde8f47086968a1bab


c0: releaselog/3_37_2.html
c1: 3.37.2
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_2.html
c1: 3.37.2
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_2.html
c1: 3.37.2
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_2.html
c1: 3.37.2
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_2.html
c1: 3.37.2
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_2.html
c1: 3.37.2
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_2.html
c1: 3.37.2
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_2.html
c1: 3.37.2
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_2.html
c1: 3.37.2
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_2.html
c1: 3.37.2
c3:
 Fix an OOB read that can occur in <a href="../fts5.html">FTS5</a> when reading corrupt database files.


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:
SQLITE_SOURCE_ID: 2021-12-30 15:30:28 378629bf2ea546f73eee84063c5358439a12f7300e433f18c9e1bddd948dea62


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:
 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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
c3:
 Fix a problem in the 
     <a href="http://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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_5.html
c1: 3.35.5
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_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:
SQLITE_SOURCE_ID: 2021-04-02 15:20:15 5d4c65779dab868b285519b19e4cf9d451d50c6048f06f653aa701ec212df45e


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:
SQLITE_SOURCE_ID: 2021-03-17 19:07:21 ea80f3002f4120f5dcee76e8779dfdc88e1e096c5cdd06904c20fd26d50c3827


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:
SQLITE_SOURCE_ID: 2021-03-12 15:10:09 acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b


c0: releaselog/3_34_1.html
c1: 3.34.1
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_1.html
c1: 3.34.1
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_1.html
c1: 3.34.1
c3:
 Improved error messages on <a href="../lang_createtable.html#ckconst">CHECK constraint</a> failures.


c0: releaselog/3_34_1.html
c1: 3.34.1
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_1.html
c1: 3.34.1
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_1.html
c1: 3.34.1
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_1.html
c1: 3.34.1
c3:
 Enhanced <a href="../fts5.html">FTS5</a> to support <a href="../fts5.html#trigramidx">trigram indexes</a>.


c0: releaselog/3_34_1.html
c1: 3.34.1
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_1.html
c1: 3.34.1
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_1.html
c1: 3.34.1
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_1.html
c1: 3.34.1
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_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:
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:
 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_3.html
c1: 3.32.3
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_3.html
c1: 3.32.3
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_3.html
c1: 3.32.3
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_3.html
c1: 3.32.3
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_3.html
c1: 3.32.3
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_3.html
c1: 3.32.3
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_3.html
c1: 3.32.3
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_3.html
c1: 3.32.3
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_3.html
c1: 3.32.3
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_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:
SQLITE_SOURCE_ID: 2020-06-04 12:58:43 ec02243ea6ce33b090870ae55ab8aa2534b54d216d45c4aa2fdbb00e86861e8c


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:
SQLITE_SOURCE_ID: 2020-05-22 17:46:16 5998789c9c744bce92e4cff7636bba800a75574243d6977e1fc8281e360f8d5a


c0: releaselog/3_31_1.html
c1: 3.31.1
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_1.html
c1: 3.31.1
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_1.html
c1: 3.31.1
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_1.html
c1: 3.31.1
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_1.html
c1: 3.31.1
c3:
Added the "#-N" array notation for <a href="../json1.html#jsonpath">JSON function path arguments</a>.


c0: releaselog/3_31_1.html
c1: 3.31.1
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_1.html
c1: 3.31.1
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_1.html
c1: 3.31.1
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_1.html
c1: 3.31.1
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_1.html
c1: 3.31.1
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_1.html
c1: 3.31.1
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_1.html
c1: 3.31.1
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_1.html
c1: 3.31.1
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_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:
SQLITE_SOURCE_ID: 2020-01-22 18:38:59 f6affdd41608946fcfcea914ece149038a8b25a62bbe719ed2561c649b86d824


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


c0: releaselog/3_30_1.html
c1: 3.30.1
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_1.html
c1: 3.30.1
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_1.html
c1: 3.30.1
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_1.html
c1: 3.30.1
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_1.html
c1: 3.30.1
c3:
 Enhance the <a href="../rbu.html">RBU</a> extension to support <a href="../expridx.html">indexes on expressions</a>.


c0: releaselog/3_30_1.html
c1: 3.30.1
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_1.html
c1: 3.30.1
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_1.html
c1: 3.30.1
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_1.html
c1: 3.30.1
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_1.html
c1: 3.30.1
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_1.html
c1: 3.30.1
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_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:
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:
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_2.html
c1: 3.27.2
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_2.html
c1: 3.27.2
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_2.html
c1: 3.27.2
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_2.html
c1: 3.27.2
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_2.html
c1: 3.27.2
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_2.html
c1: 3.27.2
c3:
 Increased robustness against malicious SQL that is run against a 
     maliciously corrupted database.
 


c0: releaselog/3_27_2.html
c1: 3.27.2
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_2.html
c1: 3.27.2
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_2.html
c1: 3.27.2
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_2.html
c1: 3.27.2
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_2.html
c1: 3.27.2
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_2.html
c1: 3.27.2
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_2.html
c1: 3.27.2
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_2.html
c1: 3.27.2
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_2.html
c1: 3.27.2
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_2.html
c1: 3.27.2
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_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:
SQLITE_SOURCE_ID: 2019-02-08 13:17:39 0eca3dd3d38b31c92b49ca2d311128b74584714d9e7de895b1a6286ef959a1dd


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_invert.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:
 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_3.html
c1: 3.25.3
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_3.html
c1: 3.25.3
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_3.html
c1: 3.25.3
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_3.html
c1: 3.25.3
c3:
 Output infinity as 1e999 in the ".dump" command of the
     <a href="../cli.html">command-line shell</a>.


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


c0: releaselog/3_25_3.html
c1: 3.25.3
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_3.html
c1: 3.25.3
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_3.html
c1: 3.25.3
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_3.html
c1: 3.25.3
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_3.html
c1: 3.25.3
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_3.html
c1: 3.25.3
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_3.html
c1: 3.25.3
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_3.html
c1: 3.25.3
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_3.html
c1: 3.25.3
c3:
 Fixes for various other compiler warnings and minor problems associated
     with obscure configurations.


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:
SQLITE_SOURCE_ID: "2018-09-25 19:08:10 fb90e7189ae6d62e77ba3a308ca5d683f90bbe633cf681865365b8e92792d1c7"


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:
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:
 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_1.html
c1: 3.23.1
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_1.html
c1: 3.23.1
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_1.html
c1: 3.23.1
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_1.html
c1: 3.23.1
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_1.html
c1: 3.23.1
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_1.html
c1: 3.23.1
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_1.html
c1: 3.23.1
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_1.html
c1: 3.23.1
c3:
 Added the <a href="https://sqlite.org/src/file/ext/misc/normalize.c">sqlite3_normalize()</a>
     extension function.


c0: releaselog/3_23_1.html
c1: 3.23.1
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_1.html
c1: 3.23.1
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_1.html
c1: 3.23.1
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_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:
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:
 Update the text of error messages returned by <a href="../c3ref/errcode.html">sqlite3_errmsg()</a> for some
     error codes.


c0: releaselog/3_20_1.html
c1: 3.20.1
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_1.html
c1: 3.20.1
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_1.html
c1: 3.20.1
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_1.html
c1: 3.20.1
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_1.html
c1: 3.20.1
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_1.html
c1: 3.20.1
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_1.html
c1: 3.20.1
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_1.html
c1: 3.20.1
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_1.html
c1: 3.20.1
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_1.html
c1: 3.20.1
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_1.html
c1: 3.20.1
c3:
 Add the -withoutnulls option to the <a href="../tclsqlite.html#eval">TCL interface eval method</a>.


c0: releaselog/3_20_1.html
c1: 3.20.1
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_1.html
c1: 3.20.1
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_1.html
c1: 3.20.1
c3:
 Miscellaneous optimizations result in a 2% reduction in <a href="../cpu.html">CPU cycles used</a>.


c0: releaselog/3_20_1.html
c1: 3.20.1
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_1.html
c1: 3.20.1
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_1.html
c1: 3.20.1
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_1.html
c1: 3.20.1
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_1.html
c1: 3.20.1
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_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:
SQLITE_SOURCE_ID: "2017-08-01 13:24:15 9501e22dfeebdcefa783575e47c60b514d7c2e0cad73b2a496c0bc4b680900a8"


c0: releaselog/3_19_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
c3:
 Avoid unnecessary invalidation of <a href="../c3ref/blob.html">sqlite3_blob</a> handles when making
     changes to unrelated tables.


c0: releaselog/3_19_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
c3:
 Reuse the same materialization of a VIEW if that VIEW appears more than
     once in the same query.


c0: releaselog/3_19_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_3.html
c1: 3.19.3
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_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:
SQLITE_SOURCE_ID: "2017-05-25 16:50:27 edb4e819b0c058c7d74d27ebd14cc5ceb2bad6a6144a486a970182b7afe3f8b9"


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:
SQLITE_SOURCE_ID: "2017-05-22 13:58:13 28a94eb282822cad1d1420f2dad6bf65e4b8b9062eda4a0b9ee8270b2c608e40"


c0: releaselog/3_18_2.html
c1: 3.18.2
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_2.html
c1: 3.18.2
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_2.html
c1: 3.18.2
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_2.html
c1: 3.18.2
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_2.html
c1: 3.18.2
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_2.html
c1: 3.18.2
c3:
Enhance the query plans for joins to detect empty tables early and
    halt without doing unnecessary work.


c0: releaselog/3_18_2.html
c1: 3.18.2
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_2.html
c1: 3.18.2
c3:
Added the -D<a href="../compile.html#max_memory">SQLITE_MAX_MEMORY</a>=<i>N</i> compile-time option.


c0: releaselog/3_18_2.html
c1: 3.18.2
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_2.html
c1: 3.18.2
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_2.html
c1: 3.18.2
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_2.html
c1: 3.18.2
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_2.html
c1: 3.18.2
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_2.html
c1: 3.18.2
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_2.html
c1: 3.18.2
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_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:
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:
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_2.html
c1: 3.16.2
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_2.html
c1: 3.16.2
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_2.html
c1: 3.16.2
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_2.html
c1: 3.16.2
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_2.html
c1: 3.16.2
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_2.html
c1: 3.16.2
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_2.html
c1: 3.16.2
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_2.html
c1: 3.16.2
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_2.html
c1: 3.16.2
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_2.html
c1: 3.16.2
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_2.html
c1: 3.16.2
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_16_2.html
c1: 3.16.2
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_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_15_2.html
c1: 3.15.2
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_2.html
c1: 3.15.2
c3:
 Added the "<a href="../uri.html#urimodeof">modeof=<i>filename</i></a>" URI parameter on the unix VFS


c0: releaselog/3_15_2.html
c1: 3.15.2
c3:
 Added support for <a href="../c3ref/c_dbconfig_defensive.html#sqlitedbconfigmaindbname">SQLITE_DBCONFIG_MAINDBNAME</a>.


c0: releaselog/3_15_2.html
c1: 3.15.2
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_2.html
c1: 3.15.2
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_2.html
c1: 3.15.2
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_2.html
c1: 3.15.2
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_2.html
c1: 3.15.2
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_2.html
c1: 3.15.2
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_2.html
c1: 3.15.2
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_2.html
c1: 3.15.2
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_2.html
c1: 3.15.2
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_15_2.html
c1: 3.15.2
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_2.html
c1: 3.15.2
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_2.html
c1: 3.15.2
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_2.html
c1: 3.15.2
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_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_14_2.html
c1: 3.14.2
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_2.html
c1: 3.14.2
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_2.html
c1: 3.14.2
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_2.html
c1: 3.14.2
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_2.html
c1: 3.14.2
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_2.html
c1: 3.14.2
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_2.html
c1: 3.14.2
c3:
Enhancements to <a href="../lemon.html">Lemon parser generator</a>, so that it generates a
    faster parser.


c0: releaselog/3_14_2.html
c1: 3.14.2
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_2.html
c1: 3.14.2
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_2.html
c1: 3.14.2
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_2.html
c1: 3.14.2
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_2.html
c1: 3.14.2
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_2.html
c1: 3.14.2
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_2.html
c1: 3.14.2
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_2.html
c1: 3.14.2
c3:
Disable the <a href="../c3ref/set_authorizer.html">authorizer callback</a> while reparsing the schema.


c0: releaselog/3_14_2.html
c1: 3.14.2
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_2.html
c1: 3.14.2
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_2.html
c1: 3.14.2
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_2.html
c1: 3.14.2
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_14_2.html
c1: 3.14.2
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_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_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:
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_2.html
c1: 3.12.2
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_2.html
c1: 3.12.2
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_2.html
c1: 3.12.2
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_2.html
c1: 3.12.2
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_2.html
c1: 3.12.2
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_2.html
c1: 3.12.2
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_2.html
c1: 3.12.2
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_2.html
c1: 3.12.2
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_2.html
c1: 3.12.2
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_2.html
c1: 3.12.2
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_2.html
c1: 3.12.2
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_2.html
c1: 3.12.2
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_2.html
c1: 3.12.2
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_2.html
c1: 3.12.2
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_2.html
c1: 3.12.2
c3:
Fix a harmless TSAN warning associated with the <a href="../c3ref/db_readonly.html">sqlite3_db_readonly()</a> interface.


c0: releaselog/3_12_2.html
c1: 3.12.2
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_11_1.html
c1: 3.11.1
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_1.html
c1: 3.11.1
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_1.html
c1: 3.11.1
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_1.html
c1: 3.11.1
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_1.html
c1: 3.11.1
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_1.html
c1: 3.11.1
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_1.html
c1: 3.11.1
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_1.html
c1: 3.11.1
c3:
Add the ability to do MSVC Windows builds from the <a href="../download.html">amalgamation tarball</a>.


c0: releaselog/3_11_1.html
c1: 3.11.1
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_1.html
c1: 3.11.1
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_1.html
c1: 3.11.1
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_1.html
c1: 3.11.1
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_1.html
c1: 3.11.1
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_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_10_2.html
c1: 3.10.2
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_2.html
c1: 3.10.2
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_2.html
c1: 3.10.2
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_2.html
c1: 3.10.2
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_2.html
c1: 3.10.2
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_2.html
c1: 3.10.2
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_2.html
c1: 3.10.2
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_2.html
c1: 3.10.2
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_2.html
c1: 3.10.2
c3:
Added the <a href="../compile.html#like_doesnt_match_blobs">SQLITE_LIKE_DOESNT_MATCH_BLOBS</a> compile-time option.


c0: releaselog/3_10_2.html
c1: 3.10.2
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_2.html
c1: 3.10.2
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_2.html
c1: 3.10.2
c3:
Added the --enable-editline and --enable-static-shell options
    to the various autoconf-generated configure scripts.


c0: releaselog/3_10_2.html
c1: 3.10.2
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_2.html
c1: 3.10.2
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_10_2.html
c1: 3.10.2
c3:
Add the <a href="../c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntljournalpointer">SQLITE_FCNTL_JOURNAL_POINTER</a> file control.


c0: releaselog/3_10_2.html
c1: 3.10.2
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_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_9_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_9_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_3.html
c1: 3.9.3
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_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_8_11_1.html
c1: 3.8.11.1
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_1.html
c1: 3.8.11.1
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_1.html
c1: 3.8.11.1
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_1.html
c1: 3.8.11.1
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_1.html
c1: 3.8.11.1
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_1.html
c1: 3.8.11.1
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_1.html
c1: 3.8.11.1
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_1.html
c1: 3.8.11.1
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_1.html
c1: 3.8.11.1
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_1.html
c1: 3.8.11.1
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_1.html
c1: 3.8.11.1
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_1.html
c1: 3.8.11.1
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="http://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_1.html
c1: 3.8.11.1
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_1.html
c1: 3.8.11.1
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_1.html
c1: 3.8.11.1
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_1.html
c1: 3.8.11.1
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_1.html
c1: 3.8.11.1
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_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_10_2.html
c1: 3.8.10.2
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_2.html
c1: 3.8.10.2
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_2.html
c1: 3.8.10.2
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_2.html
c1: 3.8.10.2
c3:
Identify all methods for important objects in the interface documentation.
    (<a href="../c3ref/context.html">example</a>)


c0: releaselog/3_8_10_2.html
c1: 3.8.10.2
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_2.html
c1: 3.8.10.2
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_10_2.html
c1: 3.8.10.2
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_2.html
c1: 3.8.10.2
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_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_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:
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_3.html
c1: 3.8.8.3
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_3.html
c1: 3.8.8.3
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_3.html
c1: 3.8.8.3
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_3.html
c1: 3.8.8.3
c3:
Added the <a href="../compile.html#enable_api_armor">SQLITE_ENABLE_API_ARMOR</a> compile-time option.


c0: releaselog/3_8_8_3.html
c1: 3.8.8.3
c3:
Added the <a href="../compile.html#reverse_unordered_selects">SQLITE_REVERSE_UNORDERED_SELECTS</a> compile-time option.


c0: releaselog/3_8_8_3.html
c1: 3.8.8.3
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_3.html
c1: 3.8.8.3
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_3.html
c1: 3.8.8.3
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_3.html
c1: 3.8.8.3
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_3.html
c1: 3.8.8.3
c3:
Reduce the number of memcpy() operations involved in balancing a b-tree,
    for 3.2% overall performance boost.


c0: releaselog/3_8_8_3.html
c1: 3.8.8.3
c3:
Improvements to cost estimates for the <a href="../optoverview.html#skipscan">skip-scan optimization</a>.


c0: releaselog/3_8_8_3.html
c1: 3.8.8.3
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_3.html
c1: 3.8.8.3
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_3.html
c1: 3.8.8.3
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_3.html
c1: 3.8.8.3
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_3.html
c1: 3.8.8.3
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_3.html
c1: 3.8.8.3
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_3.html
c1: 3.8.8.3
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_3.html
c1: 3.8.8.3
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_3.html
c1: 3.8.8.3
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_8_3.html
c1: 3.8.8.3
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_3.html
c1: 3.8.8.3
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_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_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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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:
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_3.html
c1: 3.8.4.3
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_3.html
c1: 3.8.4.3
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_3.html
c1: 3.8.4.3
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_3.html
c1: 3.8.4.3
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="http://www.sqlite.org/src/info/fccbde530a">Ticket &#91;fccbde530a&#93;</a>


c0: releaselog/3_8_4_3.html
c1: 3.8.4.3
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="http://www.sqlite.org/src/info/4c86b126f2">Ticket &#91;4c86b126f2&#93;</a>


c0: releaselog/3_8_4_3.html
c1: 3.8.4.3
c3:
Bug fix: Make sure "rowid" columns are correctly resolved in joins between
    normal tables and WITHOUT ROWID tables.
    <a href="http://www.sqlite.org/src/info/c34d0557f7">Ticket &#91;c34d0557f7&#93;</a>


c0: releaselog/3_8_4_3.html
c1: 3.8.4.3
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="http://www.sqlite.org/src/info/8c63ff0eca">Ticket &#91;8c63ff0eca&#93;</a>


c0: releaselog/3_8_4_3.html
c1: 3.8.4.3
c3:
Bug fix: Ensure that "ORDER BY random()" clauses do not get optimized out.
    <a href="http://www.sqlite.org/src/info/65bdeb9739">Ticket &#91;65bdeb9739&#93;</a>


c0: releaselog/3_8_4_3.html
c1: 3.8.4.3
c3:
Bug fix: Repair a name-resolution error that can occur in sub-select statements
    contained within a TRIGGER.
    <a href="http://www.sqlite.org/src/info/4ef7e3cfca">Ticket &#91;4ef7e3cfca&#93;</a>


c0: releaselog/3_8_4_3.html
c1: 3.8.4.3
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_4_3.html
c1: 3.8.4.3
c3:
Work around a C-preprocessor macro conflict that breaks the build for some
    configurations with Microsoft Visual Studio.


c0: releaselog/3_8_4_3.html
c1: 3.8.4.3
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_3.html
c1: 3.8.4.3
c3:
Fix a potential buffer overread that could result when trying to search a
    corrupt database file.


c0: releaselog/3_8_4_3.html
c1: 3.8.4.3
c3:
Add a 
    <a href="http://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="http://www.sqlite.org/src/info/98825a79ce1456863">Ticket 98825a79ce14</a>.


c0: releaselog/3_8_3_1.html
c1: 3.8.3.1
c3:
Fix a bug (ticket <a href="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="http://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="../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="http://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="http://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="http://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="http://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>.


