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 #***********************************************************************
11 # Additional test cases
13 if {![info exists testdir]} {
14 set testdir [file join [file dirname [info script]] .. .. test]
16 source [file join [file dirname [info script]] rtree_util.tcl]
17 source $testdir/tester.tcl
18 ifcapable !rtree { finish_test ; return }
20 # The following is a test of rowvalue handling on virtual tables that
21 # deal with inequalities and that set the OMIT flag on terms of the
22 # WHERE clause. This is not specific to rtree. We just use rtree because
23 # it is a convenient test platform since it has all the right
26 do_execsql_test rtreeI-1.10 {
28 INSERT INTO t1 VALUES(2);
29 CREATE VIRTUAL TABLE t2 USING rtree(id,x0,x1);
30 INSERT INTO t2(id,x0,x1) VALUES(1,2,3);
32 do_execsql_test rtreeI-1.20 {
33 SELECT 123 FROM t1, t2 WHERE (a,0)>(x0,0);
35 do_execsql_test rtreeI-1.21 {
36 SELECT 123 FROM t1, t2 WHERE (a,0.1)>(x0,0);
38 do_execsql_test rtreeI-1.22 {
39 SELECT 123 FROM t1, t2 WHERE (a,0)>=(x0,0);
41 do_execsql_test rtreeI-1.23 {
42 SELECT 123 FROM t1, t2 WHERE (a,0)<=(x0,0);
44 do_execsql_test rtreeI-1.24 {
45 SELECT 123 FROM t1, t2 WHERE (a,0)<(x0,0);
47 do_execsql_test rtreeI-1.30 {
48 SELECT 123 FROM t1, t2 WHERE (x0,0)<(a,0);
50 do_execsql_test rtreeI-1.31 {
51 SELECT 123 FROM t1, t2 WHERE (x0,0)<(a,0.1);
53 do_execsql_test rtreeI-1.40 {
54 SELECT 123 FROM t1, t2 WHERE x1<5 AND id<99 AND (a,0)>(x0,0);
56 do_execsql_test rtreeI-1.41 {
57 SELECT 123 FROM t1, t2 WHERE x1<5 AND id<99 AND (a,0.5)>(x0,0);
59 do_execsql_test rtreeI-1.42 {
60 SELECT 123 FROM t1, t2 WHERE x1<5 AND id<99 AND (a,0)>=(x0,0);
62 do_execsql_test rtreeI-1.43 {
63 SELECT 123 FROM t1, t2 WHERE x1<5 AND id<99 AND (a,0)<(x0,0);
65 do_execsql_test rtreeI-1.50 {
66 SELECT 123 FROM t1, t2 WHERE 5>x1 AND 99>id AND (x0,0)<(a,0);
68 do_execsql_test rtreeI-1.51 {
69 SELECT 123 FROM t1, t2 WHERE 5>x1 AND 99>id AND (x0,0)<(a,0.5);