Commit Graph

280 Commits

Author SHA1 Message Date
drh
c583719b65 Show LEFT and RIGHT JOIN processing in the EXPLAIN QUERY PLAN output.
FossilOrigin-Name: d91faeffea5cf0585fb71e5311fdcc6b8be85c7e9c732050b4448e617c970101
2022-04-11 14:26:37 +00:00
drh
60f3657b4a Fix an undersized memory allocation in the test harness for RTREE. This
error was in test logic only, not in the SQLite library itself.
[forum:/forumpost/35470a0a72a005e1|forum post 35470a0a72a005e1]

FossilOrigin-Name: 7e3c9594390ac8defaf9825e14b4c19ef8c123b747971dd3d4df16110f443d3b
2022-02-22 15:47:55 +00:00
drh
7d44b22d45 Fix test cases so that they all still work even with -DSQLITE_DQS=0.
FossilOrigin-Name: 4883776669ee2f2310ea82b0d6df4d008eebaa7cb252102539cf21a635402ebb
2022-01-16 19:11:13 +00:00
drh
9dbf96bd70 An attempt to integrate the JSON functions directly into the SQLite core,
rather than holding them as an extension.

FossilOrigin-Name: 583b47d865fb8d2c9ae4d3a4e70356a8a758978efb0a282f6b19775bf41fb748
2022-01-06 01:40:09 +00:00
mistachkin
2b5fbb2836 Fix harmless compiler warnings seen with MSVC.
FossilOrigin-Name: a9bfb621091b6d92d1caeb69134d3809d9e0b43fe764608c5995db277ac785be
2021-12-31 18:26:50 +00:00
dan
826ec6013c Fix a performance regression in rtree introduced by the previous commit.
FossilOrigin-Name: 7f42b8e1a25c0830fe81e4668318998af595826784a50780a5c1c0b4d95a2482
2021-11-18 20:11:31 +00:00
dan
895c807a6d Fix a problem slowing down the handling of == constraints in the rtree module.
FossilOrigin-Name: 509027e964f28efca088a41fe32f01c38316f7a919de63a8835e3bc7c3fb0787
2021-11-18 19:15:40 +00:00
drh
dcf10a1a4b Fix harmless compiler warnings. Improve the independence of some TCL tests.
FossilOrigin-Name: 1a038242dc6c0cab97dd9375acfce62aa1c386debc36aaed388d366b87ddd931
2021-10-22 11:17:29 +00:00
drh
9fdd66e3c0 Enabled the testcase() macros under SQLITE_DEBUG.
FossilOrigin-Name: 0ae8dd132db8331ca9cc42ad511066924f9d3a1d158ecdb630cebc41b6bd2493
2021-10-20 17:58:33 +00:00
drh
7a3b4451a1 Fixes for harmless static-analyzer warnings. This also makes the code easier
for humans to understand.

FossilOrigin-Name: 36177a62feeb4fa93ab6e3c6f4dbe1ddcf63bb02f93284abab979da0261b218e
2021-10-05 17:41:12 +00:00
drh
8a0c42765d Ensure that geopoly does not invoke sqlite3_result_error_nomem() with a
NULL pointer.

FossilOrigin-Name: 2483310d15022b47109b44c86e100f5894be7a45a0568dfef6aea80e6c518654
2021-10-05 12:34:54 +00:00
drh
7d4c94bc0f Fix harmless static-analyzer warnings.
FossilOrigin-Name: 32f33f356931242b59c01b5df7e180941231e3d9c91577ad33aa4a01e9d59092
2021-10-04 22:34:38 +00:00
drh
11a9ad5669 Fix harmless static analyzer warnings in sessions, rtree, fts3 and fts5.
Add the -DSQLITE_OMIT_AUXILIARY_SAFETY_CHECKS compile-time option to cause
ALWAYS() and NEVER() macros to be omitted from the build.

FossilOrigin-Name: 1c67f957fc77e37ce8f0d447c41ca975e8e79a35d332739c24a633649b5b0387
2021-10-04 18:21:14 +00:00
dan
09e2626eaa Fix rtreedoc.test so that it works with SQLITE_DEFAULT_AUTOVACUUM=1 builds.
FossilOrigin-Name: a300adc21151fb70ab8573477fd89a10300ee678f068fe123f22ada2f1f876d2
2021-09-30 17:39:21 +00:00
dan
91f621531d Update a test case in rtreedoc.test to account for the fact that release builds generate fewer VM instructions than debug builds.
FossilOrigin-Name: 7d16b302826fec3606dbc6e20df0d2182f6946a2ed4076d2412d1df30c552ecb
2021-09-30 10:47:10 +00:00
dan
eda0001d89 Add new test file rtreedoc3.test.
FossilOrigin-Name: 54604869861cc5866d5de87785599ca56f75067f8cb7fe22e32912b3a037e37b
2021-09-29 16:38:02 +00:00
dan
4b67c655af Fix a memory leak in rtree triggered by corrupt database records. dbsqlfuzz 397ad036a9013d7318da30ef84947d2baaaa6d6c.
FossilOrigin-Name: 706322c2b5bb31e14c1120a94520b21fa623ff119e3890170e36b37d8bde721a
2021-09-25 20:19:16 +00:00
drh
c2f61c18d1 Fix an incorrect assert() in rtree that was added recently
by [f7ad73c49507c943].  Change it to testcase().

FossilOrigin-Name: 3aa0bf3a098ee9a62c79f266f94e4d290056d0f3e91237944893d6bbb686861f
2021-09-22 13:07:10 +00:00
drh
2e50f67073 Add the "PRAGMA table_list" command with its corresponding eponymous
table-valued function: "pragma_table_list".

FossilOrigin-Name: 2c0e7ae541e9ecb86aa58fa7e7057def8aac1b1af1af1aa80b8bf2d260f9a2f9
2021-09-21 17:26:23 +00:00
dan
5488e0827a Further tests for legacy rtree geom callbacks.
FossilOrigin-Name: 99d6bb22e8735681443bfe67287aa15ce2c57d0d63e304abf8aa01fde50dd021
2021-09-18 16:15:54 +00:00
dan
01ed72f2c5 Add tests for legacy geometry callbacks to rtreedoc2.test.
FossilOrigin-Name: 6ad00e52eda5bc4cb8e6fffbd7538bcd4c6b22f84b837a746eba6bf8c91eb55a
2021-09-17 20:43:27 +00:00
drh
89b1715415 The dbsqlfuzz fuzzer found a refutation for a recent ALWAYS() macro.
FossilOrigin-Name: ebfc18aaa6506ccac80f297a1792e726972bb39c0b5c8706faadeb8df94a45e9
2021-09-16 22:23:36 +00:00
drh
8e4616c280 Minor changes to rtree.c so that we can get full branch coverage even when
it is compiled without geopoly.

FossilOrigin-Name: f05ae9b5864459493154037d2c902d203c4a43007b5d61bd4beb1eed56e06d13
2021-09-16 20:16:39 +00:00
dan
72fb42d570 Add tests to rtreedoc.test.
FossilOrigin-Name: b18c6ec46079520e0db8b42586ce9370a4038d0b4f719cfb98488037883e2537
2021-09-16 19:50:54 +00:00
drh
051c9ba1be Add a single new ALWAYS() to rtree.c, with justification.
FossilOrigin-Name: 778e4499cdf2083d5431738099dedf0aade9271f661e09ca3278e0109bb1e720
2021-09-16 17:02:59 +00:00
drh
495f78d851 Add a tag comment in rtree.c. No changes to code.
FossilOrigin-Name: 213410fa9cceb4ce34bf590ba65648ebeb94cc8d0c29a8881222208097162a95
2021-09-16 16:41:59 +00:00
drh
eb56e29053 Mark an unreachable branch in rtree.
FossilOrigin-Name: e6c4afd5b365b8dea8c0742352a09029da0f9715dd2407d4ccf53f1e0a4ce625
2021-09-16 14:07:09 +00:00
drh
86b262ecfa Back out a couple of ALWAYS() macros from [4fab9089868bbb05]. Test case
added to TH3.

FossilOrigin-Name: d26963a530ccbe36a174823d2f0bd7e06c6fca4f38ecdd04cd700c4000cc3719
2021-09-16 13:52:28 +00:00
drh
162f153579 Simplify the routine that attempts to estimate the size of an rtree index
by looking at the sqlite_stat1 entry for the %_rowid table.

FossilOrigin-Name: 06c329c17c2c2de8bc1ca7f3b0b929055675761a8be7a7e8b4a9fc5cca0d1679
2021-09-16 07:32:24 +00:00
drh
c464ec6710 New ALWAYS() and assert() to mark unreachable branches in rtree.c.
FossilOrigin-Name: f7ad73c49507c9436adc7fe1b865f801eefcc7ea6b3ba35e83e63029beb03016
2021-09-16 05:24:40 +00:00
drh
5f9c7ba9d8 In rtree.c, remove an incorrect ALWAYS(). Add other ALWAYS() and NEVER().
FossilOrigin-Name: cbaac8878aac0623beb5af3bc79a5b1c0179213206fd658b8c4fcc3531889480
2021-09-15 19:53:22 +00:00
drh
750f2331c4 Add more ALWAYS() macros on unreachable branches in rtree.c
FossilOrigin-Name: fbba89dac9591c56da81bd0808910fbc64640f3ccfd95845ecab4d3aea46ca61
2021-09-15 19:13:24 +00:00
drh
8038cb99b0 Fix the xBestIndex method on rtree so that it correctly recognizes that
rowid=? works the same as id=?.

FossilOrigin-Name: c74c07cc86443057d34284ae31eb68470741592b0e61072fd5e120e82919169b
2021-09-15 16:20:15 +00:00
drh
04bd2c837b Add ALWAYS() macros on some unreachable branches in rtree.
FossilOrigin-Name: 9123f680ae3100f4c781ac4f5b8afac49bb5d4231b5931ad112b1b615f22f613
2021-09-15 15:56:00 +00:00
dan
f02c324bc1 Further updates to rtreedoc.test.
FossilOrigin-Name: e66727837ddd5d1344c252323d52600b6138f5a2471f63d09b5a28ea2c22e595
2021-09-15 15:53:01 +00:00
drh
83569e2e9e Simplify some of the corrupt shadow-table detection logic in rtree.
FossilOrigin-Name: 0c4f37aa475bd4bd17c20c02ab2d9f63d0a6a08b0e2bbfa559f7b972ece6f4fc
2021-09-15 13:09:55 +00:00
dan
5f835b7847 Ensure rtreedoc.test is not run for builds without the rtree extension.
FossilOrigin-Name: 42dff223470e9c096b8486ef232ac41b70d0875d8ae07630bfaaea1515ffa8d0
2021-09-15 10:49:31 +00:00
dan
f159323c42 Add test cases to rtreedoc.test.
FossilOrigin-Name: afe0ec4d589d87a07c0daf3fc4de884b82a8bceed593ba4e44caa1cf033a6715
2021-09-14 20:07:58 +00:00
dan
a2fef2f031 Add test cases to rtreedoc.test.
FossilOrigin-Name: b62de1269f17fcc944ff404a20c4f705ffe99c44d6c54f42c29e69753aac8092
2021-09-14 14:16:36 +00:00
dan
6962d78c4d Minor updates to rtreedoc.test.
FossilOrigin-Name: b22c75e41ded29afd026b32b73b87f6427340a9ac1d46147db8edac20eb7beb5
2021-09-14 11:27:20 +00:00
dan
db45212a35 Add test cases to rtreedoc.test.
FossilOrigin-Name: 4ee99d315487a3aa09911191a74c6a12693784c5359243eb1396d8868566e80a
2021-09-13 18:32:02 +00:00
dan
30918bfb0b Add new test file rtreedoc.test.
FossilOrigin-Name: 8c4b1482eeb31856bce20eda1ce74959e19da11962f74d406a608747a92fe429
2021-09-13 16:36:20 +00:00
drh
4c5b7b922c Avoid masking off an OOM fault in rtreecheck().
FossilOrigin-Name: 3ebfe7128a20b270de65ebf4620f62e34ea6cc46b472cc52aed96af504eb9637
2021-09-09 18:06:07 +00:00
larrybr
1929cc0d8a Add geopoly to $::sqlite_options() and use it to pass more tests.
FossilOrigin-Name: 23da5016b66f3947cc902dbe2766ea9f5a00f85312a652b536ab51d657446ab7
2021-04-16 23:43:22 +00:00
dan
385b982865 Prevent an assert() from failing if sqlite3_blob_reopen() is called on a blob-handle that has already hit an SQLITE_CORRUPT error.
FossilOrigin-Name: b5dc7aba036cfd6d09c68dd17608328063634ca99ff341f97bab2dc2a1f59b11
2021-04-14 15:25:10 +00:00
drh
b3d2ba7cb0 In the rtreedepth() function, detect OOM when converting a zeroblob() on
input.  dbsqlfuzz ed23eda7cc3a8a054f85ea19d55c59ba2ca72744.

FossilOrigin-Name: 69f843c8fa6e21500b5777169c3b394453ba818b4e32427428480dca5b4ed615
2021-04-13 12:28:55 +00:00
drh
a74364ae13 Detect OOM earlier in the geopoly extension.
dbsqlfuzz 0986e7b020e6137fc6b96331f91d15753d18e42d.

FossilOrigin-Name: 7237117595a3519717a0a4b03eb427c6ec55b214e7ecd6d0f63a613adec355d4
2021-04-06 22:56:28 +00:00
drh
ec435c40ed Fix a problem with the geopoly_bbox() function.
FossilOrigin-Name: f3a2eb979f1003e8249e613b34afd345f157c0d54b4f05ea0db230ef70e71351
2021-04-02 18:59:13 +00:00
drh
8210233c7b Revise tests cases to align with the new EXPLAIN QUERY PLAN output.
FossilOrigin-Name: 50fbd532602d2c316813046ed6be8be2991c281eb5f295c4c28520a0de73862c
2021-03-20 15:11:29 +00:00
drh
3ef2cb5991 Fix a potential NULL pointer dereference in the geopoly_overlap() routine
of the GeoPoly extension.

FossilOrigin-Name: b5665712e667a20d42a2e892d9d540f4273609eabd56f8178e1d5664280821f3
2020-11-25 15:29:08 +00:00