• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15if {![info exists testdir]} {
16  set testdir [file join [file dirname [info script]] .. .. test]
17}
18source $testdir/tester.tcl
19ifcapable !rtree { finish_test ; return }
20
21do_test rtreeB-1.1 {
22  db eval {
23    CREATE VIRTUAL TABLE t1 USING rtree(ii, x0, y0, x1, y1);
24    INSERT INTO t1 VALUES(1073741824, 0.0, 0.0, 100.0, 100.0);
25    INSERT INTO t1 VALUES(2147483646, 0.0, 0.0, 200.0, 200.0);
26    INSERT INTO t1 VALUES(4294967296, 0.0, 0.0, 300.0, 300.0);
27    INSERT INTO t1 VALUES(8589934592, 20.0, 20.0, 150.0, 150.0);
28    INSERT INTO t1 VALUES(9223372036854775807, 150, 150, 400, 400);
29    SELECT rtreenode(2, data) FROM t1_node;
30  }
31} {{{1073741824 0.000000 0.000000 100.000000 100.000000} {2147483646 0.000000 0.000000 200.000000 200.000000} {4294967296 0.000000 0.000000 300.000000 300.000000} {8589934592 20.000000 20.000000 150.000000 150.000000} {9223372036854775807 150.000000 150.000000 400.000000 400.000000}}}
32
33
34finish_test
35