/ Check-in [51cbddd5]
Login

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

Overview
Comment:Modify a query in test/thread001.test to ensure that results are returned in the order expected by the test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:51cbddd51d02bcd954be411ecc83556c049a2680
User & Date: dan 2012-12-05 16:44:13
Context
2012-12-05
19:04
Disable a couple of tests in where.test when running the "no_optimization" permutation. check-in: 5e961e37 user: dan tags: trunk
16:44
Modify a query in test/thread001.test to ensure that results are returned in the order expected by the test. check-in: 51cbddd5 user: dan tags: trunk
14:37
Fixes to a test case in shared_err.test. The fix is to prevent sqlite3_prepare() from being called when the test intends to test the response of sqlite3_step() to an OOM condition. check-in: 40c14395 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/thread001.test.

83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
...
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
    }
  
    for {set i 0} {$i < 100} {incr i} {
      # Test that the invariant is true.
      do_test t1 {
        execsql {
          SELECT 
            (SELECT md5sum(a, b) FROM ab WHERE a < (SELECT max(a) FROM ab)) ==
            (SELECT b FROM ab WHERE a = (SELECT max(a) FROM ab))
        }
      } {1}
  
      # Add another row to the database.
      execsql { INSERT INTO ab SELECT NULL, md5sum(a, b) FROM ab }
    }
................................................................................
  #
  do_test thread001.$tn.5 {
    execsql { SELECT count(*) FROM ab; }
  } [expr {1 + $::NTHREAD*100}]
  do_test thread001.$tn.6 {
    execsql {
      SELECT 
        (SELECT md5sum(a, b) FROM ab WHERE a < (SELECT max(a) FROM ab)) ==
        (SELECT b FROM ab WHERE a = (SELECT max(a) FROM ab))
    }
  } {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







|







 







|











83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
...
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
    }
  
    for {set i 0} {$i < 100} {incr i} {
      # Test that the invariant is true.
      do_test t1 {
        execsql {
          SELECT 
            (SELECT md5sum(a, b) FROM ab WHERE +a < (SELECT max(a) FROM ab)) ==
            (SELECT b FROM ab WHERE a = (SELECT max(a) FROM ab))
        }
      } {1}
  
      # Add another row to the database.
      execsql { INSERT INTO ab SELECT NULL, md5sum(a, b) FROM ab }
    }
................................................................................
  #
  do_test thread001.$tn.5 {
    execsql { SELECT count(*) FROM ab; }
  } [expr {1 + $::NTHREAD*100}]
  do_test thread001.$tn.6 {
    execsql {
      SELECT 
        (SELECT md5sum(a, b) FROM ab WHERE +a < (SELECT max(a) FROM ab)) ==
        (SELECT b FROM ab WHERE a = (SELECT max(a) FROM ab))
    }
  } {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