3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #***********************************************************************
12 # Miscellaneous tests for errors in the rtree constructor.
16 if {![info exists testdir]} {
17 set testdir [file join [file dirname [info script]] .. .. test]
19 source [file join [file dirname [info script]] rtree_util.tcl]
20 source $testdir/tester.tcl
21 source $testdir/lock_common.tcl
28 #-------------------------------------------------------------------------
29 # Test that if an SQLITE_BUSY is encountered within the vtable
30 # constructor, a relevant error message is returned.
32 do_multiclient_test tn {
35 CREATE TABLE t1(a, b);
36 INSERT INTO t1 VALUES(1,2);
37 CREATE VIRTUAL TABLE rt USING rtree(id, minx, maxx, miny, maxy);
38 INSERT INTO rt VALUES(1,2,3,4,5);
43 sql2 { SELECT * FROM t1; }
47 sql1 { BEGIN EXCLUSIVE; INSERT INTO t1 VALUES(3, 4); }
51 list [catch { sql2 { SELECT * FROM rt } } msg] $msg
52 } {1 {database is locked}}