Documentation Source Text

Check-in [a3888fbe0e]
Login

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

Overview
Comment:Merge trunk changes into this branch.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | experimental
Files: files | file ages | folders
SHA1: a3888fbe0ed117e3ca027fd1cb623f0c3c3634b2
User & Date: dan 2016-08-25 20:47:20.369
Context
2016-08-26
09:24
Add show/hide links for the "Table Of Contents" added to some documents. Use a cookie to make table of contents visibility a site-wide persistent setting. (check-in: ddd31d0018 user: dan tags: experimental)
2016-08-25
20:47
Merge trunk changes into this branch. (check-in: a3888fbe0e user: dan tags: experimental)
19:50
Update documentation for the sqldiff tool to include the --vtab option. (check-in: 0e6ed0fa48 user: dan tags: trunk)
17:29
Change the way sub-sections are selected by the search script. (check-in: c7628dcb37 user: dan tags: experimental)
Changes
Unified Diff Ignore Whitespace Patch
Changes to misc/althttpd.c.
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
**      privileges are dropped prior to reading any input (but after entering
**      the chroot jail, of course).  If root privileges cannot be dropped
**      (for example because the --user command-line option was omitted or
**      because the user specified by the --user option does not exist), 
**      then the process aborts with an error prior to reading any input.
**
** (3)  The length of an HTTP request is limited to MAX_CONTENT_LENGTH bytes
**      (default: 20 million).  Any HTTP request longer than this fails
**      with an error.
**
** (4)  There are hard-coded time-outs on each HTTP request.  If this process
**      waits longer than the timeout for the complete request, or for CGI
**      to finish running, then this process aborts.  (The timeout feature
**      can be disabled using the --debug command-line option.)
**







|







106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
**      privileges are dropped prior to reading any input (but after entering
**      the chroot jail, of course).  If root privileges cannot be dropped
**      (for example because the --user command-line option was omitted or
**      because the user specified by the --user option does not exist), 
**      then the process aborts with an error prior to reading any input.
**
** (3)  The length of an HTTP request is limited to MAX_CONTENT_LENGTH bytes
**      (default: 250 million).  Any HTTP request longer than this fails
**      with an error.
**
** (4)  There are hard-coded time-outs on each HTTP request.  If this process
**      waits longer than the timeout for the complete request, or for CGI
**      to finish running, then this process aborts.  (The timeout feature
**      can be disabled using the --debug command-line option.)
**
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#endif
#include <assert.h>

/*
** Configure the server by setting the following macros and recompiling.
*/
#ifndef DEFAULT_PORT
#define DEFAULT_PORT "80"
#endif
#ifndef MAX_CONTENT_LENGTH
#define MAX_CONTENT_LENGTH 20000000
#endif

/*
** We record most of the state information as global variables.  This
** saves having to pass information to subroutines as parameters, and
** makes the executable smaller...
*/







|


|







181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#endif
#include <assert.h>

/*
** Configure the server by setting the following macros and recompiling.
*/
#ifndef DEFAULT_PORT
#define DEFAULT_PORT "80"             /* Default TCP port for HTTP */
#endif
#ifndef MAX_CONTENT_LENGTH
#define MAX_CONTENT_LENGTH 250000000  /* Max length of HTTP request content */
#endif

/*
** We record most of the state information as global variables.  This
** saves having to pass information to subroutines as parameters, and
** makes the executable smaller...
*/
Changes to pages/about.in.
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
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.
But unlike some similar projects (especially commercial competitors)
SQLite is open and honest about all bugs and provides
<a href="http://www.sqlite.org/src/rptview?rn=2">bugs lists</a> and
minute-by-minute <a href="http://www.sqlite.org/src/timeline">
chronologies</a> of bug reports and code changes.</p>

<p>The SQLite code base is supported by an
<a href="crew.html">international team</a> of developers who work on
SQLite full-time.
The developers continue to expand the capabilities of SQLite
and enhance its reliability and performance while maintaining
backwards compatibility with the 
<a href="c3ref/intro.html">published interface spec</a>,
<a href="lang.html">SQL syntax</a>, and database [file format].
The source code is absolutely free to anybody who wants it,
but [professional support] is also available.</p>

<p>The SQLite project was started on 
[https://www.sqlite.org/src/timeline?c=2000-05-29+14:26:00|2000-05-09].
The future is always hard to prodict, but the intent of the developers
is to support SQLite through the year 2050.  Design decisions are made
with that objective in mind.</p>

<p>We the developers hope that you find SQLite useful and we
charge you to use it well: to make good and beautiful products that
are fast, reliable, and simple to use.  Seek forgiveness for yourself
as you forgive others.  And just as you have received SQLite for free,
so also freely give, paying the debt forward.</p>







|

|














|




|



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
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.
But unlike some similar projects (especially commercial competitors)
SQLite is open and honest about all bugs and provides
<a href="http://www.sqlite.org/src/rptview?rn=1">bugs lists</a> and
minute-by-minute <a href="http://www.sqlite.org/src/timeline">
chronologies</a> of code changes.</p>

<p>The SQLite code base is supported by an
<a href="crew.html">international team</a> of developers who work on
SQLite full-time.
The developers continue to expand the capabilities of SQLite
and enhance its reliability and performance while maintaining
backwards compatibility with the 
<a href="c3ref/intro.html">published interface spec</a>,
<a href="lang.html">SQL syntax</a>, and database [file format].
The source code is absolutely free to anybody who wants it,
but [professional support] is also available.</p>

<p>The SQLite project was started on 
[https://www.sqlite.org/src/timeline?c=2000-05-29+14:26:00|2000-05-09].
The future is always hard to predict, but the intent of the developers
is to support SQLite through the year 2050.  Design decisions are made
with that objective in mind.</p>

<p>We the developers hope that you find SQLite useful and we
entreat you to use it well: to make good and beautiful products that
are fast, reliable, and simple to use.  Seek forgiveness for yourself
as you forgive others.  And just as you have received SQLite for free,
so also freely give, paying the debt forward.</p>
Changes to pages/download.in.
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
}

Heading {Precompiled Binaries for Windows} win32

set start $nDownload

Product YEAR/sqlite-dll-win32-x86-VVV.zip {
  32-bit DLL (x86) for SQLite verison VERSION.
}

Product YEAR/sqlite-dll-win64-x64-VVV.zip {
  64-bit DLL (x64) for SQLite version VERSION.
}

Product YEAR/sqlite-tools-win32-x86-VVV.zip {







|







246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
}

Heading {Precompiled Binaries for Windows} win32

set start $nDownload

Product YEAR/sqlite-dll-win32-x86-VVV.zip {
  32-bit DLL (x86) for SQLite version VERSION.
}

Product YEAR/sqlite-dll-win64-x64-VVV.zip {
  64-bit DLL (x64) for SQLite version VERSION.
}

Product YEAR/sqlite-tools-win32-x86-VVV.zip {
Changes to pages/sqldiff.in.
1
2
3


4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<title>sqldiff.exe: Database Difference Utility</title>
<tcl>hd_keywords sqldiff sqldiff.exe</tcl>
<h2>The sqldiff.exe Utility Program</h2>



<p>
The <tt>sqldiff.exe</tt> binary is a command-line utility program that
displays the differences between SQLite databases.  Example
usage:

<blockquote><pre>
sqldiff &#91;options&#93; database1.sqlite database2.sqlite
</pre></blockquote>

<p>
The usual output is SQL statements that will transform
database1.sqlite (the "source" database) into database2.sqlite
(the "destination" database).  This behavior can be
altered using command-line switches:

<dl>
<dt><b>--changeset FILE</b></dt>
<dd><p>Do not write changes to standard output.  Instead, write a (binary)


|
>
>






|

|


|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<title>sqldiff.exe: Database Difference Utility</title>
<tcl>hd_keywords sqldiff sqldiff.exe</tcl>

<table_of_contents>
<h1>Usage</h1>

<p>
The <tt>sqldiff.exe</tt> binary is a command-line utility program that
displays the differences between SQLite databases.  Example
usage:

<codeblock>
sqldiff &#91;options&#93; database1.sqlite database2.sqlite
</codeblock>

<p>
The usual output is an SQL script that will transform
database1.sqlite (the "source" database) into database2.sqlite
(the "destination" database).  This behavior can be
altered using command-line switches:

<dl>
<dt><b>--changeset FILE</b></dt>
<dd><p>Do not write changes to standard output.  Instead, write a (binary)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83

















84
<dd><p>Show how many rows have changed on each table, but do not show
       the actual chagnes</dd>
<dt><b>--table TABLE</b></dt>
<dd><p>Show only the differences in content for TABLE, not for the
       entire database</p></dd>
<dt><b>--transaction</b></dt>
<dd><p>Wrap SQL output in a single large transaction</p></dd>




</dl>

<h3>How It Works</h3>

<p>The sqldiff.exe utility works by finding rows in the source and
destination that are logical "pairs".  The default behavior is to
treat two rows as pairs if they are in tables with the same name
and they have the same [rowid], or in the case of a [WITHOUT ROWID]
table if they have the same [PRIMARY KEY].  Any differences in the
content of paired rows are output as UPDATEs.  Rows in the source
database that could not be paired are output as DELETEs.  Rows in
the destination database that could not be paired are output as
INSERTs.

<p>The --primarykey flag changes the pairing algorithm slightly so
that the schema-declared [PRIMARY KEY] is always used for pairing,
even on tables that have a [rowid].  This is often a better choice
for finding differences, however it can lead to missed differences in
the case of rows that have one or more PRIMARY KEY columns set to
NULL.</p>

<h3>Limitations</h3>

<ol>
<li>
<p>The sqldiff.exe utility is unable to compute differences for
rowid tables for which the rowid is inaccessible.  An example of
a table with an inaccessible rowid is:

<blockquote><pre>
CREATE TABLE inaccessible_rowid(
   "rowid" TEXT,
   "oid" TEXT,
   "_rowid_" TEXT
);
</pre></blockquote>

<li><p>
The sqldiff.exe utility does not (currently) display differences in
[CREATE TRIGGER|TRIGGERs], [CREATE VIEW|VIEWs], or [virtual tables].

















</ol>







>
>
>
>


|


















|







|





|



|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<dd><p>Show how many rows have changed on each table, but do not show
       the actual chagnes</dd>
<dt><b>--table TABLE</b></dt>
<dd><p>Show only the differences in content for TABLE, not for the
       entire database</p></dd>
<dt><b>--transaction</b></dt>
<dd><p>Wrap SQL output in a single large transaction</p></dd>
<dt><b>--vtab</b></dt>
<dd><p>Add support for handling [FTS3], [FTS5] and [rtree] virtual tables. 
       <a href=#vtab>See below</a> for details. 
</p></dd>
</dl>

<h1>How It Works</h1>

<p>The sqldiff.exe utility works by finding rows in the source and
destination that are logical "pairs".  The default behavior is to
treat two rows as pairs if they are in tables with the same name
and they have the same [rowid], or in the case of a [WITHOUT ROWID]
table if they have the same [PRIMARY KEY].  Any differences in the
content of paired rows are output as UPDATEs.  Rows in the source
database that could not be paired are output as DELETEs.  Rows in
the destination database that could not be paired are output as
INSERTs.

<p>The --primarykey flag changes the pairing algorithm slightly so
that the schema-declared [PRIMARY KEY] is always used for pairing,
even on tables that have a [rowid].  This is often a better choice
for finding differences, however it can lead to missed differences in
the case of rows that have one or more PRIMARY KEY columns set to
NULL.</p>

<h1>Limitations</h1>

<ol>
<li>
<p>The sqldiff.exe utility is unable to compute differences for
rowid tables for which the rowid is inaccessible.  An example of
a table with an inaccessible rowid is:

<codeblock>
CREATE TABLE inaccessible_rowid(
   "rowid" TEXT,
   "oid" TEXT,
   "_rowid_" TEXT
);
</codeblock>

<li><p>
The sqldiff.exe utility does not (currently) display differences in
[CREATE TRIGGER|TRIGGERs] or [CREATE VIEW|VIEWs].

<li><p id=vtab>
By default, differences in the schema or content of virtual tables are
not reported on. 

<p>However, if a [virtual table] implementation creates real tables (sometimes
refered to as "shadow" tables) within the database to store its data in, then
sqldiff.exe does calculate the difference between these. This can have
surprising effects if the resulting SQL script is then run on a database that
is not <i>exactly</i> the same as the source database. For several of SQLite's
bundled virtual tables (FTS3, FTS5, rtree and others), the surprising effects
may include corruption of the virtual table content.

<p> If the --vtab option is passed to sqldiff.exe, then it ignores all 
underlying shadow tables belonging to an FTS3, FTS5 or rtree virtual table
and instead includes the virtual table differences directly.

</ol>