/ Check-in [698fba82]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Do not run some tests in notify3.test with the inmemory_journal permutation. They do not pass as the tests assume that the database schema is not loaded until the first invocation of [db eval]. This is not true with the inmemory_journal permutation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 698fba826e40ce6414cf6c261441d68b174c1637
User & Date: dan 2010-08-06 13:50:07
Context
2010-08-06
19:00
Remove all vestiges of ctype.h from FTS3. This addresses ticket [991789d9f3136a] among other bug reports. check-in: b8b465ed user: drh tags: trunk
13:53
Merge trunk changes into experimental branch. check-in: aef6698c user: dan tags: experimental
13:50
Do not run some tests in notify3.test with the inmemory_journal permutation. They do not pass as the tests assume that the database schema is not loaded until the first invocation of [db eval]. This is not true with the inmemory_journal permutation. check-in: 698fba82 user: dan tags: trunk
02:10
Change two automatic array variables into static constant arrays. Update and reformat some comments for cleaner presentation. check-in: a7a15547 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to test/notify3.test.

88
89
90
91
92
93
94






95
96
97
98
99
100
101
...
133
134
135
136
137
138
139

140
141
142
143
144
145
146
#
# This block tests that if the loading of schemas as a result of an
# ATTACH fails due to locks on the schema table held by other shared-cache
# connections the extended error code is SQLITE_LOCKED_SHAREDCACHE and
# it is possible to use the unlock-notify mechanism to determine when
# the ATTACH might succeed.
#






foreach {
  tn
  db1_loaded
  db2_loaded
  enable_extended_errors
  result
  error1 error2
................................................................................
  do_test notify3-2.$tn.3 {
    db1 unlock_notify {set invoked 1}
    set invoked 0
    db2 eval commit
    set invoked
  } [lindex $result 0]
}

catch { db1 close }
catch { db2 close }


sqlite3_enable_shared_cache $esc
finish_test








>
>
>
>
>
>







 







>







88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
...
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#
# This block tests that if the loading of schemas as a result of an
# ATTACH fails due to locks on the schema table held by other shared-cache
# connections the extended error code is SQLITE_LOCKED_SHAREDCACHE and
# it is possible to use the unlock-notify mechanism to determine when
# the ATTACH might succeed.
#
# This test does not work for test-permutations that specify SQL to
# be executed as part of the [sqlite3] command that opens the database.
# Executing such SQL causes SQLite to load the database schema into memory 
# earlier than expected, causing test cases to fail.
#
if {[presql] == ""} {
  foreach {
    tn
    db1_loaded
    db2_loaded
    enable_extended_errors
    result
    error1 error2
................................................................................
    do_test notify3-2.$tn.3 {
      db1 unlock_notify {set invoked 1}
      set invoked 0
      db2 eval commit
      set invoked
    } [lindex $result 0]
  }
}
catch { db1 close }
catch { db2 close }


sqlite3_enable_shared_cache $esc
finish_test

Changes to test/tester.tcl.

66
67
68
69
70
71
72

73
74
75
76
77
78
79
....
1145
1146
1147
1148
1149
1150
1151





1152
1153
1154
1155
1156
1157
1158
# Commands to help create test files that run with the "WAL" and other
# permutations (see file permutations.test):
#
#      wal_is_wal_mode
#      wal_set_journal_mode   ?DB?
#      wal_check_journal_mode TESTNAME?DB?
#      permutation

#

# Set the precision of FP arithmatic used by the interpreter. And 
# configure SQLite to take database file locks on the page that begins
# 64KB into the database file instead of the one 1GB in. This means
# the code that handles that special case can be tested without creating
# very large database files.
................................................................................
  }
}

proc permutation {} {
  set perm ""
  catch {set perm $::G(perm:name)}
  set perm





}

#-------------------------------------------------------------------------
#
proc slave_test_script {script} {

  # Create the interpreter used to run the test script.







>







 







>
>
>
>
>







66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
....
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
# Commands to help create test files that run with the "WAL" and other
# permutations (see file permutations.test):
#
#      wal_is_wal_mode
#      wal_set_journal_mode   ?DB?
#      wal_check_journal_mode TESTNAME?DB?
#      permutation
#      presql
#

# Set the precision of FP arithmatic used by the interpreter. And 
# configure SQLite to take database file locks on the page that begins
# 64KB into the database file instead of the one 1GB in. This means
# the code that handles that special case can be tested without creating
# very large database files.
................................................................................
  }
}

proc permutation {} {
  set perm ""
  catch {set perm $::G(perm:name)}
  set perm
}
proc presql {} {
  set presql ""
  catch {set presql $::G(perm:presql)}
  set presql
}

#-------------------------------------------------------------------------
#
proc slave_test_script {script} {

  # Create the interpreter used to run the test script.