Documentation Source Text

Changes On Branch branch-3.15
Login

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

Changes In Branch branch-3.15 Excluding Merge-Ins

This is equivalent to a diff from 2d5915fdd8 to b233527c05

2016-11-29
17:09
Merge more 3.15 changes into trunk. (check-in: a765b8866f user: drh tags: trunk)
2016-11-28
19:35
Clarify the Python entry on the famous users page. (Leaf check-in: b233527c05 user: drh tags: branch-3.15)
19:34
Fix a typo on the 3.15.2 change log, and add a News entry for 3.15.2. (check-in: 343d035585 user: drh tags: branch-3.15)
2016-10-31
19:02
Fix a broken link to the Lemon documentation. (check-in: 7434eb6397 user: drh tags: branch-3.15)
2016-10-25
14:50
Enhance the file format document to explain how sqlite_stat1 works for WITHOUT ROWID tables. (check-in: df4011932b user: drh tags: trunk)
2016-10-14
19:35
Fix typo on row value example. (check-in: 2d5915fdd8 user: drh tags: trunk)
10:23
Add hashes for 3.15.0 to the change log. Update the chronology. (check-in: 55f49500f9 user: drh tags: trunk)

Changes to pages/arch.in.

75
76
77
78
79
80
81

82
83
84
85
86
87
88
89
the tokenizer call the parser is better, though, because it can be made
threadsafe and it runs faster.</p>

<h1>Parser</h1>

<p>The parser assigns meaning to tokens based on
their context.  The parser for SQLite is generated using the

<a href="./lemon.html">Lemon</a> LALR(1) parser generator.
Lemon does the same job as YACC/BISON, but it uses
a different input syntax which is less error-prone.
Lemon also generates a parser which is reentrant and thread-safe.
And Lemon defines the concept of a non-terminal destructor so
that it does not leak memory when syntax errors are encountered.
The grammar file that drives Lemon and that defines the SQL language
that SQLite understands is found in <file>parse.y</file>.







>
|







75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
the tokenizer call the parser is better, though, because it can be made
threadsafe and it runs faster.</p>

<h1>Parser</h1>

<p>The parser assigns meaning to tokens based on
their context.  The parser for SQLite is generated using the
<a href="https://www.sqlite.org/src/doc/trunk/doc/lemon.html">Lemon</a>
LALR(1) parser generator.
Lemon does the same job as YACC/BISON, but it uses
a different input syntax which is less error-prone.
Lemon also generates a parser which is reentrant and thread-safe.
And Lemon defines the concept of a non-terminal destructor so
that it does not leak memory when syntax errors are encountered.
The grammar file that drives Lemon and that defines the SQL language
that SQLite understands is found in <file>parse.y</file>.

Changes to pages/changes.in.

16
17
18
19
20
21
22
































23
24
25
26
27
28
29
set nChng 0
proc chng {date desc {options {}}} {
  global nChng aChng xrefChng
  set aChng($nChng) [list $date $desc $options]
  set xrefChng($date) $nChng
  incr nChng
}

































chng {2016-10-14 (3.15.0)} {
<li> Added support for [row values].
<li> Allow [deterministic SQL functions] in the WHERE clause of a [partial index].
<li> Added the "[modeof|modeof=<i>filename</i>]" URI parameter on the unix VFS
<li> Added support for [SQLITE_DBCONFIG_MAINDBNAME].
<li> Added the ability to [VACUUM] an [ATTACH|ATTACH-ed] database.







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







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
60
61
set nChng 0
proc chng {date desc {options {}}} {
  global nChng aChng xrefChng
  set aChng($nChng) [list $date $desc $options]
  set xrefChng($date) $nChng
  incr nChng
}

chng {2016-11-28 (3.15.2)} {
<li> Multiple bug fixes to the [row value] logic that was introduced in version 3.15.0.
<li> Fix a NULL pointer dereference in ATTACH/DETACH following a maliciously constructed
     syntax error.  Ticket 
     [https://www.sqlite.org/src/info/2f1b168ab4d4844|2f1b168ab4d4844].
<li> Fix a crash that can occur following an out-of-memory condition
     in the built-in [instr()] function.
<li> In the [json1|JSON extension], fix the JSON validator so that it correctly rejects
     invalid backslash escapes within strings.
<p><b>Hashes:</b>
<li>SQLITE_SOURCE_ID: "2016-11-28 19:13:37 bbd85d235f7037c6a033a9690534391ffeacecc8"
<li>SHA1 for sqlite3.c: 06d77b42a3e70609f8d4bbb97caf53652f1082cb
} {patchagainst 1 patchagainst 2}

chng {2016-11-04 (3.15.1)} {
<li> Added [SQLITE_FCNTL_WIN32_GET_HANDLE] file control opcode.
<li> Fix the [VACUUM] command so that it spills excess content to disk rather
     than holding everything in memory, and possible causing an out-of-memory
     error for larger database files.  This fixes an issue introduced by
     version 3.15.0.
<li> Fix a case (present since 3.8.0 - [dateof:3.8.0]) 
     where OR-connected terms in the ON clause of a LEFT JOIN
     might cause incorrect results.  Ticket
     [https://www.sqlite.org/src/info/34a579141b2c5ac|34a579141b2c5ac].
<li> Fix a case where the use of [row values] in the ON clause of a LEFT JOIN
     might cause incorrect results.  Ticket
     [https://www.sqlite.org/src/info/fef4bb4bd9185ec8f|fef4bb4bd9185ec8f].
<p><b>Hashes:</b>
<li>SQLITE_SOURCE_ID: "2016-11-04 12:08:49 1136863c76576110e710dd5d69ab6bf347c65e36"
<li>SHA1 for sqlite3.c: e7c26a7be3e431dd06898f8d262c4ef240c07366
} {patchagainst 1}

chng {2016-10-14 (3.15.0)} {
<li> Added support for [row values].
<li> Allow [deterministic SQL functions] in the WHERE clause of a [partial index].
<li> Added the "[modeof|modeof=<i>filename</i>]" URI parameter on the unix VFS
<li> Added support for [SQLITE_DBCONFIG_MAINDBNAME].
<li> Added the ability to [VACUUM] an [ATTACH|ATTACH-ed] database.

Changes to pages/chronology.in.

24
25
26
27
28
29
30


31
32
33
34
35
36
37
#    ORDER BY mtime DESC;
#
# A small amount of manual editing and de-duplication followed.
#
# Manually edit the list for each subsequent release.
#      
foreach line [split {


707875582f|2016-10-14|Version 3.15.0
29dbef4b85|2016-09-12|Version 3.14.2
a12d805977|2016-08-11|Version 3.14.1
d5e9805702|2016-08-08|Version 3.14
fc49f556e4|2016-05-18|Version 3.13.0
92dc59fd5a|2016-04-18|Version 3.12.2
fe7d3b75fe|2016-04-08|Version 3.12.1







>
>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#    ORDER BY mtime DESC;
#
# A small amount of manual editing and de-duplication followed.
#
# Manually edit the list for each subsequent release.
#      
foreach line [split {
bbd85d235f|2016-11-28|Version 3.15.2
1136863c76|2016-11-04|Version 3.15.1
707875582f|2016-10-14|Version 3.15.0
29dbef4b85|2016-09-12|Version 3.14.2
a12d805977|2016-08-11|Version 3.14.1
d5e9805702|2016-08-08|Version 3.14
fc49f556e4|2016-05-18|Version 3.13.0
92dc59fd5a|2016-04-18|Version 3.12.2
fe7d3b75fe|2016-04-08|Version 3.12.1

Changes to pages/famous.in.

119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
  SQLite as its [affshort | application file format].
}
famous_user php http://www.php.net/ php.gif {
  The popular [http://www.php.net/ | PHP]
  programming language comes with both SQLite2 and SQLite3 built in.
}
famous_user python http://www.python.org/ python.gif {
  SQLite comes bundled with the 
  [http://docs.python.org/lib/module-sqlite3.html | Python]
  programming language since Python 2.5.
}
famous_user xojo http://www.xojo.com/ xojo.png {
  SQLite comes bundled with the [http://www.xojo.com/|Xojo]
  programming environment
  (formerly [http://www.realbasic.com/ | REALbasic])
}
famous_user rpm https://en.wikipedia.org/wiki/RPM_Package_Manager rpm_logo.png {







<
|
|







119
120
121
122
123
124
125

126
127
128
129
130
131
132
133
134
  SQLite as its [affshort | application file format].
}
famous_user php http://www.php.net/ php.gif {
  The popular [http://www.php.net/ | PHP]
  programming language comes with both SQLite2 and SQLite3 built in.
}
famous_user python http://www.python.org/ python.gif {

  All [http://docs.python.org/lib/module-sqlite3.html | Python]
  distributions since Python 2.5 include SQLite.
}
famous_user xojo http://www.xojo.com/ xojo.png {
  SQLite comes bundled with the [http://www.xojo.com/|Xojo]
  programming environment
  (formerly [http://www.realbasic.com/ | REALbasic])
}
famous_user rpm https://en.wikipedia.org/wiki/RPM_Package_Manager rpm_logo.png {

Changes to pages/index.in.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[full-featured SQL|full-featured], [public-domain],
SQL database engine.
SQLite is the [most used] database engine in the world.
<a class="button" href="about.html">More Info</a></p>

<hr class="xhr">
<span class="hdrfont">Latest Release:&nbsp;&nbsp;</span>
<a href="releaselog/3_15_0.html">Version 3.15.0</a> ([dateof:3.15.0]).
<a class="button" href="download.html">Download</a>
<a class="button" href="chronology.html">Prior Releases</a>

<div class="mobileonly">
<hr class="xhr">
<h3>Common Links</h3>
<tcl>common_links</tcl>







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[full-featured SQL|full-featured], [public-domain],
SQL database engine.
SQLite is the [most used] database engine in the world.
<a class="button" href="about.html">More Info</a></p>

<hr class="xhr">
<span class="hdrfont">Latest Release:&nbsp;&nbsp;</span>
<a href="releaselog/3_15_2.html">Version 3.15.2</a> ([dateof:3.15.2]).
<a class="button" href="download.html">Download</a>
<a class="button" href="chronology.html">Prior Releases</a>

<div class="mobileonly">
<hr class="xhr">
<h3>Common Links</h3>
<tcl>common_links</tcl>
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
  {name   Expensify
   url    https://www.expensify.com/
   image  expensify.png
   width  225
   height 32
   blurb  "We power the most exciting companies in the world using SQLite."
  }
  {name   Facebook
   url    https://www.facebook.com/
   image  fb.gif
   blurb  "Giving people the power to share and make the world more open and connected."
  }
}
set sep {  var sponsors = [}
set nspons 0
foreach spons $sponsors {
  hd_putsnl $sep\173
  set sep ","
  unset -nocomplain x







<
<
<
<
<







67
68
69
70
71
72
73





74
75
76
77
78
79
80
  {name   Expensify
   url    https://www.expensify.com/
   image  expensify.png
   width  225
   height 32
   blurb  "We power the most exciting companies in the world using SQLite."
  }





}
set sep {  var sponsors = [}
set nspons 0
foreach spons $sponsors {
  hd_putsnl $sep\173
  set sep ","
  unset -nocomplain x

Changes to pages/news.in.

14
15
16
17
18
19
20










21
22
23
24
25
26
27
  hd_puts "<h3>$date - $title</h3>"
  regsub -all "\n( *\n)+" $text "</p>\n\n<p>" txt
  regsub -all {[Tt]icket #(\d+)} $txt \
      {<a href="http://www.sqlite.org/cvstrac/tktview?tn=\1">\0</a>} txt
  hd_resolve "<blockquote>$txt</blockquote>"
  hd_puts "<hr width=\"50%\">"
}











newsitem {2016-10-14} {Release 3.15.0} {
SQLite [version 3.15.0] is a regularly scheduled maintenance release.
The key feature in this release is the added support for
[row values].  There are also other enhancements and
fixes for a number of obscure bugs.
<p>







>
>
>
>
>
>
>
>
>
>







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
  hd_puts "<h3>$date - $title</h3>"
  regsub -all "\n( *\n)+" $text "</p>\n\n<p>" txt
  regsub -all {[Tt]icket #(\d+)} $txt \
      {<a href="http://www.sqlite.org/cvstrac/tktview?tn=\1">\0</a>} txt
  hd_resolve "<blockquote>$txt</blockquote>"
  hd_puts "<hr width=\"50%\">"
}

newsitem {2016-11-28} {Release 3.15.2} {
SQLite [version 3.15.2] is a bug-fix patch release that fixes several minor
issues in the 3.15.0 and 3.15.1 releases.
}

newsitem {2016-11-04} {Release 3.15.1} {
SQLite [version 3.15.1] is a bug-fix patch release that fixes some minor
issues in the 3.15.0 release.
}

newsitem {2016-10-14} {Release 3.15.0} {
SQLite [version 3.15.0] is a regularly scheduled maintenance release.
The key feature in this release is the added support for
[row values].  There are also other enhancements and
fixes for a number of obscure bugs.
<p>

Changes to pages/rowvalue.in.

173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<codeblock>
SELECT * FROM info
 WHERE (year,month,day) BETWEEN (2015,9,12) AND (2016,9,12);
</codeblock>

<h2>Search against multi-column keys</h2>

<p>Suppose we want to know the order number, product number, and quanity
for any item in which the product number and quantity match the product
number and quantity of any item in order number 365:

<codeblock>
SELECT ordid, prodid, qty
  FROM item
 WHERE (prodid, qty) IN (SELECT prodid, qty







|







173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<codeblock>
SELECT * FROM info
 WHERE (year,month,day) BETWEEN (2015,9,12) AND (2016,9,12);
</codeblock>

<h2>Search against multi-column keys</h2>

<p>Suppose we want to know the order number, product number, and quantity
for any item in which the product number and quantity match the product
number and quantity of any item in order number 365:

<codeblock>
SELECT ordid, prodid, qty
  FROM item
 WHERE (prodid, qty) IN (SELECT prodid, qty