1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-10-26 21:59:27 +03:00
Files
sqlite/test/server3.test
dan 7ba5f0e768 Enhance this branch to support page-level-locking (without MVCC) for
multi-process deployments.

FossilOrigin-Name: 04e0cb571dbed00e269a890a755e252d7e8204d6d2ed5a7cfdb3d78d990a2876
2017-08-16 16:52:14 +00:00

58 lines
1.3 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
foreach {tn vfs} {1 unix-excl 2 unix} {
server_set_vfs $vfs
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