1381bbc262
rollback mode. FossilOrigin-Name: 64ecf7c7e512827e8a5a42f9f3ad92ff57ec868820e3943dbc74d5823f9a889d
46 lines
1.1 KiB
Plaintext
46 lines
1.1 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
|
|
|
|
db close
|
|
|
|
do_multiclient_test tn {
|
|
do_test $tn.1 {
|
|
sql1 { CREATE TABLE t1(a, b) }
|
|
sql2 { CREATE TABLE t2(a, b) }
|
|
} {}
|
|
|
|
do_test $tn.2 {
|
|
sql1 {
|
|
INSERT INTO t2 VALUES(1, 2);
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES(1, 2);
|
|
}
|
|
} {}
|
|
|
|
do_test $tn.3 { csql2 { SELECT * FROM t1 } } {1 {database is locked}}
|
|
do_test $tn.4 { csql2 { SELECT * FROM t1 } } {1 {database is locked}}
|
|
do_test $tn.5 { sql2 { SELECT * FROM t2 } } {1 2}
|
|
|
|
|
|
}
|
|
|
|
finish_test
|
|
|