/ Check-in [8c4d71a1]
Login

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

Overview
Comment:Update thread tests to clear the sqlite_open_file_count counter at the end. This counter is not threadsafe and can end up with an invalid value at the end of the thread tests. (CVS 6289)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8c4d71a169e529964d2d0cfba82bbad66a0bcd12
User & Date: drh 2009-02-12 17:06:41
Context
2009-02-12
17:07
Add additional cross-references from API documentation to other documents. Comment changes only; no changes to code. (CVS 6290) check-in: 97203a0a user: drh tags: trunk
17:06
Update thread tests to clear the sqlite_open_file_count counter at the end. This counter is not threadsafe and can end up with an invalid value at the end of the thread tests. (CVS 6289) check-in: 8c4d71a1 user: drh tags: trunk
17:01
Fix some edge cases with backing up databases that are exactly PENDING_BYTE bytes in size, or just slightly larger. (CVS 6288) check-in: 2fc450e8 user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/thread001.test.

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
...
143
144
145
146
147
148
149

150
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
#
# $Id: thread001.test,v 1.8 2009/02/04 11:57:46 danielk1977 Exp $

set testdir [file dirname $argv0]

source $testdir/tester.tcl
ifcapable !mutex {
  return
}
................................................................................
  } {1}
  do_test thread001.$tn.7 {
    execsql { PRAGMA integrity_check }
  } {ok}
}

sqlite3_enable_shared_cache $::enable_shared_cache

finish_test







|







 







>

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
...
143
144
145
146
147
148
149
150
151
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
#
# $Id: thread001.test,v 1.9 2009/02/12 17:06:41 drh Exp $

set testdir [file dirname $argv0]

source $testdir/tester.tcl
ifcapable !mutex {
  return
}
................................................................................
  } {1}
  do_test thread001.$tn.7 {
    execsql { PRAGMA integrity_check }
  } {ok}
}

sqlite3_enable_shared_cache $::enable_shared_cache
set sqlite_open_file_count 0
finish_test

Changes to test/thread002.test.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
103
104
105
106
107
108
109

110
#    May you share freely, never taking more than you give.
#
#***********************************************************************
#
#   This test attempts to deadlock SQLite in shared-cache mode.
#     
#
# $Id: thread002.test,v 1.5 2009/02/04 11:57:46 danielk1977 Exp $

set testdir [file dirname $argv0]

source $testdir/tester.tcl
source $testdir/thread_common.tcl
if {[info commands sqlthread] eq ""} {
  finish_test
................................................................................
    ]
    db close
    set res
  } [list [expr 1 + $::NTHREAD*100] ok]
}

sqlite3_enable_shared_cache $::enable_shared_cache

finish_test







|







 







>

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
103
104
105
106
107
108
109
110
111
#    May you share freely, never taking more than you give.
#
#***********************************************************************
#
#   This test attempts to deadlock SQLite in shared-cache mode.
#     
#
# $Id: thread002.test,v 1.6 2009/02/12 17:06:41 drh Exp $

set testdir [file dirname $argv0]

source $testdir/tester.tcl
source $testdir/thread_common.tcl
if {[info commands sqlthread] eq ""} {
  finish_test
................................................................................
    ]
    db close
    set res
  } [list [expr 1 + $::NTHREAD*100] ok]
}

sqlite3_enable_shared_cache $::enable_shared_cache
set sqlite_open_file_count 0
finish_test

Changes to test/thread003.test.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
189
190
191
192
193
194
195

196
#    May you share freely, never taking more than you give.
#
#***********************************************************************
#
#   This file contains tests that attempt to break the pcache module
#   by bombarding it with simultaneous requests from multiple threads.
#     
# $Id: thread003.test,v 1.5 2008/10/07 15:25:49 drh Exp $

set testdir [file dirname $argv0]

source $testdir/tester.tcl
source $testdir/thread_common.tcl
if {[info commands sqlthread] eq ""} {
  finish_test
................................................................................
    if {![info exists finished($ii)]} {
      vwait finished($ii)
    }
  }
  expr 0
} {0}


finish_test







|







 







>

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
189
190
191
192
193
194
195
196
197
#    May you share freely, never taking more than you give.
#
#***********************************************************************
#
#   This file contains tests that attempt to break the pcache module
#   by bombarding it with simultaneous requests from multiple threads.
#     
# $Id: thread003.test,v 1.6 2009/02/12 17:06:41 drh Exp $

set testdir [file dirname $argv0]

source $testdir/tester.tcl
source $testdir/thread_common.tcl
if {[info commands sqlthread] eq ""} {
  finish_test
................................................................................
    if {![info exists finished($ii)]} {
      vwait finished($ii)
    }
  }
  expr 0
} {0}

set sqlite_open_file_count 0
finish_test