Documentation Source Text

Check-in [5eeec98501]
Login

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

Overview
Comment:Preparing for the 3.6.16 release.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5eeec98501cddbcecb1966085f15a219622530d3
User & Date: drh 2009-06-27 14:07:21.000
Context
2009-07-02
00:26
Add LLR to do with the advisory b-tree locks used in shared-cache mode. (check-in: a4e2a17a94 user: dan tags: trunk)
2009-06-27
14:07
Preparing for the 3.6.16 release. (check-in: 5eeec98501 user: drh tags: trunk)
2009-06-23
14:36
Preparations for the 3.6.16 release. (check-in: 1793436b49 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/changes.in.
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
      http://www.sqlite.org/cvstrac/timeline</a>.</p>
    }
    hd_close_aux
    hd_enable_main 1
  }
}

chng {2009 July 1 (3.6.16)} {
<li>Fix a bug (ticket #3929) that occasionally causes INSERT or UPDATE
    operations to fail on an indexed table that has a self-modifying trigger.
<li>Other minor bug fixes and performance optimizations.
}

chng {2009 June 15 (3.6.15)} {
<li>Refactor the internal representation of SQL expressions so that they







|







38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
      http://www.sqlite.org/cvstrac/timeline</a>.</p>
    }
    hd_close_aux
    hd_enable_main 1
  }
}

chng {2009 June 27 (3.6.16)} {
<li>Fix a bug (ticket #3929) that occasionally causes INSERT or UPDATE
    operations to fail on an indexed table that has a self-modifying trigger.
<li>Other minor bug fixes and performance optimizations.
}

chng {2009 June 15 (3.6.15)} {
<li>Refactor the internal representation of SQL expressions so that they
Changes to pages/news.in.
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  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 {2009-Jul-1} {Version 3.6.16} {
  SQLite [version 3.6.16] is another general maintenance relase containing
  performance and robustness enhancements.  A single notable bug was fixed
  (ticket #3929).  This bug cause cause INSERT or UPDATE statements to fail
  on indexed tables that have AFTER triggers that modify the same table and
  index.
}








|







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  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 {2009-Jun-27} {Version 3.6.16} {
  SQLite [version 3.6.16] is another general maintenance relase containing
  performance and robustness enhancements.  A single notable bug was fixed
  (ticket #3929).  This bug cause cause INSERT or UPDATE statements to fail
  on indexed tables that have AFTER triggers that modify the same table and
  index.
}

Changes to pages/testing.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
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
62
63
64
65
66
67
<title>How SQLite Is Tested</title>
<tcl>hd_keywords testing tested {test suite}</tcl>

<tcl>
# This document contains many size statistics about SQLite, statistics
# that change frequently.  We want the document to be up-to-date.  To
# facilitate that, all the size values are defined by variables here
# which are then used as needed through the document.
#
# NOTE:  Also update the version number in the text!!!
#

# sloc sqlite3.c
set stat(coreSLOC)    63239  ;# Non-comment lines of amalgamation code 
# sloc test*.c
set stat(tclcSLOC)    15070  ;# Non-comment lines of test C code
# ls test*.c tclsqlite.c | wc
set stat(tclcNfile)      31  ;# Number of files of TCL C testcode + tclsqlite.c
# ls -l test*.c tclsqlite.c | awk '{sum+=$5}END{print sum}'
set stat(tclcNByte)  711774  ;# Number of bytes of TCL C testcode + tclsqlite.c
# sloc *.test *.tcl
set stat(tclsSLOC)   216369  ;# Non-comment lines of TCL test script
# ls *.test *.tcl | wc
set stat(tclsNFile)     488  ;# Number of files of TCL test script
# ls -l *.test *.tcl | awk '{sum+=$5}END{print sum}'
set stat(tclsNByte) 8076312  ;# Number of bytes of TCL test script
# grep do_test *.test | wc
set stat(tclNTest)    24149  ;# Number of test cases in the TCL test suite
set stat(tclNEval)  1752856  ;# Number of test case evaluations
set stat(nSqlFuzz)   108656  ;# Number of SQL fuzz tests
set stat(vqNEval)     41657  ;# Number of test evaluations for veryquick.test
set stat(vqStmtCov)   97.07  ;# veryquick statement coverage
set stat(vqBrCov)     90.43  ;# veryquick branch coverage
set stat(allStmtCov)  99.41  ;# all.test statement coverage
set stat(allBrCov)    95.56  ;# all.test condition/decision coverage
# tclsh mkth3.tcl cfg/*.cfg */*.test >th3.c; sloc th3.c
set stat(th3SLOC)    169736  ;# Non-comment lines in full th3.c
# ls -l th3.c
set stat(th3NByte) 10745765  ;# Number of bytes in full th3.c
# grep th3testBegin */*.test
# grep th3oomBegin */*.test
# grep th3ioerrBegin */*.test
# grep '^--testcase' */*.test
set stat(th3NTest)     8345  ;# Number of test cases
# from output of a full test run.
set stat(th3NEval)  3934553  ;# Number of test case evaluations
set stat(th3StmtCov)  94.70  ;# TH3 statement coverage
set stat(th3BrCov)    87.86  ;# TH3 branch coverage
# wc `fossil ls | awk '/\.test$/{print $2}'`
set stat(sltsSLOC)  44858977 ;# Non-comment lines of SLT test script
# ls -l `fossil ls | awk '/\.test$/{print $2}'` | awk '{sum+=$5}END{print sum}'
set stat(sltsNByte) 1116748159 ;# Bytes of SLT test script
# fossil ls | awk '/.test$/{print $2}' | wc
set stat(sltsNFile)        610 ;# Files of SLT test script
# sloc md5.c slt_*.c sqllogictest.c
set stat(sltcSLOC)        1307 ;# Non-comment lines of SLT C code
# grep '^query' `fossil ls | awk '/\.test$/{print $2}'` | wc
set stat(sltNTest)     7195024 ;# Number of test cases in SLT
# grep 'assert(' sqlite3.c | wc
set stat(nAssert)         2567 ;# Number of assert statements

set stat(totalSLOC) [expr {$stat(tclcSLOC)+$stat(tclsSLOC)+
                           $stat(th3SLOC)+$stat(sltcSLOC)+$stat(sltsSLOC)}]

proc GB {expr} {
  set n [uplevel #0 expr $expr]
  hd_puts [format %.2f [expr {$n/(1000.0*1000.0*1000.0)}]]













|

|



|

|

|

|

|
|

|
|
|
|
|

|

|




|


|
|











|







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
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
62
63
64
65
66
67
<title>How SQLite Is Tested</title>
<tcl>hd_keywords testing tested {test suite}</tcl>

<tcl>
# This document contains many size statistics about SQLite, statistics
# that change frequently.  We want the document to be up-to-date.  To
# facilitate that, all the size values are defined by variables here
# which are then used as needed through the document.
#
# NOTE:  Also update the version number in the text!!!
#

# sloc sqlite3.c
set stat(coreSLOC)    63933  ;# Non-comment lines of amalgamation code 
# sloc test*.c
set stat(tclcSLOC)    17265  ;# Non-comment lines of test C code
# ls test*.c tclsqlite.c | wc
set stat(tclcNfile)      31  ;# Number of files of TCL C testcode + tclsqlite.c
# ls -l test*.c tclsqlite.c | awk '{sum+=$5}END{print sum}'
set stat(tclcNByte)  711297  ;# Number of bytes of TCL C testcode + tclsqlite.c
# sloc *.test *.tcl
set stat(tclsSLOC)   188897  ;# Non-comment lines of TCL test script
# ls *.test *.tcl | wc
set stat(tclsNFile)     495  ;# Number of files of TCL test script
# ls -l *.test *.tcl | awk '{sum+=$5}END{print sum}'
set stat(tclsNByte) 8095808  ;# Number of bytes of TCL test script
# grep do_test *.test | wc
set stat(tclNTest)    24228  ;# Number of test cases in the TCL test suite
set stat(tclNEval)  2225439  ;# Number of test case evaluations
set stat(nSqlFuzz)   108656  ;# Number of SQL fuzz tests
set stat(vqNEval)     41724  ;# Number of test evaluations for veryquick.test
set stat(vqStmtCov)   96.96  ;# veryquick statement coverage
set stat(vqBrCov)     91.67  ;# veryquick branch coverage
set stat(allStmtCov)  99.36  ;# all.test statement coverage
set stat(allBrCov)    96.84  ;# all.test condition/decision coverage
# tclsh mkth3.tcl cfg/*.cfg */*.test >th3.c; sloc th3.c
set stat(th3SLOC)    319487  ;# Non-comment lines in full th3.c
# ls -l th3.c
set stat(th3NByte) 22224617  ;# Number of bytes in full th3.c
# grep th3testBegin */*.test
# grep th3oomBegin */*.test
# grep th3ioerrBegin */*.test
# grep '^--testcase' */*.test
set stat(th3NTest)    10991  ;# Number of test cases
# from output of a full test run.
set stat(th3NEval)  3934553  ;# Number of test case evaluations
set stat(th3StmtCov)  98.58  ;# TH3 statement coverage
set stat(th3BrCov)    96.26  ;# TH3 branch coverage
# wc `fossil ls | awk '/\.test$/{print $2}'`
set stat(sltsSLOC)  44858977 ;# Non-comment lines of SLT test script
# ls -l `fossil ls | awk '/\.test$/{print $2}'` | awk '{sum+=$5}END{print sum}'
set stat(sltsNByte) 1116748159 ;# Bytes of SLT test script
# fossil ls | awk '/.test$/{print $2}' | wc
set stat(sltsNFile)        610 ;# Files of SLT test script
# sloc md5.c slt_*.c sqllogictest.c
set stat(sltcSLOC)        1307 ;# Non-comment lines of SLT C code
# grep '^query' `fossil ls | awk '/\.test$/{print $2}'` | wc
set stat(sltNTest)     7195024 ;# Number of test cases in SLT
# grep 'assert(' sqlite3.c | wc
set stat(nAssert)         2717 ;# Number of assert statements

set stat(totalSLOC) [expr {$stat(tclcSLOC)+$stat(tclsSLOC)+
                           $stat(th3SLOC)+$stat(sltcSLOC)+$stat(sltsSLOC)}]

proc GB {expr} {
  set n [uplevel #0 expr $expr]
  hd_puts [format %.2f [expr {$n/(1000.0*1000.0*1000.0)}]]
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<h1 align="center">How SQLite Is Tested</h1>

<h2>1.0 Introduction</h2>

<p>The reliability and robustness of SQLite is achieved in part
by thorough and careful testing.</p>

<p>As of [version 3.6.14] (all statistics in the report are against that
release of SQLite),
the SQLite library consists of approximately
<tcl>KB {$stat(coreSLOC)}</tcl> KSLOC of C code.
(KSLOC means thousands of "Source Lines Of Code" or, in other words,
lines of code excluding blank lines and comments.)
By comparison, the project has
<tcl>







|







94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<h1 align="center">How SQLite Is Tested</h1>

<h2>1.0 Introduction</h2>

<p>The reliability and robustness of SQLite is achieved in part
by thorough and careful testing.</p>

<p>As of [version 3.6.16] (all statistics in the report are against that
release of SQLite),
the SQLite library consists of approximately
<tcl>KB {$stat(coreSLOC)}</tcl> KSLOC of C code.
(KSLOC means thousands of "Source Lines Of Code" or, in other words,
lines of code excluding blank lines and comments.)
By comparison, the project has
<tcl>
372
373
374
375
376
377
378
379
380


381
382
383
384
385
386


387
388
389
390
391
392
393
utility is used to measure the "test coverage" of the SQLite test suite.
SQLite strives for but does not yet obtain 100% test coverage.  A major
goal of the SQLite project is to obtain 100% branch coverage
during 2009.</P.

<p>Test coverage can be measured in several ways.  "Statement coverage"
measures (as a percentage of the whole) how many lines of code are
exercised by the test cases. The TCL test suite obtains
<tcl>hd_puts $stat(allStmtCov)</tcl>% statement coverage on the SQLite


core.  (The SQLite core, in this case, excludes the operating-system
dependent [sqlite3_vfs | VFS] backends.)
"Branch" coverage measures (again, as a percentage of the
whole) how many machine-code branch instructions are taken at least
once in both directions.  The TCL test suite obtains
<tcl>hd_puts $stat(allBrCov)</tcl>% branch coverage.</p>



<p>To illustrate the difference between statement coverage and
branch coverage, consider the following hypothetical
line of C code:</p>

<blockquote><pre>
if( a>b && c!=25 ){ d++; }







|
|
>
>
|



|
|
>
>







372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
utility is used to measure the "test coverage" of the SQLite test suite.
SQLite strives for but does not yet obtain 100% test coverage.  A major
goal of the SQLite project is to obtain 100% branch coverage
during 2009.</P.

<p>Test coverage can be measured in several ways.  "Statement coverage"
measures (as a percentage of the whole) how many lines of code are
exercised by the test cases. Statement coverage for the SQLite core
is <tcl>hd_puts $stat(allStmtCov)</tcl>% for the full TCL test suite,
<tcl>hd_puts $stat(vqStmtCov)</tcl>% for the "veryquick.test" abbreviated
TCL test suite and <tcl>hd_puts $stat(th3StmtCov)</tcl>% for the TH3
test suite. (The SQLite core, in this case, excludes the operating-system
dependent [sqlite3_vfs | VFS] backends.)
"Branch" coverage measures (again, as a percentage of the
whole) how many machine-code branch instructions are taken at least
once in both directions.  Branch coverage
is <tcl>hd_puts $stat(allBrCov)</tcl>% for the full TCL test suite,
<tcl>hd_puts $stat(vqBrCov)</tcl>% for the abbreviated TCL test suite, and
<tcl>hd_puts $stat(th3BrCov)</tcl>% for the TH3 test harness.</p>

<p>To illustrate the difference between statement coverage and
branch coverage, consider the following hypothetical
line of C code:</p>

<blockquote><pre>
if( a>b && c!=25 ){ d++; }