Documentation Source Text

Changes On Branch branch-3.21
Login

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

Changes In Branch branch-3.21 Excluding Merge-Ins

This is equivalent to a diff from 19e6014767 to 97e70fb787

2018-01-13
20:39
Fix typo in the how-to-corrupt document. (Cherrypick from trunk) (Leaf check-in: 97e70fb787 user: drh tags: branch-3.21)
20:37
Fix typo in the how-to-corrupt document. (check-in: 66c7f7dcd6 user: drh tags: trunk)
2017-11-23
21:43
Default value for the "s" query parameter in /search is now "d". (check-in: 6182e9ea42 user: drh tags: branch-3.21)
2017-11-02
14:29
Fix typos in the affcase1.html document. (check-in: 7546b88643 user: drh tags: branch-3.21)
2017-10-28
20:58
Preliminary changes for the 3.22.0 release. (check-in: b3e5268a9a user: drh tags: trunk)
2017-10-24
19:02
Fix the date and add hashes for the 3.21.0 release. (check-in: 19e6014767 user: drh tags: trunk, release, version-3.21.0)
18:26
Add news for the 3.21.0 release. (check-in: 83687a0810 user: drh tags: trunk)

Changes to pages/affcase1.in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<tcl>hd_keywords {What If OpenOffice Used SQLite} \
{OpenOffice case study}</tcl>
<title>What If OpenDocument Used SQLite?</title>

<h1 align="center">
What If OpenDocument Used SQLite?</h1>

<h2>Introduction</h2>

<p>Suppose the
[http://en.wikipedia.org/wiki/OpenDocument|OpenDocument] file format,
and specifically the "ODP" OpenDocument Presentation format, where
built around SQLite.  Benefits would include:
<ul>
<li>Smaller documents
<li>Faster File/Save times
<li>Faster startup times
<li>Less memory used
<li>Document versioning











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<tcl>hd_keywords {What If OpenOffice Used SQLite} \
{OpenOffice case study}</tcl>
<title>What If OpenDocument Used SQLite?</title>

<h1 align="center">
What If OpenDocument Used SQLite?</h1>

<h2>Introduction</h2>

<p>Suppose the
[http://en.wikipedia.org/wiki/OpenDocument|OpenDocument] file format,
and specifically the "ODP" OpenDocument Presentation format, were
built around SQLite.  Benefits would include:
<ul>
<li>Smaller documents
<li>Faster File/Save times
<li>Faster startup times
<li>Less memory used
<li>Document versioning
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
and constraints to enforce consistency of content even in the face of
programming errors.  Further enhancement ideas include:
<ul>
<li> Store an [automated undo/redo stack] in a database table so that
     Undo could go back into prior edit sessions.
<li> Add [FTS4|full text search] capabilities to the slide deck, or across
     multiple slide decks.
<li> Decompose the "settings.xml" file into an SQL table kind that
     is more easily viewed and edited by separate applications.
<li> Break out the "Presentor Notes" from each slide into a separate
     table, for easier access from third-party applications and/or scripts.
<li> Enhance the presentation concept beyond the simple linear sequence of
     slides to allow for side-tracks and excursions to be taken depending on
     how the audience is responding.
</ul>







|







463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
and constraints to enforce consistency of content even in the face of
programming errors.  Further enhancement ideas include:
<ul>
<li> Store an [automated undo/redo stack] in a database table so that
     Undo could go back into prior edit sessions.
<li> Add [FTS4|full text search] capabilities to the slide deck, or across
     multiple slide decks.
<li> Decompose the "settings.xml" file into an SQL table that
     is more easily viewed and edited by separate applications.
<li> Break out the "Presentor Notes" from each slide into a separate
     table, for easier access from third-party applications and/or scripts.
<li> Enhance the presentation concept beyond the simple linear sequence of
     slides to allow for side-tracks and excursions to be taken depending on
     how the audience is responding.
</ul>

Changes to pages/howtocorrupt.in.

409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
If protections are disabled, database corruption may occur.

<p>The following are examples of disabling the built-in protection
mechanisms of SQLite:

<ul>
<li><p>Setting [PRAGMA synchronous=OFF] can cause the database to
go corrupt if there is an operating-system crass or power failure,
though this setting is safe from damage due to application crashes.

<li><p>Changing the [PRAGMA schema_version] while other database
connections are open.

<li><p>Using [PRAGMA journal_mode=OFF] or [PRAGMA journal_mode=MEMORY]
and taking an application crash in the middle of a write transaction.







|







409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
If protections are disabled, database corruption may occur.

<p>The following are examples of disabling the built-in protection
mechanisms of SQLite:

<ul>
<li><p>Setting [PRAGMA synchronous=OFF] can cause the database to
go corrupt if there is an operating-system crash or power failure,
though this setting is safe from damage due to application crashes.

<li><p>Changing the [PRAGMA schema_version] while other database
connections are open.

<li><p>Using [PRAGMA journal_mode=OFF] or [PRAGMA journal_mode=MEMORY]
and taking an application crash in the middle of a write transaction.

Changes to pages/inmemorydb.in.

114
115
116
117
118
119
120
121

122
123
124
125
126
127
128
129
130
<p>A different temporary file is created each time, so that just like as
with the special ":memory:" string, two database connections to temporary
databases each have their own private database.  Temporary databases are
automatically deleted when the connection that created them closes.</p>

<p>Even though a disk file is allocated for each temporary database, in
practice the temporary database usually resides in the in-memory pager
cache and hence is very little difference between a pure in-memory database

created by ":memory:" and a temporary database created by an empty filename.
The sole difference is that a ":memory:" database must remain in memory
at all times whereas parts of a temporary database might be flushed to
disk if database becomes large or if SQLite comes under memory pressure.</p>

<p>The previous paragraphs describe the behavior of temporary databases
under the default SQLite configuration.  An application can use the
[temp_store pragma] and the [SQLITE_TEMP_STORE] compile-time parameter to
force temporary databases to behave as pure in-memory databases, if desired.







|
>

|







114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<p>A different temporary file is created each time, so that just like as
with the special ":memory:" string, two database connections to temporary
databases each have their own private database.  Temporary databases are
automatically deleted when the connection that created them closes.</p>

<p>Even though a disk file is allocated for each temporary database, in
practice the temporary database usually resides in the in-memory pager
cache and hence there is very little difference between a pure in-memory
database
created by ":memory:" and a temporary database created by an empty filename.
The only difference is that a ":memory:" database must remain in memory
at all times whereas parts of a temporary database might be flushed to
disk if database becomes large or if SQLite comes under memory pressure.</p>

<p>The previous paragraphs describe the behavior of temporary databases
under the default SQLite configuration.  An application can use the
[temp_store pragma] and the [SQLITE_TEMP_STORE] compile-time parameter to
force temporary databases to behave as pure in-memory databases, if desired.

Changes to pages/json1.in.

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  incr tabcnt
  hd_puts "<li value='$tabcnt'>\n"
  set fx [string trim $fx]
  set hlink "<a href='#$lnk'>"
  regsub -all {^json\(} $fx "${hlink}json</a>(" fx
  regsub -all {(json_[a-z_]+)} $fx "$hlink\\1</a>" fx
  regsub -all {(value[1-9]?|path|label[1-9]?)} $fx "<i>\\1</i>" fx
  regsub -all {\((json)} $fx "(<i>\\1</i>" fx
  hd_puts "$fx\n"
  # hd_puts "[string trim $desc]\n"
  hd_puts "</li>\n\n"
}
set tsctr 100

tabentry {json(json)} {







|







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  incr tabcnt
  hd_puts "<li value='$tabcnt'>\n"
  set fx [string trim $fx]
  set hlink "<a href='#$lnk'>"
  regsub -all {^json\(} $fx "${hlink}json</a>(" fx
  regsub -all {(json_[a-z_]+)} $fx "$hlink\\1</a>" fx
  regsub -all {(value[1-9]?|path|label[1-9]?)} $fx "<i>\\1</i>" fx
  regsub -all {(json[1-9]?|name)} $fx "<i>\\1</i>" fx
  hd_puts "$fx\n"
  # hd_puts "[string trim $desc]\n"
  hd_puts "</li>\n\n"
}
set tsctr 100

tabentry {json(json)} {

Changes to pages/prosupport.in.

240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
a suite of test cases for SQLite that provide 100% branch test coverage
(and 100% modified condition/decision coverage) for the core SQLite in
an as-deployed configuration using only published and documented interfaces.
TH3 is designed for use with embedded devices, and is compatible with
DO-178B.  Every release of the public-domain SQLite is tested using TH3,
and so all users benefit from the TH3 tests.  But the TH3 tests are not
themselves public.  Hardware or system manufactures who want to have
TH3 test run on their systems can negotiation a service agreement to have
the SQLite Developers run those tests.</p>

<h2>About The SQLite Team</h2>

<p>Paid support options and products are provided by
Hipp, Wyrick &amp; Company, Inc., (Hwaci), a 
<a href="http://en.wikipedia.org/wiki/Georgia_(U.S._state)">Georgia</a>







|







240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
a suite of test cases for SQLite that provide 100% branch test coverage
(and 100% modified condition/decision coverage) for the core SQLite in
an as-deployed configuration using only published and documented interfaces.
TH3 is designed for use with embedded devices, and is compatible with
DO-178B.  Every release of the public-domain SQLite is tested using TH3,
and so all users benefit from the TH3 tests.  But the TH3 tests are not
themselves public.  Hardware or system manufactures who want to have
TH3 test run on their systems can negotiate a service agreement to have
the SQLite Developers run those tests.</p>

<h2>About The SQLite Team</h2>

<p>Paid support options and products are provided by
Hipp, Wyrick &amp; Company, Inc., (Hwaci), a 
<a href="http://en.wikipedia.org/wiki/Georgia_(U.S._state)">Georgia</a>

Changes to pages/vfs.in.

189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
so that it can be used as a learning aid or as template for building
other VFSes or for porting SQLite to new operating systems.

<li><p>
[http://www.sqlite.org/src/doc/trunk/src/test_quota.c | test_quota.c] - 
This file implements a shim called "quota" that enforces cumulative
file size limits on a collection of database files.  An auxiliary
interface is used to define "quote groups".  A quota group is a
set of files (database files, journals, and temporary files) whose
names all match a [GLOB] pattern.  The sum of the sizes of all files
in each quota group is tracked, and if that sum exceeds a threshold
defined for the quota group, a callback function is invoked.  That
callback can either increase the threshold or cause the operation
that would have exceeded the quota to fail with an 
[SQLITE_FULL] error.  One of the uses of this shim is used to enforce 







|







189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
so that it can be used as a learning aid or as template for building
other VFSes or for porting SQLite to new operating systems.

<li><p>
[http://www.sqlite.org/src/doc/trunk/src/test_quota.c | test_quota.c] - 
This file implements a shim called "quota" that enforces cumulative
file size limits on a collection of database files.  An auxiliary
interface is used to define "quota groups".  A quota group is a
set of files (database files, journals, and temporary files) whose
names all match a [GLOB] pattern.  The sum of the sizes of all files
in each quota group is tracked, and if that sum exceeds a threshold
defined for the quota group, a callback function is invoked.  That
callback can either increase the threshold or cause the operation
that would have exceeded the quota to fail with an 
[SQLITE_FULL] error.  One of the uses of this shim is used to enforce 

Changes to search/search.tcl.

400
401
402
403
404
405
406

407
408
409
410
411
412
413
  }

  return $ret
}

proc main {} {
  global A

  cgi_parse_args

  # If "env=1" is specified, dump the environment variables instead
  # of running any search.
  if {[info exists ::A(env)]} { return [cgi_env_dump] }
  
  # If "admin=1" is specified, jump to the admin screen.







>







400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
  }

  return $ret
}

proc main {} {
  global A
  set A(s) d
  cgi_parse_args

  # If "env=1" is specified, dump the environment variables instead
  # of running any search.
  if {[info exists ::A(env)]} { return [cgi_env_dump] }
  
  # If "admin=1" is specified, jump to the admin screen.