/ Check-in [1e79f4f9]
Login

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

Overview
Comment:In io.test, reset the connection after manually deleting the journal file, so that the connection does not continue to use the old deleted journal file. (CVS 6164)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1e79f4f9e59469fb9e3e0007163de3e604dcf00f
User & Date: drh 2009-01-11 00:42:02
Context
2009-01-11
00:44
The crash8.test depends on auto_vacuum being off. Make sure that is the case. (CVS 6165) check-in: 3538d2a9 user: drh tags: trunk
00:42
In io.test, reset the connection after manually deleting the journal file, so that the connection does not continue to use the old deleted journal file. (CVS 6164) check-in: 1e79f4f9 user: drh tags: trunk
00:18
Adjust savepoint.test so that it can deal with SQLITE_TEMP_STORE=3. (CVS 6163) check-in: 3cb910f0 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/io.test.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
...
285
286
287
288
289
290
291


292
293
294
295
296
297
298
#
#***********************************************************************
#
# The focus of this file is testing some specific characteristics of the 
# IO traffic generated by SQLite (making sure SQLite is not writing out
# more database pages than it has to, stuff like that).
#
# $Id: io.test,v 1.19 2008/09/18 11:18:41 danielk1977 Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

db close
sqlite3_simulate_device
sqlite3 db test.db -vfs devsym
................................................................................
  file delete -force test.db-journal
  catchsql { COMMIT }
} {1 {cannot commit - no transaction is active}}
do_test io-2.6.4 {
  execsql { SELECT * FROM abc }
} {1 2 3 4 5 6 7 8}


# Test that if the database modification is part of multi-file commit,
# the journal file is always created. In this case, the journal file
# is created during execution of the COMMIT statement, so we have to
# use the same technique to check that it is created as in the above 
# block.
file delete -force test2.db test2.db-journal
ifcapable attach {
................................................................................
  }
} {1 2 3 4 5 6 7 8}

# Test that the atomic write optimisation is not enabled if the sector
# size is larger than the page-size.
#
do_test io-2.9.1 {


  sqlite3_simulate_device -char atomic -sectorsize 2048
  execsql {
    BEGIN;
    INSERT INTO abc VALUES(9, 10);
  }
  file exists test.db-journal
} {1}







|







 







<







 







>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
222
223
224
225
226
227
228

229
230
231
232
233
234
235
...
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
#
#***********************************************************************
#
# The focus of this file is testing some specific characteristics of the 
# IO traffic generated by SQLite (making sure SQLite is not writing out
# more database pages than it has to, stuff like that).
#
# $Id: io.test,v 1.20 2009/01/11 00:42:02 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

db close
sqlite3_simulate_device
sqlite3 db test.db -vfs devsym
................................................................................
  file delete -force test.db-journal
  catchsql { COMMIT }
} {1 {cannot commit - no transaction is active}}
do_test io-2.6.4 {
  execsql { SELECT * FROM abc }
} {1 2 3 4 5 6 7 8}


# Test that if the database modification is part of multi-file commit,
# the journal file is always created. In this case, the journal file
# is created during execution of the COMMIT statement, so we have to
# use the same technique to check that it is created as in the above 
# block.
file delete -force test2.db test2.db-journal
ifcapable attach {
................................................................................
  }
} {1 2 3 4 5 6 7 8}

# Test that the atomic write optimisation is not enabled if the sector
# size is larger than the page-size.
#
do_test io-2.9.1 {
  db close
  sqlite3 db test.db
  sqlite3_simulate_device -char atomic -sectorsize 2048
  execsql {
    BEGIN;
    INSERT INTO abc VALUES(9, 10);
  }
  file exists test.db-journal
} {1}