Documentation Source Text

Check-in [c22649df68]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update the change log for the latest changes. Make it easier to find the "How To Compile" documentation. Remove Nokia from the sponsors list.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c22649df684bc0a95384559a82c46b26dcf106c8
User & Date: drh 2014-08-05 20:22:47
Context
2014-08-05
20:37
Update the amalgamation document with the latest size and file count numbers. Add yet another link to the How To Compile document. check-in: 5b99c03910 user: drh tags: trunk
20:22
Update the change log for the latest changes. Make it easier to find the "How To Compile" documentation. Remove Nokia from the sponsors list. check-in: c22649df68 user: drh tags: trunk
2014-08-01
03:11
Enhance the documentation on PRAGMA integrity_check to match recent implementation enhancements. Add the enhancements to PRAGMA integrity_check to the change log. check-in: 6b17e6415e user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/changes.in.

15
16
17
18
19
20
21
22
23



24
25
26
27
28
29
30
31
32
33
34
35
36
37

















38
39
40
41
42
43

44
45
46
47
48
49
50
proc chng {date desc {options {}}} {
  global nChng aChng
  set aChng($nChng) [list $date $desc $options]
  incr nChng
}

chng {2014-09-?? (3.8.6)} {
<li>Added the [http://www.sqlite.org/src/finfo?name=ext/misc/fileio.c|fileio.c]
    [loadable extension] source code file to the source tree.



<li>Increase the timeout in [WAL mode] before issuing an [SQLITE_PROTOCOL]
    error from 1 second to 10 seconds.
<li>Added the [likely(X)] SQL function.
<li>The query planner now uses [sqlite_stat4] information (created by [ANALYZE])
    to help determine if the [skip-scan optimization] is appropriate.
<li>The [unicode61] tokenizer is now included in [FTS4] by default.
<li>Added the [.fullschema] dot-command to the [command-line shell].
<li>Added the [file I/O functions|readfile(X) and writefile(X,Y)]
    extension functions to the [command-line shell]
<li>Added support for hexadecimal integer literals in the SQL parser.
    (Ex: 0x123abc)
<li>Increase the maximum value of [SQLITE_MAX_ATTACHED] from 62 to 125.
<li>Trigger automatic reprepares on all prepared statements when [ANALYZE] is
    run.

















<li>Ensure that the query planner never tries to use a self-made transient
    index in place of a schema-defined index.
<li>Optimization: Deactivate the [DISTINCT] keyword on subqueries on the
    right-hand side of the [IN operator].
<li>Enhanced the [PRAGMA integrity_check] command to detect [UNIQUE] and
    [NOT NULL] constraint violations.

<p><b>Bug Fixes:</b>
<li>Fix a bug in [CREATE INDEX|CREATE UNIQUE INDEX], introduced when [WITHOUT ROWID]
    support added in version 3.8.2, that allows a non-unique NOT NULL column to be
    given a UNIQUE index.
    Ticket [http://www.sqlite.org/src/info/9a6daf340df99ba93c|9a6daf340df99ba93c]
<li>Fix a bug in [R-Tree extension], introduced in the previous release,
    that can cause an







|
|
>
>
>



<
<

<
<
<
<
<
<


>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


<
<
<
<
>







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29


30






31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51




52
53
54
55
56
57
58
59
proc chng {date desc {options {}}} {
  global nChng aChng
  set aChng($nChng) [list $date $desc $options]
  incr nChng
}

chng {2014-09-?? (3.8.6)} {
<li>Added support for [hexadecimal integer literals] in the SQL parser.
    (Ex: 0x123abc)
<li>Enhanced the [PRAGMA integrity_check] command to detect [UNIQUE] and
    [NOT NULL] constraint violations.
<li>Increase the maximum value of [SQLITE_MAX_ATTACHED] from 62 to 125.
<li>Increase the timeout in [WAL mode] before issuing an [SQLITE_PROTOCOL]
    error from 1 second to 10 seconds.
<li>Added the [likely(X)] SQL function.


<li>The [unicode61] tokenizer is now included in [FTS4] by default.






<li>Trigger automatic reprepares on all prepared statements when [ANALYZE] is
    run.
<li>Added a new
    [loadable extension] source code file to the source tree:
    [http://www.sqlite.org/src/finfo?name=ext/misc/fileio.c|fileio.c]
<li>Add extension functions [file I/O functions|readfile(X) and writefile(X,Y)]
    (using code copy/pasted from fileio.c in the previous bullet) to the
    [command-line shell].
<li>Added the [.fullschema] dot-command to the [command-line shell].
<p><b>Performance Enhancements:</b>
<li>Deactivate the [DISTINCT] keyword on subqueries on the
    right-hand side of the [IN operator].
<li>Add the capability of evaluating an [IN operator] as a sequence
    of comparisons as an alternative to using a table lookup.  Use the sequence
    of comparisons implementation in circumstances where it is likely to be
    faster, such as when the right-hand side of the IN operator
    is small and/or changes frequently.
<li>The query planner now uses [sqlite_stat4] information (created by [ANALYZE])
    to help determine if the [skip-scan optimization] is appropriate.
<li>Ensure that the query planner never tries to use a self-made transient
    index in place of a schema-defined index.




<li>Other minor tweaks to improve the quality of [VDBE] code.
<p><b>Bug Fixes:</b>
<li>Fix a bug in [CREATE INDEX|CREATE UNIQUE INDEX], introduced when [WITHOUT ROWID]
    support added in version 3.8.2, that allows a non-unique NOT NULL column to be
    given a UNIQUE index.
    Ticket [http://www.sqlite.org/src/info/9a6daf340df99ba93c|9a6daf340df99ba93c]
<li>Fix a bug in [R-Tree extension], introduced in the previous release,
    that can cause an

Changes to pages/docs.in.

75
76
77
78
79
80
81




82
83
84
85
86
87
88
...
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262

doc {SQLite In 5 Minutes Or Less} {quickstart.html} {
  A very quick introduction to programming with SQLite.
}
doc {Introduction to the C/C++ API } {cintro.html} {
  This document introduces the C/C++ API. Users should read this document 
  before the C/C++ API Reference Guide linked below.




}
doc {C/C++ API Reference} {c3ref/intro.html} {
  This document describes each API function separately.
}
doc {Tcl API} {tclsqlite.html} {
  A description of the TCL interface bindings for SQLite.
}
................................................................................
  string or blob, the maximum size of a database, the maximum number of
  tables in a database, etc.) and how these limits can be altered at
  compile-time and run-time.
}



heading {Old Documents} {
  These documents either pertain to SQLite version 2 or were written
  during the transition period between versions 2 and 3. They are no longer
  strictly applicable to recent versions of SQLite, but the information
  found within may still be useful.
}
doc {Version 2 C/C++ API} {c_interface.html} {
  A description of the C/C++ interface bindings for SQLite through version 
  2.8
}
doc {Version 2 DataTypes } {datatypes.html} {
  A description of how SQLite version 2 handles SQL datatypes.







>
>
>
>







 







|

|
|
|







75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
...
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266

doc {SQLite In 5 Minutes Or Less} {quickstart.html} {
  A very quick introduction to programming with SQLite.
}
doc {Introduction to the C/C++ API } {cintro.html} {
  This document introduces the C/C++ API. Users should read this document 
  before the C/C++ API Reference Guide linked below.
}
doc {How To Compile SQLite} {howtocompile.html} {
  Instructions and hints for compiling SQLite C code and integrating
  that code with your own application.
}
doc {C/C++ API Reference} {c3ref/intro.html} {
  This document describes each API function separately.
}
doc {Tcl API} {tclsqlite.html} {
  A description of the TCL interface bindings for SQLite.
}
................................................................................
  string or blob, the maximum size of a database, the maximum number of
  tables in a database, etc.) and how these limits can be altered at
  compile-time and run-time.
}



heading {Obsolete Documents} {
  These documents either pertain to SQLite version 2 or were written
  during the transition period between versions 2 and 3 (circa 2004).
  This documents are no longer up-to-date.  They are retained for 
  historical reference.
}
doc {Version 2 C/C++ API} {c_interface.html} {
  A description of the C/C++ interface bindings for SQLite through version 
  2.8
}
doc {Version 2 DataTypes } {datatypes.html} {
  A description of how SQLite version 2 handles SQL datatypes.

Changes to pages/features.in.

21
22
23
24
25
26
27
28

29
30
31
32
33
34
35
<li>Simple, easy to use <a href="cintro.html">API</a>.</li>
<li>Written in ANSI-C.  <a href="tclsqlite.html">TCL bindings</a> included.
    Bindings for dozens of other languages available separately.</li>
<li>Well-commented source code with
    [test coverage |100% branch test coverage].</li>
<li>Available as a 
    <a href="amalgamation.html">single ANSI-C source-code file</a> 
    that you can easily drop into another project.

<li><a href="selfcontained.html">Self-contained</a>:
    no external dependencies.</li>
<li>Cross-platform: Unix (Linux, Mac OS-X, Android, iOS) and Windows
    (Win32, WinCE, WinRT)
    are supported out of the box.  Easy to port to other systems.
<li>Sources are in the <a href="copyright.html">public domain</a>.
    Use for any purpose.</li>







|
>







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<li>Simple, easy to use <a href="cintro.html">API</a>.</li>
<li>Written in ANSI-C.  <a href="tclsqlite.html">TCL bindings</a> included.
    Bindings for dozens of other languages available separately.</li>
<li>Well-commented source code with
    [test coverage |100% branch test coverage].</li>
<li>Available as a 
    <a href="amalgamation.html">single ANSI-C source-code file</a> 
    that is [how to compile|easy to compile] and hence is easy
    to add into a larger project.
<li><a href="selfcontained.html">Self-contained</a>:
    no external dependencies.</li>
<li>Cross-platform: Unix (Linux, Mac OS-X, Android, iOS) and Windows
    (Win32, WinCE, WinRT)
    are supported out of the box.  Easy to port to other systems.
<li>Sources are in the <a href="copyright.html">public domain</a>.
    Use for any purpose.</li>

Changes to pages/howtocompile.in.

1

2
3
4
5
6
7
8
9
          <title>How To Compile SQLite</title>

<tcl>hd_keywords {how to compile}</tcl>

<h1 align=center>How To Compile SQLite</h1>

<p>
SQLite is ANSI-C source code.
It must be compiled into machine code before it is useful.
This article is a guide to the various ways of compiling SQLite.

>
|







1
2
3
4
5
6
7
8
9
10
          <title>How To Compile SQLite</title>
<title>How To Compile SQLite</title>
<tcl>hd_keywords {how to compile} {How To Compile SQLite}</tcl>

<h1 align=center>How To Compile SQLite</h1>

<p>
SQLite is ANSI-C source code.
It must be compiled into machine code before it is useful.
This article is a guide to the various ways of compiling SQLite.

Changes to pages/index.in.

61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
  sponsor[4] = '<tr><td align="center">\
    <a href="http://www.bentley.com/">\
    <img src="images/foreignlogos/bentley.gif" alt="bentley.com" border="0">\
    </a></td><td>\
    <a href="http://www.bentley.com/">Bentley</a> - Comprehensive software \
    solutions for Sustaining Infrastructure.</td></tr>'

  sponsor[5] = '<tr><td align="center">\
    <a href="http://www.nokia.com/">\
    <img src="images/foreignlogos/nokia.gif" alt="nokia.com" border="0">\
    </a></td><td>\
    <a href="http://www.nokia.com/">Nokia</a> is the world leader in mobility,\
    driving the transformation and growth of the converging internet and\
    communications industries.</td></tr>'

  count = 6
  while( count>0 ){
    i = Math.floor(Math.random()*6)
    if( sponsor[i]!=null ){
      document.write(sponsor[i])
      sponsor[i] = null
      count--
    }







<
<
<
<
<
<
<
<
|







61
62
63
64
65
66
67








68
69
70
71
72
73
74
75
  sponsor[4] = '<tr><td align="center">\
    <a href="http://www.bentley.com/">\
    <img src="images/foreignlogos/bentley.gif" alt="bentley.com" border="0">\
    </a></td><td>\
    <a href="http://www.bentley.com/">Bentley</a> - Comprehensive software \
    solutions for Sustaining Infrastructure.</td></tr>'









  count = 5
  while( count>0 ){
    i = Math.floor(Math.random()*6)
    if( sponsor[i]!=null ){
      document.write(sponsor[i])
      sponsor[i] = null
      count--
    }

Changes to pages/lang.in.

1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792







1793

1794
1795
1796
1797

1798
1799
1800
1801
1802
1803
1804
1805
1806
to 0 (false). ^If one operand is NULL and the other is not, then the
IS operator evaluates to 0 (false) and the IS NOT operator is 1 (true).
^It is not possible for an IS or IS NOT expression to evaluate to NULL.
^Operators [Operator IS] and [Operator {IS NOT}] have the same 
precedence as [Operator =]."

<tcl>hd_fragment litvalue {literal value}</tcl>
<h3>Literal Values</h3>
<p>
^A literal value is a constant of some kind.
^Literal values may be integers, floating point numbers, strings,
BLOBs, or NULLs.</p>

<p>The syntax for integer and floating point literals (collectively
"numeric literals") is shown by the following diagram:</p>

<tcl>BubbleDiagram numeric-literal</tcl>

<p>
^(If a numeric literal has a decimal point or an exponentiation
clause, then it is a floating point literal.  Otherwise is it is an 
integer literal.)^  ^The "E" character that begins the exponentiation
clause of a floating point literal can be either upper or lower case.
^(The "." character is always used 
as the decimal point even if the locale setting specifies "," for
this role - the use of "," for the decimal point would result in







syntactic ambiguity.)^ ^(Hexadecimal integer literals are limited

to sixteen significant digits of precision.)^</p>

<p>Note that for backwards compatibility the "Ox" hexadecimal integer
notation is only understood by the SQL language parser.

^(String variables that
contain text formatted like hexadecimal integers are <u>not</u>
interpreted as hexadecimal integers when coercing the string value
into an integer due to a [CAST expression] or for a [column affinity]
transformation or prior to performing a numeric operation or for
any other run-time conversions.)^  ^(When coercing a
string value in the format of a hexadecimal integer into an integer
value, the conversion process stops when the 'x' character is seen
so the resulting integer value is always zero.)^







|

|

|
<
|












>
>
>
>
>
>
>
|
>


|
|
>

|







1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778

1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
to 0 (false). ^If one operand is NULL and the other is not, then the
IS operator evaluates to 0 (false) and the IS NOT operator is 1 (true).
^It is not possible for an IS or IS NOT expression to evaluate to NULL.
^Operators [Operator IS] and [Operator {IS NOT}] have the same 
precedence as [Operator =]."

<tcl>hd_fragment litvalue {literal value}</tcl>
<h3>Literal Values (Constants)</h3>
<p>
^A literal value represents a constant.
^Literal values may be integers, floating point numbers, strings,
BLOBs, or NULLs.

The syntax for integer and floating point literals (collectively
"numeric literals") is shown by the following diagram:</p>

<tcl>BubbleDiagram numeric-literal</tcl>

<p>
^(If a numeric literal has a decimal point or an exponentiation
clause, then it is a floating point literal.  Otherwise is it is an 
integer literal.)^  ^The "E" character that begins the exponentiation
clause of a floating point literal can be either upper or lower case.
^(The "." character is always used 
as the decimal point even if the locale setting specifies "," for
this role - the use of "," for the decimal point would result in
syntactic ambiguity.)^

<tcl>hd_fragment hexint {hexadecimal integer literals}</tcl>
<p>Beginning with SQLite version 3.8.6, the parser supports hexadecimal
integer literals using the usual notation of "0x" or "0X" followed
by hexadecimal digits.  For example, 0x1234 means the same as 4660
and 0x8000000000000000 means the same as -9223372036854775808.
 ^(Hexadecimal integer literals are interpreted as 64-bit
two's-complement integers and are thus limited
to sixteen significant digits of precision.)^</p>

<p>However, for backwards compatibility, the "Ox" hexadecimal integer
notation is only understood by the SQL language parser, not by the
type conversions routines.
^(String variables that
contain text formatted like hexadecimal integers are not
interpreted as hexadecimal integers when coercing the string value
into an integer due to a [CAST expression] or for a [column affinity]
transformation or prior to performing a numeric operation or for
any other run-time conversions.)^  ^(When coercing a
string value in the format of a hexadecimal integer into an integer
value, the conversion process stops when the 'x' character is seen
so the resulting integer value is always zero.)^

Changes to pages/quickstart.in.

101
102
103
104
105
106
107


108
109
30      fprintf(stderr, "SQL error: %s\n", zErrMsg);
31      <b>sqlite3_free</b>(zErrMsg);
32    }
33    <b>sqlite3_close</b>(db);
34    return 0;
35  }
</pre></blockquote>


</li>
</ul>







>
>


101
102
103
104
105
106
107
108
109
110
111
30      fprintf(stderr, "SQL error: %s\n", zErrMsg);
31      <b>sqlite3_free</b>(zErrMsg);
32    }
33    <b>sqlite3_close</b>(db);
34    return 0;
35  }
</pre></blockquote>
<p>See the [How To Compile SQLite] document for instructions and hints on
how to compile the program show above.
</li>
</ul>