1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +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

@ -14,6 +14,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 }
@ -64,6 +65,7 @@ do_test rtree8-1.2.2 { nested_select 1 } {51}
# nodes internally.
#
populate_t1 1500
do_rtree_integrity_test rtree8-1.3.0 t1
do_execsql_test rtree8-1.3.1 { SELECT max(nodeno) FROM t1_node } {164}
do_test rtree8-1.3.2 {
set rowids [execsql {SELECT min(rowid) FROM t1_rowid GROUP BY nodeno}]
@ -158,13 +160,15 @@ do_test rtree8-5.2 {
}
execsql COMMIT
} {}
do_test rtree8-5.3 {
do_rtree_integrity_test rtree8-5.3 t2
do_test rtree8-5.4 {
execsql BEGIN
for {set i 0} {$i < 200} {incr i} {
execsql { DELETE FROM t2 WHERE id = $i }
}
execsql COMMIT
} {}
do_rtree_integrity_test rtree8-5.5 t2
finish_test