SQLite

Check-in [dd10690140]
Login

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

Overview
Comment:Fix a couple of test script problems.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: dd106901407a4d98644dd614e16e9fdc10cd7423
User & Date: dan 2010-10-04 16:06:12.000
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: ece641eb89 user: drh tags: trunk)
16:06
Fix a couple of test script problems. (check-in: dd10690140 user: dan tags: trunk)
15:47
Fix memsubsys1.test so that it works with TEMP_STORE>=2. (check-in: 8ad88ee0c1 user: dan tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to test/ioerr.test.
131
132
133
134
135
136
137





138
139

140
141
142
143
144
145
146
131
132
133
134
135
136
137
138
139
140
141
142
143

144
145
146
147
148
149
150
151







+
+
+
+
+

-
+







    CREATE TABLE test2.t2(a,b,c);
    COMMIT;
  } -exclude $ex
}

# Test IO errors when replaying two hot journals from a 2-file 
# transaction. This test only runs on UNIX.
#
# It cannot be run under the "exclusive" permutation. In that case, the
# locks held by the connection in the local (this) process prevent a 
# second connection from attempting the multi-file transaction.
#
ifcapable crashtest&&attach {
  if {![catch {sqlite3 -has-codec} r] && !$r} {
  if {![catch {sqlite3 -has-codec} r] && !$r && [permutation]!="exclusive"} {
    do_ioerr_test ioerr-6 -ckrefcount true -tclprep {
      execsql {
        ATTACH 'test2.db' as aux;
        CREATE TABLE tx(a, b);
        CREATE TABLE aux.ty(a, b);
      }
      set rc [crashsql -delay 2 -file test2.db-journal {
Changes to test/tkt-f3e5abed55.test.
57
58
59
60
61
62
63



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109















































110
111
112
113
57
58
59
60
61
62
63
64
65
66














































67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117







+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







# Set up a testvfs so that the next time SQLite tries to delete the
# file "test.db-journal", a snapshot of the current file-system contents
# is taken.
#
# This test will not work with an in-memory journal.
#
if {[permutation]!="inmemory_journal"} {
testvfs tvfs -default 1
tvfs script xDelete
tvfs filter xDelete
proc xDelete {method file args} {
  if {[file tail $file] == "test.db-journal"} {
    faultsim_save
    tvfs filter {}
  }
  return "SQLITE_OK"
}

sqlite3 db  test.db
sqlite3 db2 test.db
do_test tkt-f3e5abed55-2.1 {
  execsql {
    ATTACH 'test.db2' AS aux;
    BEGIN;
      INSERT INTO t1 VALUES(3, 4);
      INSERT INTO t2 VALUES(3, 4);
  }
} {}
do_test tkt-f3e5abed55-2.2 {
  execsql { BEGIN; SELECT * FROM t1 } db2
} {1 2}
do_test tkt-f3e5abed55-2.3 {
  catchsql COMMIT
} {1 {database is locked}}

do_test tkt-f3e5abed55-2.4 {
  execsql COMMIT db2
  execsql {
    COMMIT;
    SELECT * FROM t1;
    SELECT * FROM t2;
  }
} {1 2 3 4 1 2 3 4}
do_test tkt-f3e5abed55-2.5 {
  db close
  db2 close
  faultsim_restore_and_reopen
  execsql {
    ATTACH 'test.db2' AS aux;
    SELECT * FROM t1;
    SELECT * FROM t2;
  }
} {1 2 3 4 1 2 3 4}
  testvfs tvfs -default 1
  tvfs script xDelete
  tvfs filter xDelete
  proc xDelete {method file args} {
    if {[file tail $file] == "test.db-journal"} {
      faultsim_save
      tvfs filter {}
    }
    return "SQLITE_OK"
  }
  
  sqlite3 db  test.db
  sqlite3 db2 test.db
  do_test tkt-f3e5abed55-2.1 {
    execsql {
      ATTACH 'test.db2' AS aux;
      BEGIN;
        INSERT INTO t1 VALUES(3, 4);
        INSERT INTO t2 VALUES(3, 4);
    }
  } {}
  do_test tkt-f3e5abed55-2.2 {
    execsql { BEGIN; SELECT * FROM t1 } db2
  } {1 2}
  do_test tkt-f3e5abed55-2.3 {
    catchsql COMMIT
  } {1 {database is locked}}
  
  do_test tkt-f3e5abed55-2.4 {
    execsql COMMIT db2
    execsql {
      COMMIT;
      SELECT * FROM t1;
      SELECT * FROM t2;
    }
  } {1 2 3 4 1 2 3 4}
  do_test tkt-f3e5abed55-2.5 {
    db close
    db2 close
    faultsim_restore_and_reopen
    execsql {
      ATTACH 'test.db2' AS aux;
      SELECT * FROM t1;
      SELECT * FROM t2;
    }
  } {1 2 3 4 1 2 3 4}
}


finish_test