/ Check-in [dd106901]
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:Fix a couple of test script problems.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: dd106901407a4d98644dd614e16e9fdc10cd7423
User & Date: dan 2010-10-04 16:06:12
Context
2010-10-04
23:55
Fix a performance regression (relative to version 3.6.23.1) caused by the query planner taking into account non-indexable WHERE clause terms to select the outermost join loops when it should be selecting tables for the outermost loop that do not benefit from being in an inner loop. check-in: ece641eb user: drh tags: trunk
16:06
Fix a couple of test script problems. check-in: dd106901 user: dan tags: trunk
15:47
Fix memsubsys1.test so that it works with TEMP_STORE>=2. check-in: 8ad88ee0 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/ioerr.test.

   131    131       CREATE TABLE test2.t2(a,b,c);
   132    132       COMMIT;
   133    133     } -exclude $ex
   134    134   }
   135    135   
   136    136   # Test IO errors when replaying two hot journals from a 2-file 
   137    137   # transaction. This test only runs on UNIX.
          138  +#
          139  +# It cannot be run under the "exclusive" permutation. In that case, the
          140  +# locks held by the connection in the local (this) process prevent a 
          141  +# second connection from attempting the multi-file transaction.
          142  +#
   138    143   ifcapable crashtest&&attach {
   139         -  if {![catch {sqlite3 -has-codec} r] && !$r} {
          144  +  if {![catch {sqlite3 -has-codec} r] && !$r && [permutation]!="exclusive"} {
   140    145       do_ioerr_test ioerr-6 -ckrefcount true -tclprep {
   141    146         execsql {
   142    147           ATTACH 'test2.db' as aux;
   143    148           CREATE TABLE tx(a, b);
   144    149           CREATE TABLE aux.ty(a, b);
   145    150         }
   146    151         set rc [crashsql -delay 2 -file test2.db-journal {

Changes to test/tkt-f3e5abed55.test.

    57     57   
    58     58   
    59     59   
    60     60   # Set up a testvfs so that the next time SQLite tries to delete the
    61     61   # file "test.db-journal", a snapshot of the current file-system contents
    62     62   # is taken.
    63     63   #
    64         -testvfs tvfs -default 1
    65         -tvfs script xDelete
    66         -tvfs filter xDelete
    67         -proc xDelete {method file args} {
    68         -  if {[file tail $file] == "test.db-journal"} {
    69         -    faultsim_save
    70         -    tvfs filter {}
    71         -  }
    72         -  return "SQLITE_OK"
    73         -}
    74         -
    75         -sqlite3 db  test.db
    76         -sqlite3 db2 test.db
    77         -do_test tkt-f3e5abed55-2.1 {
    78         -  execsql {
    79         -    ATTACH 'test.db2' AS aux;
    80         -    BEGIN;
    81         -      INSERT INTO t1 VALUES(3, 4);
    82         -      INSERT INTO t2 VALUES(3, 4);
           64  +# This test will not work with an in-memory journal.
           65  +#
           66  +if {[permutation]!="inmemory_journal"} {
           67  +  testvfs tvfs -default 1
           68  +  tvfs script xDelete
           69  +  tvfs filter xDelete
           70  +  proc xDelete {method file args} {
           71  +    if {[file tail $file] == "test.db-journal"} {
           72  +      faultsim_save
           73  +      tvfs filter {}
           74  +    }
           75  +    return "SQLITE_OK"
    83     76     }
    84         -} {}
    85         -do_test tkt-f3e5abed55-2.2 {
    86         -  execsql { BEGIN; SELECT * FROM t1 } db2
    87         -} {1 2}
    88         -do_test tkt-f3e5abed55-2.3 {
    89         -  catchsql COMMIT
    90         -} {1 {database is locked}}
    91         -
    92         -do_test tkt-f3e5abed55-2.4 {
    93         -  execsql COMMIT db2
    94         -  execsql {
    95         -    COMMIT;
    96         -    SELECT * FROM t1;
    97         -    SELECT * FROM t2;
    98         -  }
    99         -} {1 2 3 4 1 2 3 4}
   100         -do_test tkt-f3e5abed55-2.5 {
   101         -  db close
   102         -  db2 close
   103         -  faultsim_restore_and_reopen
   104         -  execsql {
   105         -    ATTACH 'test.db2' AS aux;
   106         -    SELECT * FROM t1;
   107         -    SELECT * FROM t2;
   108         -  }
   109         -} {1 2 3 4 1 2 3 4}
           77  +  
           78  +  sqlite3 db  test.db
           79  +  sqlite3 db2 test.db
           80  +  do_test tkt-f3e5abed55-2.1 {
           81  +    execsql {
           82  +      ATTACH 'test.db2' AS aux;
           83  +      BEGIN;
           84  +        INSERT INTO t1 VALUES(3, 4);
           85  +        INSERT INTO t2 VALUES(3, 4);
           86  +    }
           87  +  } {}
           88  +  do_test tkt-f3e5abed55-2.2 {
           89  +    execsql { BEGIN; SELECT * FROM t1 } db2
           90  +  } {1 2}
           91  +  do_test tkt-f3e5abed55-2.3 {
           92  +    catchsql COMMIT
           93  +  } {1 {database is locked}}
           94  +  
           95  +  do_test tkt-f3e5abed55-2.4 {
           96  +    execsql COMMIT db2
           97  +    execsql {
           98  +      COMMIT;
           99  +      SELECT * FROM t1;
          100  +      SELECT * FROM t2;
          101  +    }
          102  +  } {1 2 3 4 1 2 3 4}
          103  +  do_test tkt-f3e5abed55-2.5 {
          104  +    db close
          105  +    db2 close
          106  +    faultsim_restore_and_reopen
          107  +    execsql {
          108  +      ATTACH 'test.db2' AS aux;
          109  +      SELECT * FROM t1;
          110  +      SELECT * FROM t2;
          111  +    }
          112  +  } {1 2 3 4 1 2 3 4}
          113  +}
   110    114   
   111    115   
   112    116   finish_test
   113    117