/ Check-in [4a1a9f3e]
Login

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

Overview
Comment:Fix the shared pager tests so that they work under windows. (CVS 3013)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4a1a9f3e9df6588bcd4da13456790fbbc58f66de
User & Date: drh 2006-01-23 21:38:03
Context
2006-01-23
21:44
More progress toward getting SQLITE_OMIT_FLOATING_POINT to pass tests. Ticket #1621. (CVS 3014) check-in: b52674e5 user: drh tags: trunk
21:38
Fix the shared pager tests so that they work under windows. (CVS 3013) check-in: 4a1a9f3e user: drh tags: trunk
21:37
Progress toward getting SQLITE_OMIT_FLOATING_POINT to pass all tests. Ticket #1621 (CVS 3012) check-in: c4c90965 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/shared.test.

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

149



150
151
152
153
154
155
156
...
735
736
737
738
739
740
741

742



743
744
745
746
747
748
749
#
#    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: shared.test,v 1.20 2006/01/23 05:50:58 danielk1977 Exp $

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

ifcapable !shared_cache {
  finish_test
................................................................................
  }
} {}

do_test shared-$av.2.1 {
  # Open connection db3 to the database. Use a different path to the same
  # file so that db3 does *not* share the same pager cache as db and db2
  # (there should be two open file handles).

  sqlite3 db3 ./test.db



  set ::sqlite_open_file_count
} {2}
do_test shared-$av.2.2 {
  # Start read transactions on db and db2 (the shared pager cache). Ensure
  # db3 cannot write to the database.
  execsql {
    BEGIN;
................................................................................
    BEGIN;
    INSERT INTO de VALUES('Pataya', 30000);
  } db2
} {}
do_test shared-$av.10.3 {
  # An external connection should be able to read the database, but not
  # prepare a write operation.

  sqlite3 db3 ./test.db



  execsql {
    SELECT * FROM ab;
  } db3
  catchsql {
    BEGIN;
    INSERT INTO de VALUES('Pataya', 30000);
  } db3







|







 







>
|
>
>
>







 







>
|
>
>
>







5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
...
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
...
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
#
#    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: shared.test,v 1.21 2006/01/23 21:38:03 drh Exp $

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

ifcapable !shared_cache {
  finish_test
................................................................................
  }
} {}

do_test shared-$av.2.1 {
  # Open connection db3 to the database. Use a different path to the same
  # file so that db3 does *not* share the same pager cache as db and db2
  # (there should be two open file handles).
  if {$::tcl_platform(platform)=="unix"} {
    sqlite3 db3 ./test.db
  } else {
    sqlite3 db3 TEST.DB
  }
  set ::sqlite_open_file_count
} {2}
do_test shared-$av.2.2 {
  # Start read transactions on db and db2 (the shared pager cache). Ensure
  # db3 cannot write to the database.
  execsql {
    BEGIN;
................................................................................
    BEGIN;
    INSERT INTO de VALUES('Pataya', 30000);
  } db2
} {}
do_test shared-$av.10.3 {
  # An external connection should be able to read the database, but not
  # prepare a write operation.
  if {$::tcl_platform(platform)=="unix"} {
    sqlite3 db3 ./test.db
  } else {
    sqlite3 db3 TEST.DB
  }
  execsql {
    SELECT * FROM ab;
  } db3
  catchsql {
    BEGIN;
    INSERT INTO de VALUES('Pataya', 30000);
  } db3