Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add a test case to cover the bug fixed in check-in (5007). (CVS 5008) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
1863e87c40499ee3d9fd9cba6670e9a0 |
User & Date: | drh 2008-04-15 00:02:00.000 |
Context
2008-04-15
| ||
02:36 | Add out-of-range tests on the first parameter to sqlite3_limit(). Add the ability to record tests that have been skipped due to configuration limitations. (CVS 5009) (check-in: b7ffc6f0f3 user: drh tags: trunk) | |
00:02 | Add a test case to cover the bug fixed in check-in (5007). (CVS 5008) (check-in: 1863e87c40 user: drh tags: trunk) | |
2008-04-14
| ||
23:13 | Do not attempt to write to temporary database files that have never been opened. (CVS 5007) (check-in: 7bb9a4165a user: drh tags: trunk) | |
Changes
Added test/tempdb.test.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | # 2008 April 14 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file implements regression tests for SQLite library. # The focus of this file is in making sure that rolling back # a statement journal works correctly. # # $Id: tempdb.test,v 1.1 2008/04/15 00:02:00 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl # Use a temporary database. # db close sqlite3 db {} # Force a statement journal rollback on a database file that # has never been opened. # do_test tempdb-1.1 { execsql { BEGIN; CREATE TABLE t1(x UNIQUE); CREATE TABLE t2(y); INSERT INTO t2 VALUES('hello'); INSERT INTO t2 VALUES(NULL); } # Because of the transaction, the temporary database file # has not even been opened yet. The following statement # will cause a statement journal rollback on this non-existant # file. catchsql { INSERT INTO t1 SELECT CASE WHEN y IS NULL THEN test_error('oops', 11) ELSE y END FROM t2; } } {1 oops} # Verify that no writes occurred in t1. # do_test tempdb-1.2 { execsql { SELECT * FROM t1 } } {} finish_test |