Commit Graph

22304 Commits

Author SHA1 Message Date
drh
1c19848386 Minor changes for test coverage.
FossilOrigin-Name: e5a8fa50f4e5e5c24664452eda4af80904f75e5123b8f84353347dbd505d416d
2020-12-14 13:52:03 +00:00
drh
250af6e0fb More test cases. No new problems discovered.
FossilOrigin-Name: f34dd67e2d0dfc9e3b5d49148fb0162853119c097cbc3fe961878875ba98d8e3
2020-12-12 00:43:52 +00:00
drh
255c1c159b New test cases with corresponding bug fixes.
FossilOrigin-Name: f22c21a94ca4cad0217f91c1a5a275bc348cb6ba0f3a54c927533bc8d8c96a90
2020-12-12 00:28:15 +00:00
drh
58b18a47df Begin adding test cases. Fix one bug found so far. More are pending.
FossilOrigin-Name: aadd67ddf2a191629b5356395f75e4556aac904a6e2f6b83742fa4f26e4253a4
2020-12-11 19:36:19 +00:00
drh
d3e21a1098 Small performance tweaks.
FossilOrigin-Name: 5321d60c575ef8f888d1b315df02cf9ed96a3ffc61babbc1429aa73b2a61a190
2020-12-11 17:11:56 +00:00
drh
ed4c54699d Bug fixes so that legacy tests pass. New tests for new functionality have
not yet been added.

FossilOrigin-Name: aa76790e58cea9a2b707f5912fd66c76545e7417442553fc13c87f773a2fe1dd
2020-12-11 16:49:51 +00:00
drh
61e280ad8a Logic is in place to handle multiple ON CONFLICT clauses, but it does not work.
Any use of ON CONFLICT will likely lead to memory faults.  This is an
incremental check-in to save my place.

FossilOrigin-Name: 155142314feb007d526f8f67723636fd50dc52d1cd4d3a67dd93b105c9d5c2be
2020-12-11 01:17:06 +00:00
drh
daf2761c62 Use an iterator for the index loop in sqlite3GenerateConstraintChecks().
The idea is that this iterator can be enhanced to traverse the indexes in
any order, as required by multi-index UPSERT.

FossilOrigin-Name: 64a4a91ecc5dcde3fa07d3cf038c74b9ede63d36628ecfb35203a9dfbbfe113c
2020-12-10 20:31:25 +00:00
drh
91f2717f22 The DO UPDATE code generator searches for the correct ON CONFLICT clause to
use.

FossilOrigin-Name: a47e35ee2d901baaa37e7229d190f934e1b0bd3510147cd4a2a49c4a1411416a
2020-12-10 12:49:26 +00:00
drh
e84ad92f17 For upsert, the constraint check code generator uses a copy of the index list
for the target table, which can potentially be reordered.

FossilOrigin-Name: 3194c00c2c6a32bdfd5acc9fda5b38ae131d20cd3b7aea8512a41b2e76808f6a
2020-12-09 20:30:47 +00:00
drh
5602777e8f Improved comments in sqliteInt.h. No changes to code.
FossilOrigin-Name: 8ccb8d1d55fa5aaf625c30f0e7c10aa403d79b5574dbdfa3fd0271a4e546f7e3
2020-12-09 13:11:02 +00:00
drh
20b86324a1 Initialize all terms in the ON CONFLICT clause stack.
FossilOrigin-Name: 5e683fd1cbde53f37cf8a2b1e981191e2b29e3376db554691767f33c37c7547e
2020-12-09 01:34:48 +00:00
drh
2549e4cc2f Enhance UPSERT parsing to allow multiple ON CONFLICT clauses. Only the
very last clause may omit the conflict target, but the conflict target may
now be omitted for the DO UPDATE resolution.

FossilOrigin-Name: 2ca62f4c71df6544cb8039bdc80e3701d09697c38800534371f6d44532fcffae
2020-12-08 14:29:03 +00:00
drh
0dffe465f7 Fix a bad assert() in math1Func().
FossilOrigin-Name: 4b286129138d44e6f8e9b3450289941e01d20fdfb9d0b5d846031425e8ca6b49
2020-12-07 23:14:25 +00:00
drh
e2ce8c446f Fix to the --disable-math option to ./configure.
FossilOrigin-Name: 99ff6418492adcbaf2be728737735afa1c2997de5868395e69c53d08fc14491f
2020-12-07 21:19:17 +00:00
drh
63f8f98a63 Many more math functions. Semantics follows PG wherever possible.
FossilOrigin-Name: 6b93627b5d9819abf179a3e4a82e7afe17cbcafdabbd5f058de9ed114c9d477f
2020-12-07 21:13:06 +00:00
drh
f6e904bd92 Begin adding new SQL functions that depend on -lm: ceil(), ceiling(),
floor(), ln(), log(), and log10() so far.  More to follow.

FossilOrigin-Name: 4db5f2f7875f6df78630a7816fc018141a6eee2e295b44fc7627eb66d07881ea
2020-12-07 17:15:32 +00:00
drh
aeb6bc5628 Fix harmless compiler warnings associated with the recent FTS5 enhancements.
FossilOrigin-Name: 1db7c751912beb57a697ac8e85b9c29e30da7b6c89207e9828bf08e56c58242f
2020-12-04 17:05:16 +00:00
drh
0a2fb7960c Fix a bug in the ".eqp" command of the shell that was introduced by the
recent sqlite3SelectTrace/SQLITE_TESTCTRL_TRACEFLAGS changes.

FossilOrigin-Name: fd02dffceb0e21cd85c99d5481ab8567110d01c30ea701178547f32299944302
2020-12-04 16:58:20 +00:00
dan
b9ceb833f7 Ensure that fts5 function matchinfo() is registered before running tests that use it in fts5corrupt3.test.
FossilOrigin-Name: 932e05e093192991589e70c2cbcc8a57fb3dcc6df1c2673962bfd06ba5cfdd97
2020-12-04 16:49:25 +00:00
dan
ee8221859b Fix a test script problem in walvfs.test.
FossilOrigin-Name: 4c5076fbe42cc6447c47bfc202501f945f78bd716cbe8e33599c67b7d0956611
2020-12-04 16:26:25 +00:00
drh
7b0ab21016 Fix an incorrect datatype no the sqlite3WhereTrace variable in test1.c.
FossilOrigin-Name: 4e6dab30f6d6795ecec9d8c4489fa4d210a3002715ad89812d65a1a846c164b9
2020-12-04 16:25:59 +00:00
drh
0a3e80b051 Eliminate the sqlite3_unsupported_selecttrace global variable by creating
a new test-control to control SELECT tracing.  Note that SELECT tracing is
only available on debug builds.

FossilOrigin-Name: fb07c4e3c7ad3493c274cbfcf0dffdedcca18c0d90de04459134511d4e2a5277
2020-12-04 16:09:27 +00:00
drh
fda8e49207 Further changes to the trace variables to try to eliminate (harmless) compiler
warnings in all configurations.

FossilOrigin-Name: 3a4c98b989964e3e366fe9519e9b5ed935e893d5b69d92bc0388a14c7e7938e6
2020-12-04 16:04:45 +00:00
drh
c0622a4d03 Alternative implementation of ".selecttrace" and ".wheretrace" that uses
a test-control rather than global variables.

FossilOrigin-Name: d36d6f2923a2393c751c0ac7634433453be20df7567fd914e57cbb1ae15f68b2
2020-12-04 01:17:57 +00:00
dan
3190b88e75 When merging prefix lists in fts5, use 16-way merges instead of 2-way merges. This faster.
FossilOrigin-Name: 026a93508ec392ca5cd2578ae9eab64974f58beccda088e10d4cc951f237632f
2020-12-03 21:22:37 +00:00
drh
1de03abb03 Do not simulate OOM faults on the SQLITE_FCNTL_CKPT_START and
SQLITE_FCNTL_CKPT_DONE file-controls, as those are write-only and
the return value is always ignored.

FossilOrigin-Name: 62a2d394835276fabc0f1df2302605a700b2244775bf2e35e86529df8e40a0da
2020-12-03 19:25:06 +00:00
drh
0b1e70c4ce Enhance the generate_series() table-valued function to support negative
step values.

FossilOrigin-Name: 9b60fc48706bb77b2d4fe27a7b5834a6dc229b4051a9285032da578e4f2849e6
2020-12-03 14:21:26 +00:00
mistachkin
4338000d47 Prevent potential segfault in the sqlite-expert idxPopulateStat1 context cleanup code.
FossilOrigin-Name: c24f13448b5a55f45b4d4786a878fa73fe3395b5724f3bc2eea22e5e2b074353
2020-12-02 20:07:49 +00:00
dan
64f1ef6abd Allow a search for an N character prefix in fts5 to use a prefix index of size N+1, if no prefix index of size N exists.
FossilOrigin-Name: 78a7801d8fc9e58a62e5168e35b52b7440340549123fc6a537e2abd571f6fe7b
2020-12-02 19:08:15 +00:00
drh
f30bbcec90 Fix the ".open" command in the CLI so that it accepts command-line options
both before and after the filename.

FossilOrigin-Name: d330bf0c02e67f70f49496e4b1e484bb4e876622becc6a062b2aefbd585d0117
2020-12-02 18:27:48 +00:00
dan
0fa433b40c Improve performance for fts5 column filters that filter for more than one column. e.g. "{col1 col2 col3}:phrase".
FossilOrigin-Name: d8de2f236d43a88fac7550a0451951dd5a945eb304e32f82e662479cea7c2684
2020-12-02 16:23:05 +00:00
drh
bb497fe36d Parameterize the hash function in mkkeywordhash.c. This was an attempt to
find a better hash function, which turned out to not be successful.

FossilOrigin-Name: 2195d731f51a18f917c4299d8f4c7ee7c139c2527f62869d6da171a6d1d89ea6
2020-12-02 02:58:05 +00:00
drh
636f505864 Increase the version number to 3.35.0 to begin the next development cycle.
FossilOrigin-Name: edbabaa30823db7c7d169cb93722b5f74bc711359984fb7e139ca9d10fe7dae4
2020-12-02 00:22:09 +00:00
drh
c52a1e9f35 Slightly faster tokenization of non-keyword identifiers.
FossilOrigin-Name: 55fa22bd403cc8f0973efea898a7cfa3a32b57c7e2a7a4c30c3f2c72d5396f07
2020-12-02 00:20:00 +00:00
drh
f461bab265 Add the --lookaside SIZE COUNT command-line option to the dbfuzz2 testing tool.
FossilOrigin-Name: 2466960c0ba02ef9c325e9a5f8603db518e7529547f614c225fef430421e1643
2020-12-01 23:18:13 +00:00
drh
384f5c26f4 Version 3.34.0
FossilOrigin-Name: a26b6597e3ae272231b96f9982c3bcc17ddec2f2b6eb4df06a224b91089fed5b
2020-12-01 16:14:00 +00:00
dan
9f4fb42730 Update the tea/win/makefile.vc file that ships as part of the autoconf package to use "sqlite3" instead of "tclsqlite3" for the installed dll filename.
FossilOrigin-Name: 23212b1a054f05773a9f69f9802035eea6a9d759a2a09e22f46d1046c058b417
2020-11-30 18:52:08 +00:00
dan
aeb4e6eebd Update the tea/win/makefile.vc file that ships as part of the autoconf package to use "sqlite3" instead of "tclsqlite3" for the installed dll filename.
FossilOrigin-Name: 93d4d9dc05bb86c08a12d56b3ce68ec39b69e57951a936fb3b326812c051c3b4
2020-11-30 18:43:40 +00:00
drh
56a5747e63 Do not reuse the obsolete SQLITE_TESTCTRL_PRNG_RESET value for
SQLITE_TESTCTRL_SEEK_COUNT.  Give SEEK_COUNT its own unique value.
This avoids incompatibility with legacy test code.

FossilOrigin-Name: fdba0b129091d607dc0c1aa52f8631a208dbff22476a298bd5428e672593ed18
2020-11-30 14:20:17 +00:00
drh
d1032f952c Improve the speed of the tokenizer by recognizing that tokens starting
with letters "_", "Y", or "Z" can never be SQL keywords and must be ordinary
identifiers.

FossilOrigin-Name: 16e281ed6219cc229dec7e3f1b40da2304dc270a74fd6ef78d04a088e30e7026
2020-11-27 20:56:16 +00:00
dan
cad760d16e Fix a compiler warning in fts5_aux.c.
FossilOrigin-Name: 8edb983bc87898eff2cd2e7e672a32a47c71b2be9d818513d339e95560d45b2b
2020-11-27 19:40:13 +00:00
dan
6d19bf9460 Add missing cast to fts5 bm25() code.
FossilOrigin-Name: 6ff9673847c0b4174d9435e93d19af0ee7406b1a12edeb6edec98697e1646824
2020-11-27 16:15:55 +00:00
dan
3181706895 Remove a redundant "if( rc==SQLITE_OK )" from the fts5 bm25() code.
FossilOrigin-Name: d85f4f27f58adcc75fc7d59e63af95b2a338052d8748a11f22ec1e48d1aff4cc
2020-11-27 16:08:15 +00:00
dan
66efc393c5 Move an "if( rc==SQLITE_OK )" to outside a loop body in the fts5 bm25() code.
FossilOrigin-Name: 14a4dcf3474566d072007a37d214c892397c21dd3b7f8b55ad0e5edfb7130dd6
2020-11-27 16:05:31 +00:00
dan
1c5b23f170 Fix a case in the FTS5 integrity check where a corrupt database could cause a buffer overread.
FossilOrigin-Name: a32b4f650d2d543bd2773cbc8655c1679a20b35ac9ec4d08c7754ddf6d972acb
2020-11-27 15:28:26 +00:00
dan
ec8962869a Update mkunicode.tcl to match the change erroneously made to machine generated file fts5_unicode2.c in [b7b7bde9].
FossilOrigin-Name: 326d579d777fdede6bc64f9525248767f4730de4e50260b0387e614a9d006416
2020-11-26 20:13:54 +00:00
drh
68b4034450 Update a requirement mark in the e_expr.test script.
FossilOrigin-Name: bb174a074b5833181900d396edda955254ea1768750a0ab3b6d714530b1fe13f
2020-11-25 18:44:20 +00:00
drh
d36f588f31 Fix harmless compiler warnings about unused function parameters.
FossilOrigin-Name: 25d067c270966d9506db8bedf280883e32b69050b14bdbbeda4bb2d9a362619c
2020-11-25 16:28:04 +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