Commit Graph

280 Commits

Author SHA1 Message Date
dan
5b09d13a58 Have the rtree module close any open blob-handle within the xSavepoint method.
This prevents such an open blob handle from interfering with DROP TABLE
operations.

FossilOrigin-Name: fa4416adc2a9a3a80db1d5befc0b95c3d0fc41affe38f7f2f45cdfae3f1b49eb
2017-04-08 13:52:41 +00:00
drh
297e2bdb8e Make sure the RTree sqlite3_blob handle is reset prior to renaming the table.
FossilOrigin-Name: 1cdae2db3c54970a1811e597065724578408c84d49d75b8fe25d56281ddc2e94
2017-04-08 01:09:14 +00:00
dan
6b904f5e01 Avoid a technically undefined right-shift of a signed value in rtree.c.
FossilOrigin-Name: a144875fe44ff3a30bab299d50b7dbec2ee21f8c73e692a71ee1f7c54b5f0c76
2017-03-20 19:26:27 +00:00
drh
dc5ece86ae Remove the CLANG_VERSION macro, since we have learned that version numbers in
clang are "marketing" and are inconsistent and unreliable.  Builds using clang
will still use the GCC_VERSION macro since clang works hard to be gcc
compatible.

FossilOrigin-Name: 810d29320b853b3a01aa50d8f2a0bceacf79e0aa
2017-02-15 15:09:09 +00:00
drh
a39284bfa8 Cleanup the usage of the SQLITE_DISABLE_INTRINSIC compile-time option.
Remove the SQLITE_RUNTIME_BYTEORDER compile-time option.  Use
-DSQLITE_BYTEORDER=0 instead.  Fix a bug in R-Tree that occurs when compiling
on a known little-endian machine without the use of intrinsic byteswapping
functions.

FossilOrigin-Name: 798fb9d70d2e5f95e64237b04d6692360133381a
2017-02-09 17:12:22 +00:00
dan
9fcb6ddc1e Fix a build problem affecting non-amalgamation rtree builds.
FossilOrigin-Name: bb7f445ba1df53cd4a169612b18fc533016102b7
2017-02-07 14:45:18 +00:00
drh
364ca6a90e Fix SQLITE_BYTEORDER #defines in R-Tree when compiled separately from the
amalgamation.

FossilOrigin-Name: a136609c98ed3cc673c5a3c2578d49db3f2518d1
2017-02-07 13:51:48 +00:00
drh
edd9bcb372 Make the cellMargin() routine of R-Tree slightly smaller and faster while also
fixing a harmless compiler warning.

FossilOrigin-Name: 07fe6228208684d579c4f6c334c90eb6262a9233
2017-02-07 12:58:38 +00:00
drh
b18bf843f7 Fix a minor typo in a comment in R-Tree. No changes to code.
FossilOrigin-Name: f77ee9e941f22b0b2e88871df4466fdde9cde131
2017-02-07 00:55:47 +00:00
drh
04128ace8d Remove a small amount of unnecessary code from R-Tree.
FossilOrigin-Name: e5aea894267addb4dc9b21de24a20417b0be508a
2017-02-06 16:52:32 +00:00
drh
9630f3ba08 Remove incorrect testcase() macros from R-Tree.
FossilOrigin-Name: 853a58a75ecbd01ebbf7e07fbd8c4fc9bef54a99
2017-02-06 01:19:07 +00:00
drh
fe05491b87 In RTREE, use an sqlite3_blob object rather than an sqlite3_stmt object
for reading content out of the %_node shadow table.

FossilOrigin-Name: 97ccf3e4de11ffea46993cb7fb7ab559b9810705
2017-02-04 14:24:05 +00:00
drh
010e312f8f Close sqlite3_blob objects on xSync rather than waiting until xCommit.
FossilOrigin-Name: 95ee745fceb4a48c683f34c404c380fe5e7d684a
2017-02-04 13:12:12 +00:00
drh
3accc7e1af Remove the unused pReadNode prepared statement from each RTREE object.
FossilOrigin-Name: e51dc0ec60d45cd57564735b6b2bb254a588533e
2017-02-02 16:30:25 +00:00
drh
ce655a2367 Fix a potential uninitialized (though harmless) variable in RTREE.
FossilOrigin-Name: a1c74e09d63aca630d022ed074866433eed6b493
2017-02-02 16:08:27 +00:00
drh
413e207e31 The sqlite3_blob_close() interface can cause recursive invocations of
nodeBlobReset() in RTREE.  Make sure that does not cause problems.

FossilOrigin-Name: 88333441cbf26bfde2acebf2a3f75b5ebbdfb0ae
2017-02-02 15:35:54 +00:00
drh
2033d1c8ca Change RTREE so that the sqlite3_blob object is closed whenever the cursor
count drops to zero and there is not a pending write transaction.

FossilOrigin-Name: 9bb4eafe1a60176ed2e731bb7e3067c0b8a46615
2017-02-02 14:40:06 +00:00
drh
6d683c5c6e Use the sqlite3_blob interface for reading values from the %_node shadow
table in RTREE.  This is a work in progress.  There are still some minor
problems.

FossilOrigin-Name: fc4917d730b29b0bf60fea5e0166728635783e9c
2017-02-02 02:28:45 +00:00
mistachkin
6890d3e458 Fix harmless compiler warnings seen with MSVC.
FossilOrigin-Name: 0c66cf0f0a9ada2ddcb8d61001ef791b86226416
2017-02-01 23:06:17 +00:00
mistachkin
2fa517bf2a Fix C99-style variable declaration issue seen with older versions of MSVC.
FossilOrigin-Name: 54d285464a222c59327eb6c917c1cc0125a55a27
2017-02-01 22:59:29 +00:00
mistachkin
2e52532217 Fix harmless compiler warnings seen with MSVC.
FossilOrigin-Name: 997f765bc6706769ae15f3e719354473e02bd78b
2017-02-01 22:43:08 +00:00
drh
31a1349515 Unwind the RTREE dimension loop inside of rtreeCallbackConstraint().
FossilOrigin-Name: 4854ea9c18e7d8066c90b41568d0fae97b01ea6d
2017-02-01 17:08:56 +00:00
drh
5db59b33c4 Completely unroll the dimension loop inside of cellArea() in RTREE.
FossilOrigin-Name: 3c4c0126c287f844220b65e00fec17c059fbb7c8
2017-02-01 16:41:30 +00:00
drh
0e6f67b754 Precompute the nDim2 value in the Rtree object and use that to make loops
over coordinates faster.

FossilOrigin-Name: f1f3c8cc733a05c12dd980f2dfa0ab4ccd76c04b
2017-02-01 15:49:02 +00:00
drh
03626e3812 Use compiler intrinsic functions (when available) for byteswapping in RTREE.
FossilOrigin-Name: 82fcd54a5941c20895ffc22d8009c1ebdae44eda
2017-02-01 15:24:32 +00:00
drh
14494fa712 More RTREE performance optimizations related to decoding values.
FossilOrigin-Name: c5395e7496d0cd593f5e16ee5f6719d020dc0c66
2017-02-01 02:25:28 +00:00
drh
fcbd6cdb41 R-TREE optimization: unwrap the coordinate decode loop in
rtreeCallbackConstraint().

FossilOrigin-Name: 0bf7b51896ec441f62490964c7a44a3c75c6b7e2
2017-01-31 21:22:03 +00:00
dan
9c8753c0a8 Fix a problem in rtreeD.test causing it to fail in OMIT_BUILTIN_TEST builds.
FossilOrigin-Name: d6b3779e6dad038d8bc35139cf314bf1e6e91977
2016-11-17 20:05:00 +00:00
dan
ea5e5f0b89 Fix a case in which the rtree module was ignoring an OOM while generating an error message.
FossilOrigin-Name: 788f86bebe413b5a0ab41ba3d75ba8728827a964
2016-10-10 10:06:59 +00:00
drh
2e5c5052fd Fix typos in comments. No changes to running code.
FossilOrigin-Name: a07269f2a0f87e0b736127f528f6caf3b63f9052
2016-08-27 20:21:51 +00:00
drh
f1e2c8e1ff Fix the rtreeG.test test case.
FossilOrigin-Name: 9589e9377118efc356c73ea1aab2d7e6c2f7fc36
2016-05-23 18:27:07 +00:00
drh
e62c2fe179 Fix RTREE so that it does not run queries against the sqlite_stat1 if that
table does not exist.

FossilOrigin-Name: 48526a2fe5373e3d19e8b813cc8a342d6b7c9c3d
2016-05-23 18:12:04 +00:00
drh
daa14559d2 Remove an extra "finish_test" from the end of rtreeC.test.
FossilOrigin-Name: bfbb6dd84b5e1335e1eae857a03fa33a71fd67a5
2016-05-23 18:06:51 +00:00
dan
5782bc27fa Improve the error messages generated by the rtree module when a constraint fails.
FossilOrigin-Name: 3ad2531efb64b7c53b777ddf3681203217052b32
2016-05-23 16:16:13 +00:00
drh
2ea74dc805 Adjust the cost estimates for RTREE such that the expected number of rows and
expected cost is halved for each additional constraint.

FossilOrigin-Name: fd7cd0609381a85673d1f737ebeb19dde3de180f
2016-03-05 20:28:24 +00:00
dan
06f8c635ef Add tests for the rtree module to verify that attempts to insert non-integer primary key values or non-numeric dimensions into an rtree table are handled correctly.
FossilOrigin-Name: f653fce90846b700441e8fa5f1930c1ec5e38e31
2015-10-03 12:23:18 +00:00
dan
4f20cd402b Avoid passing constraints that are unusable due to LEFT or CROSS joins to virtual table xBestIndex() methods.
FossilOrigin-Name: 80ee56dda7db3860f8be5f6968c8745138f8453f
2015-06-08 18:05:54 +00:00
drh
18070e08c5 Fix incorrect validation of the size of the BLOB returned by a geometry
function on the RHS of a MATCH operator in RTree.  The old code worked for
64-bit systems (by chance) but fails on 32-bit.

FossilOrigin-Name: 10cc44f5a63e6cadf6940bb7310a177ee7fa6ee2
2015-05-22 23:17:28 +00:00
drh
fd29973f11 Update with fixes and enhancements from trunk.
FossilOrigin-Name: 9605d008f5c763137e9734d033fe4510ca316858
2015-05-22 18:40:48 +00:00
dan
6b76418e67 Have r-tree prefer to use the constraint "col MATCH ?" over "rowid = ?".
FossilOrigin-Name: b9fb95194d4f7c535f1d175fd2e18d69d76e8fc4
2015-05-22 16:08:42 +00:00
drh
4f03f413bc Add the sqlite3_value_dup() and sqlite3_value_free() interfaces. Use
these interfaces to enhance R-Tree to add the
sqlite3_rtree_query_info.apSqlParam field.

FossilOrigin-Name: a7ee40c4fc62843ac5b96ba47ca14a66e8cd6961
2015-05-20 21:28:32 +00:00
drh
856d446efe Allow R-Tree geometry functions to take 8-byte BLOB arguments which are
passed directly through to the underlying callback, and which can be used
to pass pointers into the callback.

FossilOrigin-Name: b271ed56532a78323accc8a7cb348d55f95c350e
2015-05-19 22:20:48 +00:00
mistachkin
6a12854024 Remove a couple stray test breakpoint calls.
FossilOrigin-Name: 2860cebeeaebd346de60c762aa3e51dbab008578
2015-05-08 00:58:39 +00:00
drh
e9c5f97683 Fix an assert in RTREE that would fire if the rtree table is misdeclared.
FossilOrigin-Name: 9a45409cc4078f2b6e68aa777f6ab86a14309833
2015-05-01 18:00:37 +00:00
drh
068a251d99 Simplify some code in rtree, to avoid confusing the optimizer in GCC on
some macs:
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00).
Prior to these changes, compiling with -O3 would cause incorrect code to
be generated.  The change to the nodeGetCell() routine is key.  The other
changes are merely cosmetic details discovered while bug hunting.

FossilOrigin-Name: 882181ff9dd75f32db266db6e476671021fc567b
2015-01-13 21:26:17 +00:00
mistachkin
7bb6e8e169 Get things compiling cleanly with MSVC and W4.
FossilOrigin-Name: c8725fa5fa361959b0f0a3fb36f204905d6f0ae9
2015-01-12 18:52:41 +00:00
drh
f0a88279bd Fix a harmless compiler warning in rtree.
FossilOrigin-Name: 30891c6b8ebe9dfc939f9695bb45a159fbaaf262
2015-01-01 16:47:43 +00:00
drh
051575cbf4 Do not use virtual (and hence redundant) WHERE-clause terms to restrict the
content of a automatic partial index.  Show when an automatic partial index
is used in the EXPLAIN QUERY PLAN output.

FossilOrigin-Name: b9ad601eab1d7298d369267eb697c7fa1bc16985
2014-10-25 12:28:25 +00:00
drh
b6b4b79f34 Fix a faulty assert() statement. Add comments to clarify the behavior of
the sqlite3OpenTableAndIndices() routine in insert.c.  Add test cases to
verify that the assert() statement is not firing inappropriately.
Ticket [369d57fb8e5ccdff06f1].

FossilOrigin-Name: 7029b3404d3f5f698a496934f3a3f2972051b257
2014-08-21 14:10:23 +00:00
dan
57ff60b19b Have calls to the xFilter() method of rtree virtual tables ensure that cursor is initialized before proceeding. Fix for [d2889096e7bdeac].
FossilOrigin-Name: 8cc41b0bf365af47c2061ffe44c86018945dd239
2014-07-29 11:54:18 +00:00
drh
9740726121 A different approach to the autoindex problem that deletes query-planner code
rather than adding it.

FossilOrigin-Name: f270fb6e9e0b5e77f918081962008c6195ab1e36
2014-06-17 12:33:55 +00:00
drh
6b7ff748a1 Allow an automatic index on a WHERE constraint where the RHS is does not
reference another table as long as the RHS is not a constant.

FossilOrigin-Name: 58acc2a8b38c5f13175c191697b4d2b663db1872
2014-06-17 09:00:54 +00:00
drh
65e6b0dd12 Add the sqlite3_rtree_query_callback() API to the RTree virtual table.
(Cherrypick from the sessions branch.)

FossilOrigin-Name: af2cbe64adab5f9e3b0f3da00d06428088589d7f
2014-04-28 17:56:19 +00:00
dan
d88e521f59 Fix an obscure bug causing sqlite3_close() to fail if there are virtual tables on the disconnect list when it is called.
FossilOrigin-Name: 6504aa47a8ebb13827be017c4cb4b2dc3c4c55f4
2014-03-12 19:38:38 +00:00
dan
87af14a639 Prevent the rtree module from reading sqlite_stat1 data from the wrong database.
FossilOrigin-Name: 7ce03c1b5552d830300575c5b41a874db7a2ec77
2014-03-12 12:44:46 +00:00
dan
3afca7d18c Add a test to see what happens if an rtree constructor encounters an SQLITE_BUSY error. No changes to code.
FossilOrigin-Name: 5527e23636eee192030f6a3c41628030b6c50bb8
2014-03-11 09:19:26 +00:00
dan
ff4b23ba9e Fix for [4065ac8595]: Do not order CROSS or LEFT joins, even if the right-hand-side is a virtual table.
FossilOrigin-Name: e2684ece455f53563ae6da7cbb5505d9a4a3076a
2013-11-12 12:17:16 +00:00
dan
14ec33f73b Fix typos in compile and run-time tests of the sqlite library version number in rtree.c.
FossilOrigin-Name: f58d57017199421167dae8ebc67db2f19be45082
2013-11-11 19:56:35 +00:00
dan
a9f5815b67 Add a way for virtual tables to return the expected number of rows for a scan (not just the overall cost) to SQLite. Have the rtree module make use of this.
FossilOrigin-Name: 5a3cfd747a85480d215784817c3821d87ecfa2f7
2013-11-11 19:01:33 +00:00
mistachkin
049d487e2e Modify several extensions to use the new exported function naming. Fix some shared library compilation issues.
FossilOrigin-Name: f2ab8747825ab5131ffab174aa0ffe5e474f6811
2013-07-04 23:53:56 +00:00
drh
5822d6feb2 Fix test cases for the new EXPLAIN QUERY PLAN format. Add the
wherecosttest tool.  Other fixes to logarithm cost.

FossilOrigin-Name: aa580e368e3c398b8377b80342dfdd906324c248
2013-06-10 23:30:09 +00:00
drh
44dc8e822b Fix EXPLAIN QUERY PLAN row counts for the rtree virtual table tests.
FossilOrigin-Name: 15328987cc876d7a4e34561b6b0e08937aefe4be
2013-06-03 18:14:31 +00:00
mistachkin
65eb64765c Correct test numbering on several rtree tests.
FossilOrigin-Name: 0adf8a3a4f2ca370568b35c9e8ce0e18f18701a2
2013-04-10 02:56:24 +00:00
mistachkin
48864df97d Many spelling fixes in comments. No changes to code.
FossilOrigin-Name: 6f6e2d50941e444ebc83604daddcc034137a05b7
2013-03-21 21:20:32 +00:00
mistachkin
806c00666f Enhance RTree virtual table creation error messages that involve the getNodeSize() function.
FossilOrigin-Name: 652233d646236d3fbca629813b20d075f00f3ed6
2013-01-17 03:18:38 +00:00
mistachkin
c197eedbb4 Fix several compiler warnings seen with MSVC.
FossilOrigin-Name: 8b5f617c2a5f0bf7bdbd9144aee58d69564db1e2
2012-10-01 20:12:30 +00:00
drh
0e3037ac36 Refactor the float-to-double rounding routines so that they compile without
warnings.

FossilOrigin-Name: f607ad27c1ede27af24dbee10ca867c8f7761ee3
2012-05-29 00:30:43 +00:00
drh
c6bff38216 Simplification to the coordinate rounding logic in RTree.
FossilOrigin-Name: df24072de27555c6b530b02e821ea8b066c554fc
2012-05-28 20:16:42 +00:00
drh
7923863602 When converting 64-bit floating point coordinates to 32-bit in RTree, take
care to round the values such that the size of the bounding box is enlarged.

FossilOrigin-Name: f4e8ff03eae70334632455a867859cfcc25682be
2012-05-28 19:19:25 +00:00
drh
2aad3da6ea Fix a typo in the rtree6.test script that prevented it from running.
FossilOrigin-Name: 221fe4a8ea5bea90031e459746ea71ff173e6f52
2012-04-03 17:05:16 +00:00
drh
f439fbdab5 The SQLITE_RTREE_INT_ONLY compile-time option causes the RTree extension
to use only integer math and store only integer coordinates.

FossilOrigin-Name: 02b7640f5118e0a635b68f65765191bb3171b7bd
2012-04-02 21:35:42 +00:00
drh
01ea399a84 Suppress harmless compiler warnings on windows in FTS4 and RTREE.
FossilOrigin-Name: 4fd68647c8d4b120e04d054617cef31001f44c6f
2012-03-19 14:51:19 +00:00
drh
64803bd2fa Fix minor issues with FTS and RTREE discovered by coverity.
FossilOrigin-Name: 1c27d842163e27c39bbe9409f50657b9de9ade6e
2011-12-22 17:31:17 +00:00
drh
30ddce6ff4 Added the tool/warnings-clang.sh script. Changes so that there are no
warnings with either gcc or clang even including FTS4 and RTREE and
both with and without SQLITE_THREADSAFE=0.

FossilOrigin-Name: 39408702a989f907261c298bf0947f3e68bd10fe
2011-10-15 00:16:30 +00:00
drh
086e4913b5 Fix a few minor and harmless clang warnings in FTS3 and RTREE.
FossilOrigin-Name: b3324f6cc27c3bfb32b12eacace2fc731c2dd644
2011-10-14 22:57:03 +00:00
drh
7fd3392981 More compiler warning fixes.
FossilOrigin-Name: ed2dda9329ca42e9c0be1986c78b091051e7598f
2011-06-20 19:00:30 +00:00
drh
051eb38a26 Fix various harmless compiler warnings in FTS3 and RTREE.
FossilOrigin-Name: fe62179efdea40887e23a16f898060b879013824
2011-06-20 17:24:29 +00:00
drh
7ee4fdd7ba Fix some minor and harmless compiler warnings.
FossilOrigin-Name: a4755e7088c3cc7c5ea191ce37f3950472f523ec
2011-05-25 23:18:02 +00:00
dan
133d7dab17 Add extended return code SQLITE_CORRUPT_VTAB. Returned when the tcontents of the sqlite tables used internally by a virtual table module are invalid or inconsistent.
FossilOrigin-Name: 8844e8bfb87314fb40ecb92705e8fff88f72bb38
2011-05-17 15:56:16 +00:00
dan
c6055c7374 Have r-tree virtual tables support on-conflict clauses.
FossilOrigin-Name: 822ab52f1023b1c4973c806cc75454acd4e95fd0
2011-04-28 18:46:46 +00:00
drh
fcd71b6010 Suppress many harmless compiler warnings, mostly signed/unsigned comparisons
within asserts or unused parameters in extensions.

FossilOrigin-Name: 3eeb0ff78d04891b5fd1a3d99a9fb8cfbed77a81
2011-04-05 22:08:24 +00:00
dan
fb1f98a1ac Fix a numbering issue in rtree6.test. Add a couple of extra tests.
FossilOrigin-Name: 0b7668a71ef8995ea0306c7d890f87761961426e
2011-03-23 10:52:23 +00:00
dan
8ad5c9492d Change the rtree module to support queries with multiple comparison operators (i.e. > or <) of the same type on a single column.
FossilOrigin-Name: 387b55aa9bb0f978641f9c2fa40f84fd98662047
2011-03-23 10:38:49 +00:00
drh
3fcdfb35a6 Fix quoting of the result in rtreeB.test.
FossilOrigin-Name: c6532b35cc5a81cc753a22e0165bfdd5143941f1
2011-03-02 22:07:29 +00:00
drh
befd5f3c20 Make sure the rtreenode() testing and analysis routine in the RTREE extension
can handle 64-bit rowids.  This fix is in response to a message on the
mailing list.

FossilOrigin-Name: 24602557fc3295fe2836d269175f12ec680ac011
2011-03-02 15:44:35 +00:00
dan
c79b6a8c51 Fix a (harmless) valgrind warning in the rtree extension.
FossilOrigin-Name: a94b9a395e0be9549d8c28e2b86b995c73c7b671
2010-12-02 11:24:58 +00:00
drh
6ea28d6d84 Fix various compiler warnings.
FossilOrigin-Name: c412f61229b6ab1ac90b932afd56f7c5e3ba1cfe
2010-11-26 16:49:59 +00:00
drh
437261d077 Fix compiler warnings.
FossilOrigin-Name: 6c4f1d5c24522d1f541a2b96b229ad0374f99c19
2010-11-18 13:47:50 +00:00
dan
3985479b9d Change some test cases to account for the new EXPLAIN QUERY PLAN output.
FossilOrigin-Name: 88a854e18fc6bd619fa8d8a911abff50a9b76b9e
2010-11-15 16:12:58 +00:00
dan
af7626f5fb Add tests to e_delete.test.
FossilOrigin-Name: fab3b383bb2c4764a56811f22ff4c783441918e8
2010-09-23 18:47:36 +00:00
dan
b51d2fa88d Further tests and changes to make the r-tree module more robust.
FossilOrigin-Name: 7ff3574b9c581b5e1f2b6f98028106c638e59bb7
2010-09-22 19:06:02 +00:00
dan
bd188afd4c Add new file rtreeA.test, to test that the r-tree extension doesn't crash if it encounters a corrupt or inconsistent database.
FossilOrigin-Name: 68a305fd5ac917317fee2ef6670ac389a120e502
2010-09-22 14:19:53 +00:00
dan
d9e430e953 When building from the amalgamation with ENABLE_RTREE defined, do not try to include sqlite3rtree.h.
FossilOrigin-Name: 5b63e981f1bef26eae0da3144a08bdc54dc36709
2010-09-11 05:15:37 +00:00
dan
9977edc7c6 Changes to comments and type names in rtree.c.
FossilOrigin-Name: 7c4f80ad272138cd4ab30455fae6a36498362933
2010-08-31 15:54:21 +00:00
dan
18ec96b3a3 Add the "circle" test geometry callback to test_rtree.c. And tests for the same.
FossilOrigin-Name: 169b8ba4be9c3941c742eded80dbacdcd2465bc4
2010-08-31 15:02:00 +00:00
dan
c223b8f1a8 When generating sqlite3.h, append the contents of sqlite3rtree.h.
FossilOrigin-Name: fc4d75370bad9021d01b76dbb1b8dde9ff223d2c
2010-08-30 18:39:49 +00:00
dan
7bddb7550b Add tests (and associated fixes) to restore coverage of rtree.c.
FossilOrigin-Name: b06f4695bdab244d9c764c082cd434a764dc5c29
2010-08-30 15:43:45 +00:00
dan
3b5a7a377c Add file sqlite3rtree.h.
FossilOrigin-Name: e1d9ffce0f84469eeb926f50030cb772de98a652
2010-08-30 11:34:39 +00:00
dan
9508daa929 Add code to allow user-defined searches of r-tree tables. Still largely untested.
FossilOrigin-Name: 782ca3b716ee1ecb0dfb5ab6f21dfd73d41758e4
2010-08-28 18:58:00 +00:00
dan
897230eb7a Fix a couple of memory leaks in r-tree that can occur following an OOM condition.
FossilOrigin-Name: 1975a27cdec09e1dad4ca8281a87dd7754c02c3e
2010-08-26 14:15:37 +00:00
dan
c23454023e Remove unreachable condition from rtree.c.
FossilOrigin-Name: 90f40cd36860d3af13ec24575dff7cc1f57ac493
2010-08-26 11:27:22 +00:00
dan
2bf19178f7 Improve coverage of rtree.c some more.
FossilOrigin-Name: bee1959dde19ebec20a7ffcb732aee0c8bb2e67d
2010-08-26 07:59:10 +00:00
dan
f836afd44a Further test coverage improvements for rtree.c.
FossilOrigin-Name: 05f6c1aebbe757dd3b54fd027057b9db7ae3a990
2010-08-25 19:04:38 +00:00
dan
92e01aafe1 Test cases to improve coverage of rtree module. Fixes associated with the same.
FossilOrigin-Name: 865cec04e4d814f63fb71feb67de7f06f8d54035
2010-08-25 17:53:17 +00:00
drh
ee2c813b72 The R-tree module should not assume that its shadow tables are consistent.
If a problem is found in a shadow table, return SQLITE_CORRUPT.

FossilOrigin-Name: 7f2f71cc9e3c39093f09231f448576cff6afb5fe
2010-08-24 01:49:47 +00:00
dan
036391f7f8 Update an r-tree extension test case to account for recent changes to the query planner. Also fix a comment in rtree.c.
FossilOrigin-Name: eaaca669a4afc83906806b22365b010c83bc3db8
2010-08-11 12:26:46 +00:00
dan
3f0d9d3846 Have the xUpdate() method of the rtree module virtual table implementation set the *pRowid output variable when inserting a row. Fix for [dd3ba6063a].
FossilOrigin-Name: f31d22489d44701c89cb13c663dfa1a6cc04f900
2010-03-19 19:02:27 +00:00
drh
31caa42afd Remove an unused variable from rtree.
FossilOrigin-Name: 8e60d3995a1ea940de9751dd3bbd7ef41b0bb00a
2010-02-24 18:25:58 +00:00
dan
5dcb3937b6 Fix for [e9a9fde1f4]. When opening an existing rtree, determine the node size by inspecting the root node of the r-tree structure (instead of assuming it is a function of the page-size).
FossilOrigin-Name: ebc9433fddf78ef7b4237686951d8d79c1c98f03
2010-02-16 10:59:40 +00:00
drh
c81c11f62c Remove the obsolete "$Id:$" RCS identifier strings from the source code.
FossilOrigin-Name: f6c045f649036958078cb15cd9d5453680c82b0c
2009-11-10 01:30:52 +00:00
dan
4ec56ff0ce Fix some errors in the guttman versions (disabled by default) of the algorithms in rtree.c.
FossilOrigin-Name: 64bad00b4f6fbbc3e5e75966f9c3959ad3d542ef
2009-10-05 05:40:08 +00:00
dan
17458718b2 Update an r-tree test to account for changes in the query planner.
FossilOrigin-Name: e5ce66d40bd68dc014071f7830112fa3b1d72948
2009-09-10 18:26:05 +00:00
danielk1977
9af00021a1 Mark the rtreeUpdate function as static. (CVS 6961)
FossilOrigin-Name: b6bdfdc69df4fc6cad669fd8b2cbaa9ecb95cb78
2009-08-06 18:36:47 +00:00
danielk1977
33c54a989e Return a meaningful error message if a keyword is used as an rtree table column name. Ticket #3970. (CVS 6902)
FossilOrigin-Name: 046efe46b50fbe928f39a0cda1b1006d486ce9f5
2009-07-17 16:54:48 +00:00
danielk1977
7974759cb4 Fix a reference counting bug in rtree. Ticket #3549. (CVS 6054)
FossilOrigin-Name: bbdc0e9f2481f8d59e05ea282b615f97e09fb471
2008-12-22 15:04:32 +00:00
drh
7ab49bfd1e Do not redefine the MIN and MAX macros if they are already defined. (CVS 5896)
FossilOrigin-Name: f41dd2053c8a297a05b47d0ef631b4d9a7db2fff
2008-11-12 15:24:27 +00:00
danielk1977
a7435e31ab Remove unused parameter from function rtreeInit() (part of the r-tree extension). (CVS 5842)
FossilOrigin-Name: 3224ea59812d0f3b5685bd92751054b81e3b681e
2008-10-25 17:10:10 +00:00
danielk1977
b9134e3e84 Fix a bug in r-tree related to internal nodes with one or more dimensions of size zero. Ticket #3363. (CVS 5682)
FossilOrigin-Name: 8b600ed083d48784df4b1da1320a01bebbf233d7
2008-09-08 11:07:03 +00:00
danielk1977
865d4d4290 Have the rtree module set the estimatedCost output variable. Ticket #3312. (CVS 5649)
FossilOrigin-Name: 483932c4e08901a11b7ab671073fd0a048b10d66
2008-09-01 12:46:59 +00:00
drh
7cb53b0fdb Allow the r-tree extension to be compiled as part of the amalgamation. (CVS 5424)
FossilOrigin-Name: 5c26f63e476be3e18b2acdec5dd459da3bfceefa
2008-07-16 14:43:34 +00:00
danielk1977
3ddb5a5104 Have the rtree extension publish two virtual table types: "rtree" and "rtree_i32". rtree_i32 stores coordinate data as 32-bit signed integers. rtree uses 32-bit real (floating point) values. (CVS 5410)
FossilOrigin-Name: c060a9a6beca455bdceee9ce6ca71a7262f98a5f
2008-07-14 15:37:00 +00:00
danielk1977
8cf6c554c0 Fix a bug causing the pager-cache size to be reset to its default value whenever the database schema was reloaded. (CVS 5283)
FossilOrigin-Name: 6dbe67da5cb0141e011b4fdcc3964a20f68be843
2008-06-23 16:53:46 +00:00
danielk1977
b13dee9900 Run (a subset of) the rtree tests from quick.test. (CVS 5282)
FossilOrigin-Name: e872c78c72eb5976e72123485692a76409bd857f
2008-06-23 15:55:52 +00:00
drh
0d287cf775 Fix another typo in the rtree README file. (CVS 5187)
FossilOrigin-Name: 9ab87b7b0d0195787f1527b5be1475fb89330f08
2008-06-04 15:09:16 +00:00
drh
72e87f44d0 Fix a bug in the R-Tree documentation. (CVS 5186)
FossilOrigin-Name: bb445a4b1fe43d7b3e8546a6510f4e3c3ecb500b
2008-06-04 14:20:09 +00:00
drh
0224d26d37 Allow the SQLITE_MAX_EXPR_DEPTH compile-time parameter to be set to 0 in
order to disable expression depth checking.  Ticket #3143. (CVS 5166)

FossilOrigin-Name: 5ceef40e397fc535173996404345b93f695e8cac
2008-05-28 13:49:34 +00:00
drh
4b4f780188 Fix a bug in rtree that occurs when too many constraints are passed
in on a query. (CVS 5162)

FossilOrigin-Name: 54b84a3ddba9d27814c2f613dd197f691ac549a4
2008-05-27 00:06:02 +00:00
drh
9f86ad2354 Use %w instead of %q when constructing shadow table names for rtree. (CVS 5161)
FossilOrigin-Name: 78f4ba974d9b768b62391d8cd2ed407d49584cb8
2008-05-26 20:49:02 +00:00
drh
58f1c8b773 Update the amalgamation builder to incorporate the RTREE extension. (CVS 5160)
FossilOrigin-Name: aa8eba3360c31182f5238e96b83a382374f40fab
2008-05-26 20:19:25 +00:00
danielk1977
ebaecc148f Import 'rtree' extension. (CVS 5159)
FossilOrigin-Name: b104dcd6adadbd3fe15a348fe9d4d290119e139e
2008-05-26 18:41:54 +00:00