/
auroraos
/
mirror_sqlite
ОбзорДокументацияВойти
/
auroraos
/
mirror_sqlite
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
ДокументацияПоддержка
Политика конфиденциальностиПользовательское соглашениеПолитика использования «cookies»Согласие субъекта персональных данных
2026 ©
mirror_sqlite/
ext/rtree/
..
util

Add the randomshape.tcl test-case generator script to the util subdirectory of the rtree extension.

8 лет назад
README

Approximately 100 typo corrections spanning the whole tree, submitted via [forum:0db9827f0464bc33|forum post 0db9827f0464bc33] and individually audited and verified. Affects only code comments, innocuous test strings, error message text in tool (not library) code, and configure-level help text.

год назад
geopoly.c

Add a test to ensure an application does not try to create a geopoly virtual table with too many columns. [bugs:/info/2026-05-30T12:47:27Z|Bug 2026-05-30T12:47:27Z].

2 месяца назад
rtree.c

Fix the logic for big-endian CPUs. Add comments on how to test various limbs of the logic.

день назад
rtree.h

Allow the shell to be built from the configure script with SQLITE_OMIT_VIRTUALTABLE defined.

9 лет назад
rtree1.test

Correction to the previous check-in.

2 года назад
rtree2.test

In the rtree extension, actively suppress extra tokens on the column names, and be pedantic about column affinities. Ticket [367a86e28859f1ff]

7 лет назад
rtree3.test

Update the expected error messages in some OOM test cases to account for [44d77a7f807].

4 года назад
rtree4.test

In extensions rtree, fts3 and fts5, ensure that when dynamic buffers are bound to persistent SQL statements using SQLITE_STATIC, the binding is replaced with an SQL NULL before the buffer is freed. Otherwise, a user may obtain a pointer to the persistent statement using sqlite3_next_stmt() and attempt to access the freed buffer using sqlite3_expanded_sql() or similar.

9 лет назад
rtree5.test

In extensions rtree, fts3 and fts5, ensure that when dynamic buffers are bound to persistent SQL statements using SQLITE_STATIC, the binding is replaced with an SQL NULL before the buffer is freed. Otherwise, a user may obtain a pointer to the persistent statement using sqlite3_next_stmt() and attempt to access the freed buffer using sqlite3_expanded_sql() or similar.

9 лет назад
rtree6.test

Make the SQLITE_DBCONFIG_STMT_SCANSTATUS option on by default.

3 года назад
rtree7.test

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.

9 лет назад
rtree8.test

Omit the Reinsert algorithm from RTree. This causes most benchmarks to run faster, at the expense of having a slightly less dense and hence larger index (example: 33 entries/node versus 34 entries/node).

3 года назад
rtree9.test

Fix harmless compiler warnings. Improve the independence of some TCL tests.

5 лет назад
rtreeA.test

Fix a faulty assert() in rtree that could fire when processing an unusually large record. Bug [bugs:/info/2026-06-03T14:44:46Z | 2026-06-03T14:44:46Z].

2 месяца назад
rtreeB.test

Fix potential OOB read on the undocumented test function rtreenode() that is part of the RTREE extension, as described in [forum:/forumpost/2026-01-08T23:32:19Z|forum post 2026-01-08T23:32:19Z]. The problem is almost certainly harmless since any memory allocation will be a multiple of 8 bytes, and once the input buffer size gets rounded up to the next multiple of 8 bytes, the access will still be within bounds. Nevertheless, it still needs to be fixed.

7 месяцев назад
rtreeC.test

Show LEFT and RIGHT JOIN processing in the EXPLAIN QUERY PLAN output.

4 года назад
rtreeD.test

Change the error message text for SQLITE_ERROR to omit the part about "missing database" as that meaning is now obsolete (since approx SQLite 2.0).

9 лет назад
rtreeE.test

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.

9 лет назад
rtreeF.test

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.

9 лет назад
rtreeG.test

In extensions rtree, fts3 and fts5, ensure that when dynamic buffers are bound to persistent SQL statements using SQLITE_STATIC, the binding is replaced with an SQL NULL before the buffer is freed. Otherwise, a user may obtain a pointer to the persistent statement using sqlite3_next_stmt() and attempt to access the freed buffer using sqlite3_expanded_sql() or similar.

9 лет назад
rtreeH.test

In rtree.c, ensure that the pReadAux statement is reset whenever the bAuxValid flag is cleared. Possible fix for [forum:/forumpost/3e45ed31d8 | forum post 3e45ed31d8].

год назад
rtreeI.test

Fix to the rowvalue logic that avoids disabling rowvalue inequality contraints on a virtual table when the virtual table sets the omit flag. The logic has been incorrect since row-values were added. However, this does not come up often as very few virtual tables implement inequality constraints using the omit flag. Ticket [f096d191b6641daa]

7 лет назад
rtreeJ.test

Bring test cases into alignment with the latest enhancements.

3 года назад
rtree_perf.tcl

Remove the obsolete "$Id:$" RCS identifier strings from the source code.

17 лет назад
rtree_util.tcl

Add the xIntegrity method to the sqlite3_module object. Implement this method in RTREE, FTS3/4, and FTS5 so that "PRAGMA integrity_check" also verifies the correctness of shadow tables associated with those virtual tables.

3 года назад
rtreecheck.test

Ensure that the database encoding is detected before the code generator gets too far down into byte-code generation and execution, but not so early that it interferes with initialization. [forum:/forumpost/bc75a4d20b756044|Forum thread bc75a4d20b756044].

2 года назад
rtreecirc.test

Use SQLITE_PREPARE_NO_VTAB in rtree as well.

8 лет назад
rtreeconnect.test

Add test cases for ticket [be436a7f4587ce517] using virtual table modules fts5 and rtree.

9 лет назад
rtreedoc.test

Omit the Reinsert algorithm from RTree. This causes most benchmarks to run faster, at the expense of having a slightly less dense and hence larger index (example: 33 entries/node versus 34 entries/node).

3 года назад
rtreedoc2.test

Approximately 100 typo corrections spanning the whole tree, submitted via [forum:0db9827f0464bc33|forum post 0db9827f0464bc33] and individually audited and verified. Affects only code comments, innocuous test strings, error message text in tool (not library) code, and configure-level help text.

год назад
rtreedoc3.test

Add new test file rtreedoc3.test.

5 лет назад
rtreefuzz001.test

Omit the Reinsert algorithm from RTree. This causes most benchmarks to run faster, at the expense of having a slightly less dense and hence larger index (example: 33 entries/node versus 34 entries/node).

3 года назад
sqlite3rtree.h

Fix a typo in a comment. No changes to code.

8 лет назад
test_rtreedoc.c

First attempt at getting the build to work with Tcl 9.0.

2 года назад
tkt3363.test

Fix a couple of memory leaks in r-tree that can occur following an OOM condition.

16 лет назад
viewrtree.tcl

Remove the obsolete "$Id:$" RCS identifier strings from the source code.

17 лет назад
visual01.txt

Add the geopoly_regular(X,Y,R,N) function to the geopoly extension.

8 лет назад
README
 
This directory contains an SQLite extension that implements a virtual
table type that allows users to create, query and manipulate r-tree[1]
data structures inside of SQLite databases. Users create, populate
and query r-tree structures using ordinary SQL statements.
 
1. SQL Interface
 
1.1 Table Creation
1.2 Data Manipulation
1.3 Data Querying
1.4 Introspection and Analysis
 
2. Compilation and Deployment
 
3. References
 
 
1. SQL INTERFACE
 
1.1 Table Creation.
 
All r-tree virtual tables have an odd number of columns between
3 and 11. Unlike regular SQLite tables, r-tree tables are strongly
typed.
 
The leftmost column is always the primary key and contains 64-bit
integer values. Each subsequent column contains a 32-bit real
value. For each pair of real values, the first (leftmost) must be
less than or equal to the second. R-tree tables may be
constructed using the following syntax:
 
CREATE VIRTUAL TABLE <name> USING rtree(<column-names>)
 
For example:
 
CREATE VIRTUAL TABLE boxes USING rtree(boxno, xmin, xmax, ymin, ymax);
INSERT INTO boxes VALUES(1, 1.0, 3.0, 2.0, 4.0);
 
Constructing a virtual r-tree table <name> creates the following three
real tables in the database to store the data structure:
 
<name>_node
<name>_rowid
<name>_parent
 
Dropping or modifying the contents of these tables directly will
corrupt the r-tree structure. To delete an r-tree from a database,
use a regular DROP TABLE statement:
 
DROP TABLE <name>;
 
Dropping the main r-tree table automatically drops the automatically
created tables.
 
1.2 Data Manipulation (INSERT, UPDATE, DELETE).
 
The usual INSERT, UPDATE or DELETE syntax is used to manipulate data
stored in an r-tree table. Please note the following:
 
* Inserting a NULL value into the primary key column has the
same effect as inserting a NULL into an INTEGER PRIMARY KEY
column of a regular table. The system automatically assigns
an unused integer key value to the new record. Usually, this
is one greater than the largest primary key value currently
present in the table.
 
* Attempting to insert a duplicate primary key value fails with
an SQLITE_CONSTRAINT error.
 
* Attempting to insert or modify a record such that the value
stored in the (N*2)th column is greater than that stored in
the (N*2+1)th column fails with an SQLITE_CONSTRAINT error.
 
* When a record is inserted, values are always converted to
the required type (64-bit integer or 32-bit real) as if they
were part of an SQL CAST expression. Non-numeric strings are
converted to zero.
 
1.3 Queries.
 
R-tree tables may be queried using all of the same SQL syntax supported
by regular tables. However, some query patterns are more efficient
than others.
 
R-trees support fast lookup by primary key value (O(logN), like
regular tables).
 
Any combination of equality and range (<, <=, >, >=) constraints
on spatial data columns may be used to optimize other queries. This
is the key advantage to using r-tree tables instead of creating
indices on regular tables.
 
1.4 Introspection and Analysis.
 
TODO: Describe rtreenode() and rtreedepth() functions.
 
 
2. COMPILATION AND USAGE
 
The easiest way to compile and use the RTREE extension is to build
and use it as a dynamically loadable SQLite extension. To do this
using gcc on *nix:
 
gcc -shared rtree.c -o libSqliteRtree.so
 
You may need to add "-I" flags so that gcc can find sqlite3ext.h
and sqlite3.h. The resulting shared lib, libSqliteRtree.so, may be
loaded into sqlite in the same way as any other dynamicly loadable
extension.
 
 
3. REFERENCES
 
[1] Atonin Guttman, "R-trees - A Dynamic Index Structure For Spatial
Searching", University of California Berkeley, 1984.
 
[2] Norbert Beckmann, Hans-Peter Kriegel, Ralf Schneider, Bernhard Seeger,
"The R*-tree: An Efficient and Robust Access Method for Points and
Rectangles", Universitaet Bremen, 1990.