summaryrefslogtreecommitdiff
path: root/components/external/SQLite-3.8.1/ext/rtree/rtree6.test
diff options
context:
space:
mode:
authorbernard <[email protected]>2017-11-02 13:50:42 +0800
committerbernard <[email protected]>2017-11-02 13:50:42 +0800
commitb2057f506a09e2adef81fc77efd697d16ae14bec (patch)
tree3affefabfe376a0ec1b3ac4a5eef957c1dd58dc8 /components/external/SQLite-3.8.1/ext/rtree/rtree6.test
parent23582c8129228b4961ad35319cfd2d270039345f (diff)
[External] Remove external from RT-Thread
Diffstat (limited to 'components/external/SQLite-3.8.1/ext/rtree/rtree6.test')
-rw-r--r--components/external/SQLite-3.8.1/ext/rtree/rtree6.test156
1 files changed, 0 insertions, 156 deletions
diff --git a/components/external/SQLite-3.8.1/ext/rtree/rtree6.test b/components/external/SQLite-3.8.1/ext/rtree/rtree6.test
deleted file mode 100644
index 17985ee525..0000000000
--- a/components/external/SQLite-3.8.1/ext/rtree/rtree6.test
+++ /dev/null
@@ -1,156 +0,0 @@
-# 2008 Sep 1
-#
-# 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.
-#
-#***********************************************************************
-#
-#
-
-if {![info exists testdir]} {
- set testdir [file join [file dirname [info script]] .. .. test]
-}
-source $testdir/tester.tcl
-
-ifcapable {!rtree || rtree_int_only} {
- finish_test
- return
-}
-
-# Operator Byte Value
-# ----------------------
-# = 0x41 ('A')
-# <= 0x42 ('B')
-# < 0x43 ('C')
-# >= 0x44 ('D')
-# > 0x45 ('E')
-# ----------------------
-
-proc rtree_strategy {sql} {
- set ret [list]
- db eval "explain $sql" a {
- if {$a(opcode) eq "VFilter"} {
- lappend ret $a(p4)
- }
- }
- set ret
-}
-
-proc query_plan {sql} {
- set ret [list]
- db eval "explain query plan $sql" a {
- lappend ret $a(detail)
- }
- set ret
-}
-
-do_test rtree6-1.1 {
- execsql {
- CREATE TABLE t2(k INTEGER PRIMARY KEY, v);
- CREATE VIRTUAL TABLE t1 USING rtree(ii, x1, x2, y1, y2);
- }
-} {}
-
-do_test rtree6-1.2 {
- rtree_strategy {SELECT * FROM t1 WHERE x1>10}
-} {Ea}
-
-do_test rtree6-1.3 {
- rtree_strategy {SELECT * FROM t1 WHERE x1<10}
-} {Ca}
-
-do_test rtree6-1.4 {
- rtree_strategy {SELECT * FROM t1,t2 WHERE k=ii AND x1<10}
-} {Ca}
-
-do_test rtree6-1.5 {
- rtree_strategy {SELECT * FROM t1,t2 WHERE k=+ii AND x1<10}
-} {Ca}
-
-do_eqp_test rtree6.2.1 {
- SELECT * FROM t1,t2 WHERE k=+ii AND x1<10
-} {
- 0 0 0 {SCAN TABLE t1 VIRTUAL TABLE INDEX 2:Ca}
- 0 1 1 {SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)}
-}
-
-do_eqp_test rtree6.2.2 {
- SELECT * FROM t1,t2 WHERE k=ii AND x1<10
-} {
- 0 0 0 {SCAN TABLE t1 VIRTUAL TABLE INDEX 2:Ca}
- 0 1 1 {SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)}
-}
-
-do_eqp_test rtree6.2.3 {
- SELECT * FROM t1,t2 WHERE k=ii
-} {
- 0 0 0 {SCAN TABLE t1 VIRTUAL TABLE INDEX 2:}
- 0 1 1 {SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)}
-}
-
-do_eqp_test rtree6.2.4 {
- SELECT * FROM t1,t2 WHERE v=10 and x1<10 and x2>10
-} {
- 0 0 0 {SCAN TABLE t1 VIRTUAL TABLE INDEX 2:CaEb}
- 0 1 1 {SCAN TABLE t2}
-}
-
-do_eqp_test rtree6.2.5 {
- SELECT * FROM t1,t2 WHERE k=ii AND x1<v
-} {
- 0 0 0 {SCAN TABLE t1 VIRTUAL TABLE INDEX 2:}
- 0 1 1 {SEARCH TABLE t2 USING INTEGER PRIMARY KEY (rowid=?)}
-}
-
-do_execsql_test rtree6-3.1 {
- CREATE VIRTUAL TABLE t3 USING rtree(id, x1, x2, y1, y2);
- INSERT INTO t3 VALUES(NULL, 1, 1, 2, 2);
- SELECT * FROM t3 WHERE
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5;
-} {1 1.0 1.0 2.0 2.0}
-
-do_test rtree6.3.2 {
- rtree_strategy {
- SELECT * FROM t3 WHERE
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5
- }
-} {EaEaEaEaEaEaEaEaEaEaEaEaEaEaEaEaEaEaEaEa}
-do_test rtree6.3.3 {
- rtree_strategy {
- SELECT * FROM t3 WHERE
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5
- }
-} {EaEaEaEaEaEaEaEaEaEaEaEaEaEaEaEaEaEaEaEa}
-
-do_execsql_test rtree6-3.4 {
- SELECT * FROM t3 WHERE x1>0.5 AND x1>0.8 AND x1>1.1
-} {}
-do_execsql_test rtree6-3.5 {
- SELECT * FROM t3 WHERE
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND
- x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>0.5 AND x1>1.1
-} {}
-
-
-finish_test