a12baadd15
in the file-system and the VFS is an exclusive locking VFS. FossilOrigin-Name: e77d29f64480179d7aae7d88adab2ba9ff042701e1f4e624a3a7775cb56a51cc
53 lines
1.2 KiB
Plaintext
53 lines
1.2 KiB
Plaintext
# 2017 April 25
|
|
#
|
|
# 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 script is testing the server mode of SQLite.
|
|
#
|
|
|
|
|
|
set testdir [file dirname $argv0]
|
|
source $testdir/tester.tcl
|
|
source $testdir/lock_common.tcl
|
|
set testprefix server3
|
|
|
|
source $testdir/server_common.tcl
|
|
return_if_no_server
|
|
|
|
server_reset_db
|
|
server_sqlite3 db2 test.db
|
|
|
|
do_test 1.1 {
|
|
db eval { CREATE TABLE t1(a, b) }
|
|
db2 eval { CREATE TABLE t2(a, b) }
|
|
} {}
|
|
|
|
do_test 1.2 {
|
|
db eval {
|
|
INSERT INTO t2 VALUES(1, 2);
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES(1, 2);
|
|
}
|
|
} {}
|
|
|
|
do_test 1.3 {
|
|
list [catch { db2 eval { SELECT * FROM t1 } } msg] $msg
|
|
} {1 {database is locked}}
|
|
do_test 1.4 {
|
|
list [catch { db2 eval { SELECT * FROM t1 } } msg] $msg
|
|
} {1 {database is locked}}
|
|
|
|
do_test 1.4 {
|
|
db2 eval { SELECT * FROM t2 }
|
|
} {1 2}
|
|
|
|
finish_test
|
|
|