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 # The focus of this file is testing the r-tree extension. Specifically,
13 # the impact of an SQLITE_SCHEMA error within the rtree module xConnect
18 if {![info exists testdir]} {
19 set testdir [file join [file dirname [info script]] .. .. test]
21 source $testdir/tester.tcl
22 set testprefix rtreeconnect
30 CREATE VIRTUAL TABLE r1 USING rtree(id, x1, x2, y1, y2);
31 CREATE TABLE t1(id, x1, x2, y1, y2);
34 CREATE TRIGGER tr1 AFTER INSERT ON t1 BEGIN
35 INSERT INTO r1 VALUES(new.id, new.x1, new.x2, new.y1, new.y2);
36 INSERT INTO log VALUES('r1: ' || new.id);
45 db eval { INSERT INTO log VALUES('startup'); }
46 db2 eval { CREATE TABLE newtable(x,y); }
50 INSERT INTO t1 VALUES(1, 2, 3, 4, 5);