/ Check-in [66576b45]
Login

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

Overview
Comment:Fix a problem in incrvacuum_ioerr.test. Do not run ioerr6.test with an in-memory journal.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:66576b450a0f0329571e344280994a964c967f8f
User & Date: dan 2013-03-06 11:44:57
Context
2013-03-07
06:42
Fix two compilation issues, one warning and one error, that occur only when SQLITE_OMIT_UTF16 is defined. check-in: 10ace06b user: mistachkin tags: trunk
2013-03-06
11:44
Fix a problem in incrvacuum_ioerr.test. Do not run ioerr6.test with an in-memory journal. check-in: 66576b45 user: dan tags: trunk
01:55
Fix a bug (ticket [fc7bd6358f59]) that caused incorrect query results in three way queries that involved comparing INTEGER and TEXT columns for equality. check-in: 7097241c user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/incrvacuum_ioerr.test.

   137    137     for {set iTest 1} {$::rc && $iTest<2000} {incr iTest} {
   138    138     
   139    139       # Figure out how big the database is and how many free pages it
   140    140       # has before running incremental-vacuum.
   141    141       #
   142    142       set nFree [execsql {pragma freelist_count} db1]
   143    143       set nPage [execsql {pragma page_count} db1]
          144  +    puts "nFree=$nFree nPage=$nPage"
   144    145     
   145    146       # Now run incremental-vacuum to vacuum 5 pages from the db file.
   146    147       # The iTest'th I/O call is set to fail.
   147    148       #
   148    149       set ::sqlite_io_error_pending $iTest
   149    150       set ::sqlite_io_error_persist 1
   150    151       do_test incrvacuum-ioerr-4.$iTest.1 {
................................................................................
   158    159       set ::sqlite_io_error_hardhit 0
   159    160     
   160    161       set nFree2 [execsql {pragma freelist_count} db1]
   161    162       set nPage2 [execsql {pragma page_count} db1]
   162    163     
   163    164       do_test incrvacuum-ioerr-4.$iTest.2 {
   164    165         set shrink [expr {$nPage-$nPage2}]
   165         -      expr {$shrink==0 || $shrink==5}
          166  +      expr {$shrink==0 || $shrink==5 || ($nFree<5 && $shrink==$nFree)}
   166    167       } {1}
   167    168     
   168    169       do_test incrvacuum-ioerr-4.$iTest.3 {
   169    170         expr {$nPage - $nPage2}
   170    171       } [expr {$nFree - $nFree2}]
   171    172     }
   172    173     

Changes to test/ioerr6.test.

    16     16   set ::testprefix ioerr6
    17     17   
    18     18   ifcapable !atomicwrite {
    19     19     puts "skipping tests - not compiled with SQLITE_ENABLE_ATOMIC_WRITE..."
    20     20     finish_test
    21     21     return
    22     22   }
           23  +
           24  +if {[permutation]=="inmemory_journal"} {
           25  +  # These tests will not work with in-memory journals (as persistent VFS
           26  +  # errors commencing after a transaction has started to write to the db
           27  +  # cannot be recovered from).
           28  +  finish_test
           29  +  return
           30  +}
           31  +
    23     32   faultsim_save_and_close
    24     33   
    25     34   do_test 1.1 {
    26     35     testvfs shmfault -default true
    27     36     shmfault devchar atomic
    28     37     sqlite3 db test.db
    29     38     execsql {
................................................................................
    59     68   } -test {
    60     69     set res [db one { PRAGMA integrity_check }]
    61     70     if {$res != "ok"} {
    62     71       error "integrity check: $res"
    63     72     }
    64     73   }
    65     74   
    66         -do_faultsim_test 2 -faults full* -prep {
           75  +do_faultsim_test 3 -faults full* -prep {
    67     76     shmfault devchar atomic
    68     77     faultsim_restore
    69     78     sqlite3 db test.db
    70     79   } -body {
    71     80     db eval {
    72     81       CREATE TABLE t1(x);
    73     82       CREATE TABLE t2(x);