Documentation Source Text

Changes On Branch branch-3.11
Login

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

Changes In Branch branch-3.11 Excluding Merge-Ins

This is equivalent to a diff from ab0a116d70 to 84f9b8afc2

2016-03-26
23:12
Update TH3 license information. (Leaf check-in: 84f9b8afc2 user: drh tags: branch-3.11)
22:53
Update TH3 license information. (check-in: 150f52f8da user: drh tags: trunk)
2016-03-21
20:02
Fix the description of the case folding performed by the unicode61 tokenizer in FTS3. (check-in: 37a01760c6 user: drh tags: branch-3.11)
2016-03-03
16:07
Changes for the 3.11.1 release. (check-in: 628be086c5 user: drh tags: branch-3.11)
2016-02-17
16:14
Fix the PRAGMA synchorous documentation. The default is always FULL even in WAL mode. (check-in: 3540d671bc user: drh tags: trunk)
04:59
Typo fix. (check-in: ab0a116d70 user: drh tags: trunk)
2016-02-15
18:26
Separate heading for hashes in the 3.11.0 change log. (check-in: b04e9be1a4 user: drh tags: trunk)

Changes to pages/changes.in.

15
16
17
18
19
20
21










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











chng {2016-02-15 (3.11.0)} {
<p><b>General improvements:</b>
<li>Enhanced [WAL mode] so that it works efficiently with transactions that are
    larger than the [cache_size].
<li>Added the [FTS5 detail option].
<li>Added the "EXTRA" option to [PRAGMA synchronous] that does a sync of the







>
>
>
>
>
>
>
>
>
>







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<tcl>
set nChng 0
proc chng {date desc {options {}}} {
  global nChng aChng
  set aChng($nChng) [list $date $desc $options]
  incr nChng
}

chng {2016-03-03 (3.11.1)} {
<li>Improvements to the Makefiles and build scripts used by VisualStudio.
<li>Fix an [FTS5] issue in which the 'optimize' command could cause index corruption.
<li>Fix a buffer overread that might occur if [FTS5] is used to query a corrupt
    database file.
<li>Increase the maximum "scope" value for the [spellfix1] extension from 6 to 30.
<li>SQLITE_SOURCE_ID: "2016-03-03 16:17:53 f047920ce16971e573bc6ec9a48b118c9de2b3a7"
<li>SHA1 for sqlite3.c: 3da832fd2af36eaedb05d61a8f4c2bb9f3d54265
} {patchagainst 1}

chng {2016-02-15 (3.11.0)} {
<p><b>General improvements:</b>
<li>Enhanced [WAL mode] so that it works efficiently with transactions that are
    larger than the [cache_size].
<li>Added the [FTS5 detail option].
<li>Added the "EXTRA" option to [PRAGMA synchronous] that does a sync of the

Changes to pages/fts3.in.

2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
  processing is required, for example to implement stemming or
  discard punctuation, this can be done by creating a tokenizer
  implementation that uses the ICU tokenizer as part of its implementation.

<tcl>hd_fragment unicode61 unicode61</tcl>
<p>
  The "unicode61" tokenizer is available beginning with SQLite [version 3.7.13].
  Unicode61 works very much like "simple" except that it does full unicode
  case folding according to rules in Unicode Version 6.1 and it recognizes
  unicode space and punctuation characters and uses those to separate tokens.
  The simple tokenizer only does case folding of ASCII characters and only
  recognizes ASCII space and punctuation characters as token separators.

<p>
  By default, "unicode61" also removes all diacritics from Latin script







|







2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
  processing is required, for example to implement stemming or
  discard punctuation, this can be done by creating a tokenizer
  implementation that uses the ICU tokenizer as part of its implementation.

<tcl>hd_fragment unicode61 unicode61</tcl>
<p>
  The "unicode61" tokenizer is available beginning with SQLite [version 3.7.13].
  Unicode61 works very much like "simple" except that it does simple unicode
  case folding according to rules in Unicode Version 6.1 and it recognizes
  unicode space and punctuation characters and uses those to separate tokens.
  The simple tokenizer only does case folding of ASCII characters and only
  recognizes ASCII space and punctuation characters as token separators.

<p>
  By default, "unicode61" also removes all diacritics from Latin script

Changes to pages/index.in.

106
107
108
109
110
111
112

113
114
115
116
117
118
119
120
121

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

<p><ul>

<li><a href="releaselog/3_11_0.html">Version 3.11.0</a>
of SQLite is recommended for all new development.
</li>
</ul></p>

<h3>Common Links</h3>

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







>
|
|







106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122

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

<p><ul>
<li>Either <a href="releaselog/3_11_1.html">version 3.11.1</a>
or <a href="releaselog/3_11_0.html">version 3.11.0</a>
is recommended for all new development.
</li>
</ul></p>

<h3>Common Links</h3>

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

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-02-15} {Release 3.11.0} {
<p>SQLite [version 3.11.0] is a regularly scheduled maintenance release.
}

newsitem {2016-01-20} {Release 3.10.2} {
<p>Yikes!  An optimization attempt gone bad resulted in a 







>
>
>
>
>
>
>







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
  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-03-03} {Release 3.11.1} {
<p>SQLite [version 3.11.1] is a patch release that fixes problems in the
   new [FTS5] extension and increases a default setting in the [spellfix1]
   extension, and implements enhancements to some of the Windows makefiles.
   The SQLite core is unchanged from 3.11.0. Upgrading is optional.
}

newsitem {2016-02-15} {Release 3.11.0} {
<p>SQLite [version 3.11.0] is a regularly scheduled maintenance release.
}

newsitem {2016-01-20} {Release 3.10.2} {
<p>Yikes!  An optimization attempt gone bad resulted in a 

Changes to pages/th3.in.

304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
subset of the tests currently implemented using TH3.  New test modules are
added on a regular basis.</p>

<h2>5.0 TH3 License</h2>

<p>SQLite itself is in the <a href="copyright.html">public domain</a> and
can be used for any purpose.  But TH3 is proprietary and requires a license.
Members of the [SQLite Consortium] get free and unlimited access to TH3.
Others can contact the SQLite developers for information on how to obtain
a license to access and use TH3.</p>

<p>Licensees of TH3 are given read access to the software configuration
management system used to manage TH3 and so can download the latest version
of TH3 (or any historical version) whenever they like.</p>

<p>Even though open-source users do not have direct access to TH3, all
users of SQLite benefit from TH3 indirectly since each version of SQLite is
validated running TH3 on multiple platforms (Linux, Windows, WinRT, Mac,
OpenBSD, Solaris Sparc) prior to release.  So anyone using an official release
of SQLite can deploy their application with the confidence of knowing that
it has been tested using TH3.  They simply cannot rerun those tests







<
<
<
|
<
<
<







304
305
306
307
308
309
310



311



312
313
314
315
316
317
318
subset of the tests currently implemented using TH3.  New test modules are
added on a regular basis.</p>

<h2>5.0 TH3 License</h2>

<p>SQLite itself is in the <a href="copyright.html">public domain</a> and
can be used for any purpose.  But TH3 is proprietary and requires a license.



</p>




<p>Even though open-source users do not have direct access to TH3, all
users of SQLite benefit from TH3 indirectly since each version of SQLite is
validated running TH3 on multiple platforms (Linux, Windows, WinRT, Mac,
OpenBSD, Solaris Sparc) prior to release.  So anyone using an official release
of SQLite can deploy their application with the confidence of knowing that
it has been tested using TH3.  They simply cannot rerun those tests

Changes to pages/wal.in.

416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
readers might block while the checkpoint is running.

<li><p>
<b>Very large write transactions.</b>
A checkpoint can only complete when no other transactions are running, 
which means the WAL file cannot be reset in the middle of a write
transaction.  So a large change to a large database
might result in a very large WAL file.  The WAL file will be checkpointed
once the write transaction completes (assuming there are no other readers
blocking it) but in the meantime, the file can grow very big.

<p>Note that sometimes the same database page can be written into
the WAL file multiple times within the same transaction, and hence the
WAL file can end up being many times larger than the original database.
This can happen when the [cache_size] is smaller then the number of
database pages changed during the transaction.
When changes are made to a page, those changes are normally held in
memory until the end of the transaction, at which point their are
written to the WAL file.  But if the cache fills up, some pages might
need to be spilled to the WAL file before the end of the transaction.
If those same pages change again, then they must be written
to the WAL file again.  For a very
large transaction and a small cache, it is possible for the same page
to spill many times and thus be written into the WAL file many times.

<p>Defenses against this failure mode include: (1) switching to a
rollback journal modes for large updates since pages are never
written into a rollback journal more than once, (2) making sure that
the [cache_size] is large enough to hold every page that will be changed
during the transaction,
(3) keeping the number of changed pages small by breaking
the transaction up into smaller chunks, and/or (4) dropping indexes before
a large insert and recreating them afterwards.
</ul>

<h2>Implementation Of Shared-Memory For The WAL-Index</h2>

<p>The [wal-index] is implemented using an ordinary file that is
mmapped for robustness.  Early (pre-release) implementations of WAL mode
stored the wal-index in volatile shared-memory, such as files created in







|



<
<
<
<
<
<
<
<
<
<
|
|
|
|
<
<
<
<
|
|
<
<







416
417
418
419
420
421
422
423
424
425
426










427
428
429
430




431
432


433
434
435
436
437
438
439
readers might block while the checkpoint is running.

<li><p>
<b>Very large write transactions.</b>
A checkpoint can only complete when no other transactions are running, 
which means the WAL file cannot be reset in the middle of a write
transaction.  So a large change to a large database
might result in a large WAL file.  The WAL file will be checkpointed
once the write transaction completes (assuming there are no other readers
blocking it) but in the meantime, the file can grow very big.











<p>As of SQLite version 3.11.0, the WAL file for a single transaction
should be proportional in size to the transaction itself.  Pages that
are changed by the transaction should only be written into the WAL file
once.  However, with older versions of SQLite, the same page might be




written into the WAL file multiple times if the transaction grows larger
than the page cache.


</ul>

<h2>Implementation Of Shared-Memory For The WAL-Index</h2>

<p>The [wal-index] is implemented using an ordinary file that is
mmapped for robustness.  Early (pre-release) implementations of WAL mode
stored the wal-index in volatile shared-memory, such as files created in