Documentation Source Text

Check-in [9cdc512cb2]
Login

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

Overview
Comment:Documentation updates in preparation for the 3.5.5 release.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9cdc512cb2246be646b0fd86bd40ca8a260078be
User & Date: drh 2008-01-31 17:20:51
Context
2008-01-31
18:24
Add the amalgamation+configure to the download page. On the download page, emphasis that the amalgamation is the perferred source code format. check-in: 99d3e5e752 user: drh tags: trunk
17:20
Documentation updates in preparation for the 3.5.5 release. check-in: 9cdc512cb2 user: drh tags: trunk
2008-01-30
17:13
Remove unused temporary files sqlite3.h and sqlite.h.in. The header is now read out of the SQLite sources. Added a requirements.html document generator. Updates to capi3ref. check-in: be47662767 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/about.in.

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
you give it.  Nevertheless, performance is usually quite good even
in low-memory environments.</p>

<p>SQLite has a reputation for being very reliable.
Over two-thirds of the source code is devoted purely to testing and
verification.  An automated test suite runs hundreds of thousands of
tests involving millions of individual SQL statements and achieves
over 98% test coverage.  SQLite responds gracefully to memory
allocation failures and disk I/O errors.  Transactions are
<a href="http://en.wikipedia.org/wiki/ACID">ACID</a>
even if interrupted by system crashes or power failures.  
All of this is verified by
the automated tests using special test harnesses which simulate 
system failures.
Of course, even with all this testing, there are still bugs.







|







60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
you give it.  Nevertheless, performance is usually quite good even
in low-memory environments.</p>

<p>SQLite has a reputation for being very reliable.
Over two-thirds of the source code is devoted purely to testing and
verification.  An automated test suite runs hundreds of thousands of
tests involving millions of individual SQL statements and achieves
over 99% statement coverage.  SQLite responds gracefully to memory
allocation failures and disk I/O errors.  Transactions are
<a href="http://en.wikipedia.org/wiki/ACID">ACID</a>
even if interrupted by system crashes or power failures.  
All of this is verified by
the automated tests using special test harnesses which simulate 
system failures.
Of course, even with all this testing, there are still bugs.

Changes to pages/amalgamation.in.

1
2
3
4
5
6

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<title>The SQLite Amalgamation</title>

<h2>The SQLite Amalgamation</h2>

<p>The core SQLite library consists of about 73 files of C code
(as of version 3.5.2). 

67 of these are "source" files in the sense that they are stored 
in the configuration management system and are maintained directly. 
The other 6 core C files are generated automatically during the 
compilation process.  Of the 73 code files, 57 are C code and 
16 are C header files.</p>

<p>The standard makefiles for SQLite have a target for building
an object we call the "amalgamation".  
The amalgamation is a single C code file, named "sqlite3.c",
that contains all C code 
for the core SQLite library. 
This file contains about 72K lines of code 
(45K if you omit blank lines and comments) and is over 2.3MiB 
in size.</p>

<p>The amalgamation contains everything you need to integrate SQLite 
into a larger project.  Just copy the amalgamation into your source 
directory and compile it together with your other source files. 
You may also want to make use of the "sqlite3.h" header file that 
defines the programming API for SQLite. 




|
|
>
|

|
|
|





|
|
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<title>The SQLite Amalgamation</title>

<h2>The SQLite Amalgamation</h2>

<p>The core SQLite library consists of about 74 files of C code
(as of version 3.5.4) in the core library and 9 additional files
in the FTS3 extension.
Most of these are "source" files in the sense that they are stored 
in the configuration management system and are maintained directly. 
But 6 of the core C files are generated automatically during the 
compilation process.  Of the 83 code files, 64 are C code and 
19 are C header files.</p>

<p>The standard makefiles for SQLite have a target for building
an object we call the "amalgamation".  
The amalgamation is a single C code file, named "sqlite3.c",
that contains all C code 
for the core SQLite library and the FTS3 extension.
This file contains about 73K lines of code 
(51K if you omit blank lines and comments) and is nearly 2.7MiB 
in size.</p>

<p>The amalgamation contains everything you need to integrate SQLite 
into a larger project.  Just copy the amalgamation into your source 
directory and compile it together with your other source files. 
You may also want to make use of the "sqlite3.h" header file that 
defines the programming API for SQLite. 

Changes to pages/capi3ref.in.

11
12
13
14
15
16
17

18
19
20
21
22
23
24
...
254
255
256
257
258
259
260

261

262
263
264
265
266
267
268
...
281
282
283
284
285
286
287

288

289
290
291
292
293
294
295
...
310
311
312
313
314
315
316

317

318
319
320
321
322
323
324
set phase 0        ;# Phase used by the parser 
set content {}     ;# List of records, one record per definition
set dcnt 0         ;# Number of individual declarations
set lineno 0       ;# input file line number
set intab 0        ;# In a covenents or limitations table
set inrow 0        ;# In a row of a table
set rowbody {}     ;# Content of a row


# End a table row or the complete table.
#
proc endrow {} {
  global inrow body rowbody
  if {$inrow} {
    append body [string trim $rowbody]</td></tr>\n
................................................................................
set objlist {}
foreach c $content {
  foreach {key title type keywords body code} $c break
  if {$type!="datatype"} continue
  set keywords [lsort $keywords]
  set k [lindex $keywords 0]
  foreach kw $keywords {

    lappend objlist [list $k $kw]

  }
}
hd_open_aux c3ref/objlist.html
hd_header {List Of SQLite Objects}
hd_enable_main 0
hd_puts {<a href="intro.html"><h2>SQLite C Interface</h2></a>}
hd_enable_main 1
................................................................................
set clist {}
foreach c $content {
  foreach {key title type keywords body code} $c break
  if {$type!="constant"} continue
  set keywords [lsort $keywords]
  set k [lindex $keywords 0]
  foreach kw $keywords {

    lappend clist [list $k $kw]

  }
}
hd_open_aux c3ref/constlist.html
hd_header {List Of SQLite Constants}
hd_enable_main 0
hd_puts {<a href="intro.html"><h2>SQLite C Interface</h2></a>}
hd_enable_main 1
................................................................................
set funclist {}
foreach c $content {
  foreach {key title type keywords body code} $c break
  if {$type!="function"} continue
  set keywords [lsort $keywords]
  set k [lindex $keywords 0]
  foreach kw $keywords {

    lappend funclist [list $k $kw]

  }
}
hd_open_aux c3ref/funclist.html
hd_header {List Of SQLite Functions}
hd_enable_main 0
hd_puts {<a href="intro.html"><h2>SQLite C Interface</h2></a>}
hd_enable_main 1







>







 







>
|
>







 







>
|
>







 







>
|
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
...
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
...
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
...
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
set phase 0        ;# Phase used by the parser 
set content {}     ;# List of records, one record per definition
set dcnt 0         ;# Number of individual declarations
set lineno 0       ;# input file line number
set intab 0        ;# In a covenents or limitations table
set inrow 0        ;# In a row of a table
set rowbody {}     ;# Content of a row
unset -nocomplain keyword

# End a table row or the complete table.
#
proc endrow {} {
  global inrow body rowbody
  if {$inrow} {
    append body [string trim $rowbody]</td></tr>\n
................................................................................
set objlist {}
foreach c $content {
  foreach {key title type keywords body code} $c break
  if {$type!="datatype"} continue
  set keywords [lsort $keywords]
  set k [lindex $keywords 0]
  foreach kw $keywords {
    if {[regexp {^sqlite} $kw]} {
      lappend objlist [list $k $kw]
    }
  }
}
hd_open_aux c3ref/objlist.html
hd_header {List Of SQLite Objects}
hd_enable_main 0
hd_puts {<a href="intro.html"><h2>SQLite C Interface</h2></a>}
hd_enable_main 1
................................................................................
set clist {}
foreach c $content {
  foreach {key title type keywords body code} $c break
  if {$type!="constant"} continue
  set keywords [lsort $keywords]
  set k [lindex $keywords 0]
  foreach kw $keywords {
    if {[regexp {^SQLITE_} $kw]} {
      lappend clist [list $k $kw]
    }
  }
}
hd_open_aux c3ref/constlist.html
hd_header {List Of SQLite Constants}
hd_enable_main 0
hd_puts {<a href="intro.html"><h2>SQLite C Interface</h2></a>}
hd_enable_main 1
................................................................................
set funclist {}
foreach c $content {
  foreach {key title type keywords body code} $c break
  if {$type!="function"} continue
  set keywords [lsort $keywords]
  set k [lindex $keywords 0]
  foreach kw $keywords {
    if {[regexp {^sqlite} $kw]} {
      lappend funclist [list $k $kw]
    }
  }
}
hd_open_aux c3ref/funclist.html
hd_header {List Of SQLite Functions}
hd_enable_main 0
hd_puts {<a href="intro.html"><h2>SQLite C Interface</h2></a>}
hd_enable_main 1

Changes to pages/changes.in.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<p>
This page provides a high-level summary of changes to SQLite.
For more detail, refer the the checkin logs generated by
CVS at
<a href="http://www.sqlite.org/cvstrac/timeline">
http://www.sqlite.org/cvstrac/timeline</a>.
</p>
<dl>

<tcl>
proc chng {date desc} {
  global DEST
  if {[regexp {\(([0-9.]+)\)} $date all vers]} {
    set label [string map {. _} $vers]
    hd_fragment version_$label
  }
  hd_puts "<dt><b>$date</b></dt>"
  hd_resolve "<dd><p><ul>$desc</ul></p>"
  hd_puts "</dd>"
  if {[regexp {\((3\.\d+\.\d+)[ a-z]*\)} $date all vers]} {
    set tag [string map {. _} $vers]
    file mkdir $DEST/releaselog
    set filename releaselog/$tag.html
    hd_open_aux $filename
    hd_header "SQLite Release $vers On $date"
    hd_keywords "Version $vers" "version $vers"







<








|
|
<







3
4
5
6
7
8
9

10
11
12
13
14
15
16
17
18
19

20
21
22
23
24
25
26
<p>
This page provides a high-level summary of changes to SQLite.
For more detail, refer the the checkin logs generated by
CVS at
<a href="http://www.sqlite.org/cvstrac/timeline">
http://www.sqlite.org/cvstrac/timeline</a>.
</p>


<tcl>
proc chng {date desc} {
  global DEST
  if {[regexp {\(([0-9.]+)\)} $date all vers]} {
    set label [string map {. _} $vers]
    hd_fragment version_$label
  }
  hd_puts "<h3>$date</h3>"
  hd_resolve "<p><ul>$desc</ul></p>"

  if {[regexp {\((3\.\d+\.\d+)[ a-z]*\)} $date all vers]} {
    set tag [string map {. _} $vers]
    file mkdir $DEST/releaselog
    set filename releaselog/$tag.html
    hd_open_aux $filename
    hd_header "SQLite Release $vers On $date"
    hd_keywords "Version $vers" "version $vers"

Changes to pages/features.in.

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<li><a href="speed.html">Faster</a> than popular client/server database
    engines for most common operations.</li>
<li>Simple, easy to use <a href="c3ref/intro.html">API</a>.</li>
<li>Written in ANSI-C.  <a href="tclsqlite.html">TCL bindings</a> included.
    Bindings for dozens of other languages 
    <a href="http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers">
    available separately.</a></li>
<li>Well-commented source code with over 98% 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: Linux (unix), MacOSX, OS/2, Win32 and WinCE are supported
    out of the box.  Easy to port to other systems.







|







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<li><a href="speed.html">Faster</a> than popular client/server database
    engines for most common operations.</li>
<li>Simple, easy to use <a href="c3ref/intro.html">API</a>.</li>
<li>Written in ANSI-C.  <a href="tclsqlite.html">TCL bindings</a> included.
    Bindings for dozens of other languages 
    <a href="http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers">
    available separately.</a></li>
<li>Well-commented source code with over 99% statement 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: Linux (unix), MacOSX, OS/2, Win32 and WinCE are supported
    out of the box.  Easy to port to other systems.

Changes to pages/index.in.

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

</td>
<td width="20"></td><td bgcolor="#80a796" width="1"></td><td width="20"></td>
<td valign="top">
<h3>Current Status</h3>

<p><ul>
<li><a href="releaselog/3_5_4.html">Version 3.5.4</a>
of SQLite is stable and is recommended for all users.</li>
</ul></p>

<h3>Common Links</h3>

<p><ul>
<li> <a href="features.html">Features</a> </li>







|







49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

</td>
<td width="20"></td><td bgcolor="#80a796" width="1"></td><td width="20"></td>
<td valign="top">
<h3>Current Status</h3>

<p><ul>
<li><a href="releaselog/3_5_5.html">Version 3.5.5</a>
of SQLite is stable and is recommended for all users.</li>
</ul></p>

<h3>Common Links</h3>

<p><ul>
<li> <a href="features.html">Features</a> </li>

Changes to pages/news.in.

9
10
11
12
13
14
15










16
17
18
19
20
21
22
  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 "<p>$txt</p>"
  hd_puts "<hr width=\"50%\">"
}











newsitem {2007-Dec-14} {Version 3.5.4} {
  Version 3.5.4 fixes an long-standing but obscure bug in UPDATE and
  DELETE which might cause database corruption.  (See ticket #2832.)
  Upgrading is recommended for all users.

  This release also brings the processing of ORDER BY statements into







>
>
>
>
>
>
>
>
>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
  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 "<p>$txt</p>"
  hd_puts "<hr width=\"50%\">"
}

newsitem {2008-Jan-31} {Version 3.5.5} {
  Version 3.5.5 changes over 8% of the core source code of SQLite in order
  to convert the internal virtual machine from a stack-based design into
  a register-based design.  This change will allow future optimizations
  and will avoid an entire class of stack overflow bugs that have caused
  problems in the past.  Even though this change is large, extensive testing
  has found zero errors in the new virtual machine and so we believe this
  to be a very stable release.
}

newsitem {2007-Dec-14} {Version 3.5.4} {
  Version 3.5.4 fixes an long-standing but obscure bug in UPDATE and
  DELETE which might cause database corruption.  (See ticket #2832.)
  Upgrading is recommended for all users.

  This release also brings the processing of ORDER BY statements into

Changes to wrap.tcl.

83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
      puts stderr "ERROR: unknown hyperlink target: $kw"
      puts -nonewline $hd(main) "<font color=\"red\">$content</font>"
    }
  }
  if {$hd(enable-aux)} {
    if {[regexp {^[Tt]icket #(\d+)$} $kw all tktid]} {
      set url http://www.sqlite.org/cvstrac/tktview?tn=$tktid
      puts -nonewline $hd(main) \
        "<a href=\"$url\">$content</a>"
    } elseif {[info exists glink($kw)]} {
      puts -nonewline $hd(aux) \
        "<a href=\"$hd(rootpath-aux)$glink($kw)\">$content</a>"
    } else {
      puts stderr "ERROR: unknown hyperlink target: $kw"
      puts -nonewline $hd(aux) "<font color=\"red\">$content</font>"







|







83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
      puts stderr "ERROR: unknown hyperlink target: $kw"
      puts -nonewline $hd(main) "<font color=\"red\">$content</font>"
    }
  }
  if {$hd(enable-aux)} {
    if {[regexp {^[Tt]icket #(\d+)$} $kw all tktid]} {
      set url http://www.sqlite.org/cvstrac/tktview?tn=$tktid
      puts -nonewline $hd(aux) \
        "<a href=\"$url\">$content</a>"
    } elseif {[info exists glink($kw)]} {
      puts -nonewline $hd(aux) \
        "<a href=\"$hd(rootpath-aux)$glink($kw)\">$content</a>"
    } else {
      puts stderr "ERROR: unknown hyperlink target: $kw"
      puts -nonewline $hd(aux) "<font color=\"red\">$content</font>"