1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Add SQL scalar function rtreecheck() to the rtree module. For running checks

to ensure the shadow tables used by an rtree virtual table are internally
consistent.

FossilOrigin-Name: dde0bb3eab1316c3247b1755594527ca70955aab4ad4907190731f7ec092b327
This commit is contained in:
dan
2017-10-25 16:38:34 +00:00
parent b5d013edd1
commit 1917e92fdb
18 changed files with 623 additions and 34 deletions

View File

@ -15,6 +15,7 @@
if {![info exists testdir]} {
set testdir [file join [file dirname [info script]] .. .. test]
}
source [file join [file dirname [info script]] rtree_util.tcl]
source $testdir/tester.tcl
ifcapable !rtree { finish_test ; return }
ifcapable rtree_int_only { finish_test; return }
@ -25,7 +26,7 @@ ifcapable rtree_int_only { finish_test; return }
#
register_circle_geom db
do_execsql_test rtreeE-1.1 {
do_execsql_test rtreeE-1.0.0 {
PRAGMA page_size=512;
CREATE VIRTUAL TABLE rt1 USING rtree(id,x0,x1,y0,y1);
@ -47,6 +48,7 @@ do_execsql_test rtreeE-1.1 {
y(y) AS (VALUES(0) UNION ALL SELECT y+1 FROM y WHERE y<4)
INSERT INTO rt1 SELECT 200+x+5*y, x*7, x*7+15, y*7+200, y*7+215 FROM x, y;
} {}
do_rtree_integrity_test rtreeE-1.0.1 rt1
# Queries against each of the three clusters */
do_execsql_test rtreeE-1.1 {
@ -111,6 +113,7 @@ do_test rtreeE-2.1 {
COMMIT;
}
} {}
do_rtree_integrity_test rtreeE-2.1.1 rt2
for {set i 1} {$i<=200} {incr i} {
set dx [expr {int(rand()*100)}]