-C Add\sa\snew\scolumn\sin\sthe\sSQLITE_MASTER\stable\sto\srecord\sthe\sroot\spage\nnumber\sof\sprimary\skey\sindices.\s(CVS\s252)
-D 2001-09-17T20:25:58
+C Enchanced\stransaction\stests\s(CVS\s253)
+D 2001-09-17T20:48:30
F Makefile.in a7053596881af6f2590a816ad4eb8fbbf20724a7
F README 51f6a4e7408b34afa5bc1c0485f61b6a4efb6958
F VERSION 3861a21803fcd9eb92a403027b0da2bb7add4de1
F test/tableapi.test 162840153191a91a7dce6395f2334f9aef713b37
F test/tclsqlite.test a57bb478d7e9f0b2c927f92e161f391e2896631a
F test/tester.tcl 4d93d04bb43c5936f33d30df82d2801b519df74e
-F test/trans.test 097ef854f8060bba2d53d7c4ac31eadf75342485
+F test/trans.test 997c8dcc15c479bc2cedc42220cf2d265e63d2a8
F test/update.test b320ea22899e80b32b4d21c54591eb7a6ba4d6bd
F test/vacuum.test 8acf8669f3b627e54149b25165b034aa06c2432e
F test/where.test 43d5ac94da3f3722375307f948884dc79b326a91
F www/sqlite.tcl cb0d23d8f061a80543928755ec7775da6e4f362f
F www/tclsqlite.tcl 06f81c401f79a04f2c5ebfb97e7c176225c0aef2
F www/vdbe.tcl 0c8aaa529dd216ccbf7daaabd80985e413d5f9ad
-P c67f6db681784f8511ccf208cde1c29d9ee73742
-R ec078dd1e4ad61f2004b7bba1a6425b5
+P 602ea4f9f641070592c788ce22859b849739b42e
+R 9d47f76cff786cc38ee15dd98f00be51
U drh
-Z 211dfb1506c70a3bba4b90be9db7543f
+Z 49979fa205c7e6b07a58fef67abee514
# This file implements regression tests for SQLite library. The
# focus of this script is database locks.
#
-# $Id: trans.test,v 1.4 2001/09/16 00:13:28 drh Exp $
+# $Id: trans.test,v 1.5 2001/09/17 20:48:30 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
-if {0} {
# Create several tables to work with.
#
}
} {I V X}
do_test trans-1.9 {
- sqlite altdb ${dbprefix}testdb
+ sqlite altdb test.db
execsql {SELECT b FROM one ORDER BY a} altdb
} {one two three}
do_test trans-1.10 {
SELECT a FROM two ORDER BY a;
} altdb} msg]
lappend v $msg
-} {0 {1 5 10}}
+} {1 {database in use by another process}}
do_test trans-3.3 {
set v [catch {execsql {
SELECT a FROM one ORDER BY a;
} altdb} msg]
lappend v $msg
-} {1 {table one is locked}}
+} {1 {database in use by another process}}
do_test trans-3.4 {
set v [catch {execsql {
INSERT INTO one VALUES(4,'four');
}} msg]
lappend v $msg
} {0 {}}
-do_test trans-3.2 {
+do_test trans-3.5 {
set v [catch {execsql {
SELECT a FROM two ORDER BY a;
} altdb} msg]
lappend v $msg
-} {0 {1 5 10}}
-do_test trans-3.3 {
+} {1 {database in use by another process}}
+do_test trans-3.6 {
set v [catch {execsql {
SELECT a FROM one ORDER BY a;
} altdb} msg]
lappend v $msg
-} {1 {table one is locked}}
-do_test trans-3.5 {
+} {1 {database in use by another process}}
+do_test trans-3.7 {
set v [catch {execsql {
INSERT INTO two VALUES(4,'IV');
}} msg]
lappend v $msg
} {0 {}}
-do_test trans-3.6 {
+do_test trans-3.8 {
set v [catch {execsql {
SELECT a FROM two ORDER BY a;
} altdb} msg]
lappend v $msg
-} {1 {table two is locked}}
-do_test trans-3.7 {
+} {1 {database in use by another process}}
+do_test trans-3.9 {
set v [catch {execsql {
SELECT a FROM one ORDER BY a;
} altdb} msg]
lappend v $msg
-} {1 {table one is locked}}
+} {1 {database in use by another process}}
do_test trans-3.10 {
execsql {END TRANSACTION}
} {}
SELECT a FROM two ORDER BY a;
} altdb} msg]
lappend v $msg
-} {1 {table two is locked}}
+} {1 {database in use by another process}}
do_test trans-4.5 {
set v [catch {execsql {
SELECT a FROM one ORDER BY a;
} altdb} msg]
lappend v $msg
-} {0 {1 2 3 4}}
+} {1 {database in use by another process}}
do_test trans-4.6 {
set v [catch {execsql {
BEGIN TRANSACTION;
SELECT a FROM two ORDER BY a;
} altdb} msg]
lappend v $msg
-} {1 {table two is locked}}
+} {1 {database in use by another process}}
do_test trans-4.8 {
set v [catch {execsql {
SELECT a FROM one ORDER BY a;
} altdb} msg]
lappend v $msg
-} {1 {table one is locked}}
+} {1 {database in use by another process}}
do_test trans-4.9 {
set v [catch {execsql {
END TRANSACTION;
} altdb} msg]
lappend v $msg
} {0 {1 2 3 4}}
-
-do_test trans-99.1 {
+do_test trans-4.99 {
altdb close
execsql {
DROP TABLE one;
}
} {}
+# Check out the commit/rollback behavior of the database
+#
+do_test trans-5.1 {
+ execsql {SELECT name FROM sqlite_master WHERE type='table' ORDER BY name}
+} {}
+do_test trans-5.2 {
+ execsql {BEGIN TRANSACTION}
+ execsql {SELECT name FROM sqlite_master WHERE type='table' ORDER BY name}
+} {}
+do_test trans-5.3 {
+ execsql {CREATE TABLE one(a text, b int)}
+ execsql {SELECT name FROM sqlite_master WHERE type='table' ORDER BY name}
+} {one}
+do_test trans-5.4 {
+ execsql {SELECT a,b FROM one ORDER BY b}
+} {}
+do_test trans-5.5 {
+ execsql {INSERT INTO one(a,b) VALUES('hello', 1)}
+ execsql {SELECT a,b FROM one ORDER BY b}
+} {hello 1}
+do_test trans-5.6 {
+ execsql {ROLLBACK}
+ execsql {SELECT name FROM sqlite_master WHERE type='table' ORDER BY name}
+} {}
+do_test trans-5.7 {
+ set v [catch {
+ execsql {SELECT a,b FROM one ORDER BY b}
+ } msg]
+ lappend v $msg
+} {1 {no such table: one}}
finish_test
-
-} ;# end if(gdbm and not windows)