/ Check-in [5424fcc5]
Login

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

Overview
Comment:Work around buggy TCL implementations in the exclusive2 test file. Ticket #2287 (CVS 3827)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:5424fcc5f82e864e0a85a71e0ae39209200386c6
User & Date: drh 2007-04-08 16:52:22
Context
2007-04-09
11:20
Have the pager call xReiniter() instead of xDestructor() to restore btree level state after rolling back a page. (CVS 3828) check-in: 4e894133 user: danielk1977 tags: trunk
2007-04-08
16:52
Work around buggy TCL implementations in the exclusive2 test file. Ticket #2287 (CVS 3827) check-in: 5424fcc5 user: drh tags: trunk
2007-04-07
17:44
Make sure autovacuum is turned off for malloc5.test. (CVS 3826) check-in: 105a7efb user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/exclusive2.test.

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
...
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
...
237
238
239
240
241
242
243
244
#    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.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# $Id: exclusive2.test,v 1.2 2007/04/03 16:13:52 danielk1977 Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

ifcapable {!pager_pragmas} {
  finish_test
  return
}

proc pagerChangeCounter {filename {new ""}} {
  set fd [open $filename a+]
  fconfigure $fd -translation binary -encoding binary
  if {$new ne ""} {
    seek $fd 24
    set a [expr {($new&0xFF000000)>>24}]
    set b [expr {($new&0x00FF0000)>>16}]
    set c [expr {($new&0x0000FF00)>>8}]
    set d [expr {($new&0x000000FF)}]
................................................................................
  pagerChangeCounter test.db
} {3}
do_test exclusive2-2.3 {
  t1sig
} $::sig

do_test exclusive2-2.4 {
  set fd [open test.db a]
  seek $fd 1024
  puts -nonewline $fd [string repeat [binary format c 0] 10000]
  flush $fd
  t1sig
} $::sig

do_test exclusive2-2.5 {
................................................................................
  execsql {
    INSERT INTO t1 VALUES(randstr(10, 400));
  }
  pagerChangeCounter test.db
} {5}

finish_test








|










|







 







|







 







<
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
...
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
...
237
238
239
240
241
242
243

#    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.
#
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# $Id: exclusive2.test,v 1.3 2007/04/08 16:52:22 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

ifcapable {!pager_pragmas} {
  finish_test
  return
}

proc pagerChangeCounter {filename {new ""}} {
  set fd [open $filename RDWR]
  fconfigure $fd -translation binary -encoding binary
  if {$new ne ""} {
    seek $fd 24
    set a [expr {($new&0xFF000000)>>24}]
    set b [expr {($new&0x00FF0000)>>16}]
    set c [expr {($new&0x0000FF00)>>8}]
    set d [expr {($new&0x000000FF)}]
................................................................................
  pagerChangeCounter test.db
} {3}
do_test exclusive2-2.3 {
  t1sig
} $::sig

do_test exclusive2-2.4 {
  set fd [open test.db RDWR]
  seek $fd 1024
  puts -nonewline $fd [string repeat [binary format c 0] 10000]
  flush $fd
  t1sig
} $::sig

do_test exclusive2-2.5 {
................................................................................
  execsql {
    INSERT INTO t1 VALUES(randstr(10, 400));
  }
  pagerChangeCounter test.db
} {5}

finish_test