/ Check-in [fafb07b8]
Login

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

Overview
Comment:Reduce the number of iterations in one of the savepoint4.test crash tests. (CVS 6277)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fafb07b83721d67f6c6f3126c8de94b9b7efa519
User & Date: danielk1977 2009-02-10 14:45:13
Context
2009-02-10
18:54
For the "onefile" demo, pass SQLITE_OPEN_TEMP_DB instead of MAIN_DB to the OS layer when opening the single file. This is to work around the assert() in os_unix.c that tests that the locking region is not written to. (CVS 6278) check-in: 2da076a2 user: danielk1977 tags: trunk
14:45
Reduce the number of iterations in one of the savepoint4.test crash tests. (CVS 6277) check-in: fafb07b8 user: danielk1977 tags: trunk
14:28
Prevent code in test6.c from reading the 512 byte locking region (the PENDING_BYTE page) of a database file. Doing so triggers an assert failure in os_unix.c. (CVS 6276) check-in: 2a6a4316 user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/savepoint4.test.

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
..
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#
#    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: savepoint4.test,v 1.3 2008/12/20 08:39:57 danielk1977 Exp $

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


proc signature {} {
  return [db eval {SELECT count(*), md5sum(x) FROM t1}]
}

set ITERATIONS 25

expr srand(0)

do_test savepoint4-1 {
  execsql {
    PRAGMA cache_size=10;
    BEGIN;
    CREATE TABLE t1(x TEXT);
................................................................................
    INSERT INTO t1 SELECT randstr(10,400) FROM t1;
    INSERT INTO t1 SELECT randstr(10,400) FROM t1;
    COMMIT;
    SELECT count(*) FROM t1;
  }
} {256}

for {set ii 1} {$ii<=$ITERATIONS} {incr ii} {
  set ::sig [signature]
  set file test.db-journal

  for {set iDelay 1 ; set crashed 1} {$crashed} {incr iDelay} {

    do_test savepoint4-2.$ii.1.$iDelay {








|









|
>







 







|







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
..
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#
#    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: savepoint4.test,v 1.4 2009/02/10 14:45:13 danielk1977 Exp $

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


proc signature {} {
  return [db eval {SELECT count(*), md5sum(x) FROM t1}]
}

set ITERATIONS 25                   ;# Number of iterations for savepoint4-1
set ITERATIONS2 13                  ;# Number of iterations for savepoint4-2
expr srand(0)

do_test savepoint4-1 {
  execsql {
    PRAGMA cache_size=10;
    BEGIN;
    CREATE TABLE t1(x TEXT);
................................................................................
    INSERT INTO t1 SELECT randstr(10,400) FROM t1;
    INSERT INTO t1 SELECT randstr(10,400) FROM t1;
    COMMIT;
    SELECT count(*) FROM t1;
  }
} {256}

for {set ii 1} {$ii<=$ITERATIONS2} {incr ii} {
  set ::sig [signature]
  set file test.db-journal

  for {set iDelay 1 ; set crashed 1} {$crashed} {incr iDelay} {

    do_test savepoint4-2.$ii.1.$iDelay {