Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/sqlite/blob/master/ext/rtree/rtreeB.test # sqlite [Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `sqlite / ext / rtree / rtreeB.test` 60 lines ยท 2309 bytes Raw Blame History 1 # 2011 March 2 2 # 3 # The author disclaims copyright to this source code. In place of 4 # a legal notice, here is a blessing: 5 # 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. 9 # 10 #*********************************************************************** 11 # Make sure the rtreenode() testing function can handle entries with 12 # 64-bit rowids. 13 # 14 15 if {![info exists testdir]} { 16 set testdir [file join [file dirname [info script]] .. .. test] 17 } 18 source [file join [file dirname [info script]] rtree_util.tcl] 19 source $testdir/tester.tcl 20 ifcapable !rtree { finish_test ; return } 21 22 ifcapable rtree_int_only { 23 do_test rtreeB-1.1-intonly { 24 db eval { 25 CREATE VIRTUAL TABLE t1 USING rtree(ii, x0, y0, x1, y1); 26 INSERT INTO t1 VALUES(`1073741824`, 0.0, 0.0, 100.0, 100.0); 27 INSERT INTO t1 VALUES(`2147483646`, 0.0, 0.0, 200.0, 200.0); 28 INSERT INTO t1 VALUES(`4294967296`, 0.0, 0.0, 300.0, 300.0); 29 INSERT INTO t1 VALUES(`8589934592`, 20.0, 20.0, 150.0, 150.0); 30 INSERT INTO t1 VALUES(`9223372036854775807`, 150, 150, 400, 400); 31 SELECT rtreenode(2, data) FROM t1_node; 32 } 33 } {{{`1073741824` 0 0 100 100} {`2147483646` 0 0 200 200} {`4294967296` 0 0 300 300} {`8589934592` 20 20 150 150} {`9223372036854775807` 150 150 400 400}}} 34 } else { 35 do_test rtreeB-1.1 { 36 db eval { 37 CREATE VIRTUAL TABLE t1 USING rtree(ii, x0, y0, x1, y1); 38 INSERT INTO t1 VALUES(`1073741824`, 0.0, 0.0, 100.0, 100.0); 39 INSERT INTO t1 VALUES(`2147483646`, 0.0, 0.0, 200.0, 200.0); 40 INSERT INTO t1 VALUES(`4294967296`, 0.0, 0.0, 300.0, 300.0); 41 INSERT INTO t1 VALUES(`8589934592`, 20.0, 20.0, 150.0, 150.0); 42 INSERT INTO t1 VALUES(`9223372036854775807`, 150, 150, 400, 400); 43 SELECT rtreenode(2, data) FROM t1_node; 44 } 45 } {{{`1073741824` 0 0 100 100} {`2147483646` 0 0 200 200} {`4294967296` 0 0 300 300} {`8589934592` 20 20 150 150} {`9223372036854775807` 150 150 400 400}}} 46 } 47 48 do_rtree_integrity_test rtreeB-1.2 t1 49 50 # https://sqlite.org/forum/forumpost/2026-01-08T23:32:19Z 51 # 52 db null NULL 53 do_execsql_test rtreeB-2.1 { 54 SELECT rtreenode(1,x'`00000001`'||randomblob(15)) IS NULL; 55 } {1} 56 do_execsql_test rtreeB-2.2 { 57 SELECT rtreenode(1,x'`00000001`'||randomblob(16)) IS NOT NULL; 58 } {1} 59 60 finish_test